Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util: Remove BuildGitInfo #1109

Merged
merged 2 commits into from
Oct 14, 2024
Merged

util: Remove BuildGitInfo #1109

merged 2 commits into from
Oct 14, 2024

Conversation

sharnoff
Copy link
Member

We already have other ways of determining the version at runtime (namely: the tag associated with the images), and this just adds needless complication to our dockerfiles.

We already have other ways of determining the version at runtime
(namely: the tag associated with the images), and this just adds
needless complication to our dockerfiles.
// See also:
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set
LabelPluginCreatedMigration: gitVersion,
LabelPluginCreatedMigration: "true",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it okay that the format of the label value has changed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup -- double-checked that the only place we use this label is here:

metav1.ListOptions{
// NB: Including just the label itself means that we select for objects that *have* the
// label, without caring about the actual value.
//
// See also:
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#set-based-requirement
LabelSelector: LabelPluginCreatedMigration,
},

... where we don't require that it's set to any particular value :)

Copy link
Contributor

@mikhail-sakhnov mikhail-sakhnov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, dropped one minor question about label format

Copy link

github-actions bot commented Oct 14, 2024

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/neondatabase/autoscaling/autoscale-scheduler/cmd 0.00% (ø)
github.com/neondatabase/autoscaling/autoscaler-agent/cmd 0.00% (ø)
github.com/neondatabase/autoscaling/pkg/agent 0.00% (ø)
github.com/neondatabase/autoscaling/pkg/plugin 4.98% (+0.01%) 👍
github.com/neondatabase/autoscaling/pkg/util 17.23% (+0.56%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/neondatabase/autoscaling/autoscale-scheduler/cmd/main.go 0.00% (ø) 29 (-1) 0 29 (-1)
github.com/neondatabase/autoscaling/autoscaler-agent/cmd/main.go 0.00% (ø) 38 (-1) 0 38 (-1)
github.com/neondatabase/autoscaling/pkg/agent/dumpstate.go 0.00% (ø) 48 0 48
github.com/neondatabase/autoscaling/pkg/plugin/dumpstate.go 0.00% (ø) 78 0 78
github.com/neondatabase/autoscaling/pkg/plugin/state.go 0.00% (ø) 398 (-3) 0 398 (-3)
github.com/neondatabase/autoscaling/pkg/util/buildinfo.go 0.00% (ø) 0 (-8) 0 0 (-8)

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

HTML Report

Click to open

@sharnoff sharnoff merged commit 4ed6744 into main Oct 14, 2024
22 checks passed
@sharnoff sharnoff deleted the sharnoff/rm-gitinfo branch October 14, 2024 16:56
sharnoff added a commit that referenced this pull request Dec 10, 2024
Follow-up to #1109, must have forgotten it there. These are no longer
used.
sharnoff added a commit that referenced this pull request Dec 12, 2024
Follow-up to #1109, must have forgotten it there. These are no longer
used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants