-
Notifications
You must be signed in to change notification settings - Fork 100
feat(operator): deprecate operatorconfig.collection.filter.matchOneOf #1688
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
Conversation
26d83ae to
4941d55
Compare
|
prometheus-engine/pkg/export/export.go Lines 1097 to 1107 in 77f0a33
|
|
I'm not sure anymore whether it was an OR or an AND... but also I very much remember people shooting themselves in the foot with this back in 2022 because it wasn't implemented the way people thought it would be implemented, to the point where we had to change the examples in the docs to be negative matchers on metrics that don't exist because people kept copy-pasting the older examples verbatim and accidentally filtering out all their metrics. |
|
Yup, double checked and indeed it's OR-ed, which only proves user can get misleading. Another (production cx) example is with broken histograms (demo). Anyway, PR still stands I think we should proceed PTAL @pintohutch @dashpole @lyanco you are ok with this approach (deprecating and removing?) |
|
While we wished we could reenabled this under some different, bit easier to use config API surface, the decision with @lyanco is to remove it for as other alternatives exists and focus on more important tasks. |
dashpole
left a comment
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.
approving go code changes. I don't have context on whether this is a good idea or not :)
|
Given the footgun-ness of the feature as Lee described, I agree we should proceed with the PRs and be explicit in our kubebuilder tags to mark the CR field as deprecated. |
cda7708 to
d0b8468
Compare
af99d2e to
df6370a
Compare
|
Should be rdy for review PTAL! |
792de57 to
a685b1d
Compare
|
Looks like tests are still failing. |
Yea, I mentioned this on our standup. It's odd.. couldn't figure out why without local debugging session to do... will check tomorrow ): |
c2a6fae to
f9557b5
Compare
|
OK, I found the bug -- it's due to me extending the tests, not related to this change. Fixed in another PR (#1751) and chained this PR on it. |
|
Don't merge before #1751 is merged pls (: |
2f4f7c7 to
4bd847d
Compare
After time we realized that a bug caused the operator config export filtering logic to be not used from the GMP 0.14 release onwards. We decided to keep this field NOT applicable (changing this field being noop) going forward, so this PR makes the deprecation/removal of this functionality clear with the operation and export code removed. * This feature since the beginning was extremely hard to use and confusing to users, users constantly assumed list of matchers are "AND-ed" while they are "OR-ed" or they are were filtering partial histograms ([demo](a74a72f)). * This feature is not stopping collectors (Prometheus) to scrape the filtered out series, it only NOT send them forward. This limits the use of them for collector efficiency scenarios. * We have evidences of users already starting to "misconfigure" their collection with this field, but they were "lucky" those filters are accidentally turned off. "Fixing" them will immediately break those users in a hidden way. * Finally, better alternatives exists https://cloud.google.com/stackdriver/docs/managed-prometheus/setup-managed#filter-metrics This feature, for dynamic config based setting in export pkg is already deprecated: GoogleCloudPlatform/prometheus#237 For security hardening, when introducing reloadable config pieces (compression, credentials and matchers) in 0.14 we updated export package to load things from the correct place, but the matchers are initialized and copied into seriesCache and never updated later: https://github.com/GoogleCloudPlatform/prometheus-engine/blob/10c5314b02cc99bd0ee2e71f2588b7aac870c329/pkg/export/export.go#L419 This affects both collector and rule-eval AFAIK. We didn't have a good tests to test this e2e too. AIs: * [X] Update public docs * [x] Remove this functionality (this PR and future) * [x] Ensure proper e2e test coverage of compression option (credentialFile is tested). * [X] Add this deprecation to the 0.14 changelog NOTE: We don't plan to add deprecation warning to 0.15. Signed-off-by: bwplotka <bwplotka@google.com>
|
Given new revelations, let's reconsider this (: |
After time we realized that a bug caused the operator config export filtering logic to be not used from the GMP 0.14 release onwards. We decided to keep this field NOT applicable (changing this field being noop) going forward, so this PR makes the deprecation/removal of this functionality clear with the operation and export code removed.
This feature, for dynamic config based setting in export pkg is already deprecated: GoogleCloudPlatform/prometheus#237
Post-mortem
For security hardening, when introducing reloadable config pieces (compression, credentials and matchers) in 0.14 we updated export package to load things from the correct place, but the matchers are initialized and copied into seriesCache and never updated later:
prometheus-engine/pkg/export/export.go
Line 419 in 10c5314
This affects both collector and rule-eval AFAIK.
We didn't have a good tests to test this e2e too.
AIs:
NOTE: We don't plan to add deprecation warning to 0.15.