-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
promhttp: Isolate zstd support and klauspost/compress library use to promhttp/zstd package #1765
Conversation
3f0f789
to
7a4928d
Compare
…promhttp/zstd package Signed-off-by: Jordan Liggitt <[email protected]>
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'd be happy to merge this. However, this changes the current default behavior (We support zstd compression since 1.20 if it's specified in compression header).
We need to decided how to communicate this.
Or we will try to find an opt-out method. So please stay tuned for now.
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 proposing this, breaking change is one option. One line import should be easy to add app. @kakkoyun offered to release 1.22 with this and clear messaging and it's a solid idea.
cc @mrueg do you think that would work for you? It was mostly done for your use case.
However, there is perhaps one more thing I want to try: vendor https://github.com/klauspost/compress/tree/master/zstd temporarily without ASM code. We can do patch release or 1.22 (as @kakkoyun said 1.22 might be cleaner) and this should allow us to likely not break anyone, we will only make zstd ~15% slower or so, trying now.
Thanks for considering it and investigating possibilities, appreciate the help in making this module as reasonable to consume as possible |
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.
The alternative that does not break compatibility is here: #1767
I need to clean the PR, fix tests (old Dagger version), but we could do it. Blocking this PR until we have decision which path we prefer to go.
Apologies if the PR caused issues downstream. The zstd stdlib issue looked promising, so I had hoped it gets much quicker integrated there. I'm fine with this solution (and slightly would prefer the one that includes the ASM), I can adjust my code easily and I don't believe anyone else is actively using it. Appreciate the work on both PRs! |
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.
Are you around tomorrow @kakkoyun to shepherd the release? |
Do you know if there's incompatibilities from ~1.20.5 to 1.22 that would require cadvisor / etc to change usage (the relaxed label name validation in 1.21.0 doesn't seem impactful at first glance)? If not, we're fine with bumping k8s to a newer version of this library. If so, we'll need to check with maintainers of intermediate dependencies like cadvisor to see if they can pick up 1.22 and react and cut tags. |
I also opened a tmp kubernetes PR at kubernetes/kubernetes#130625 to run this change through kubernetes CI ahead of merge / tag here, just to make sure k8s build and e2e's are all happy as well |
Only the name validation, so it feels 1.22 should work for you well 👍🏽 |
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
All the required k8s e2es, unit and integration tests passed on the test PR as well, so that looks good |
This PR is a proof of concept for package isolation discussed in kubernetes/kubernetes#130569 (comment)
Eventually, zstd support is expected in the Go stdlib, but until then, making zstd support optional lets downstream consumers decide if they want to vendor / link the ~28kloc go+assembly klauspost/compress library into their build or not.
This does change default behavior for library consumers who would now have to opt into zstd support, so I'll let the client_golang maintainers decide if that's acceptable, and if so, how best to manage that change.
xref discussion at https://github.com/prometheus/client_golang/pull/1496/files#r1717633170 as well when this was introduced