-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Use stringlabels by default #16436
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
Use stringlabels by default #16436
Conversation
This removes the stringlabels build tag, makes that implementation the default one, and moves the old labels implementation under the slicelabels build tag. Fixes prometheus#16064. Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>
Mostly comment issues and unused variables. Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>
Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for this, lgtm.
I assume test_go_oldest
was inadvertedly ran with slice labels, I think it's better to have it run with default stringlabels
as it's the case now.
same for others like GOARCH=386 go test ./...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR makes the stringlabels implementation the default by removing the stringlabels build tag and shifts the old implementation under the slicelabels build tag, fixing #16064. Key changes include updating test functions to reflect the new default label collision behavior, revising build tags in multiple label-related files, and adjusting CI configuration to remove the stringlabels flag.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
File | Description |
---|---|
tsdb/head_test.go | Updates expected hash collision inputs for label tests. |
tsdb/agent/series_test.go | Mirrors head_test.go label collision adjustments for agent tests. |
model/labels/*.go | Revises build tags and updates comments to match new defaults. |
.promu.yml and .github/workflows/ci.yml | Removes stringlabels flag from build configurations and tests. |
Comments suppressed due to low confidence (2)
tsdb/head_test.go:6289
- [nitpick] There is a change in the label key from 'lbl1' in the fallback assignment to 'lbl' in the initial assignment. Please confirm that using 'lbl' initially and 'lbl1' later is intentional to differentiate behaviors between the default (slicelabels) and legacy implementations.
ls1 := labels.FromStrings("__name__", "metric", "lbl", "HFnEaGl")
tsdb/agent/series_test.go:80
- [nitpick] The label key changes between the initial assignment and the fallback (using 'lbl1' and 'lbl2') may be confusing. Please verify that this inconsistency is expected as part of the change in default label handling.
ls1 := labels.FromStrings("__name__", "metric", "lbl", "HFnEaGl")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. We should take care to highlight the change in release notes etc., so downstream projects can react.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
* Upgrade mimir-prometheus * Fix breaking change in `NewAPI` * Sync upstream PromQL engine test cases * Modify `histogram_stddev` and `histogram_stdvar` to match new behaviour introduced in prometheus/prometheus#16444 * Simplify code * Remove outdated comment This issue was fixed in prometheus/prometheus#15828. * Remove unnecessary variable * Rename operator and files * Extract `histogram_quantile`-specific logic * Add support for classic histograms in `histogram_fraction` See prometheus/prometheus#16095 * Bring in changes from grafana/mimir-prometheus#871 * Invert build tag logic to match prometheus/prometheus#16436 * Sync query engine tests with upstream * Fix breaking changes * Regenerate OTLP code
This removes the stringlabels build tag, makes that implementation the default one, and moves the old labels implementation under the slicelabels build tag. Fixes #16064.