-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
refactor: replace experimental maps
and slices
with stdlib
#6372
refactor: replace experimental maps
and slices
with stdlib
#6372
Conversation
The experimental functions are now available in the standard library in Go 1.21 [1] and Go 1.23 [2]. [1]: https://go.dev/doc/go1.21#slices [2]: https://go.dev/doc/go1.23#iterators Signed-off-by: Eng Zer Jun <[email protected]>
Signed-off-by: Eng Zer Jun <[email protected]>
Signed-off-by: Eng Zer Jun <[email protected]>
/run-e2e internal|opentelemetry_metrics |
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, thank you!
I thought it might happen that we will need to bump go back to 1.23 https://github.com/kedacore/keda/actions/runs/12155644728/job/33897625757?pr=6372
|
Signed-off-by: Jan Wozniak <[email protected]>
eac0f43
to
feef255
Compare
/run-e2e internal|opentelemetry_metrics |
@wozniakjan Thanks for correcting that for me 😊 |
This PR will revert the |
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.
Looking good, just a minor nit
yeah, because at that point the |
…ore#6372) Signed-off-by: Eng Zer Jun <[email protected]> Signed-off-by: Jan Wozniak <[email protected]> Co-authored-by: Jan Wozniak <[email protected]>
…ore#6372) Signed-off-by: Eng Zer Jun <[email protected]> Signed-off-by: Jan Wozniak <[email protected]> Co-authored-by: Jan Wozniak <[email protected]>
…ore#6372) Signed-off-by: Eng Zer Jun <[email protected]> Signed-off-by: Jan Wozniak <[email protected]> Co-authored-by: Jan Wozniak <[email protected]> Signed-off-by: Jorge Turrado <[email protected]>
* fix: CVE-2024-45337 (#6422) Signed-off-by: Jorge Turrado <[email protected]> * :fix: ensure consistent JSON log format for automaxprocs (#6335) * fix: ensure consistent JSON log format for automaxprocs Signed-off-by: Omer Aplatony <[email protected]> * moved to Unreleased Signed-off-by: Omer Aplatony <[email protected]> --------- Signed-off-by: Omer Aplatony <[email protected]> Signed-off-by: Jorge Turrado <[email protected]> * Upgrade to the latest new-relic-go v2 client (#6325) Signed-off-by: Jorge Turrado <[email protected]> * refactor: replace experimental `maps` and `slices` with stdlib (#6372) Signed-off-by: Eng Zer Jun <[email protected]> Signed-off-by: Jan Wozniak <[email protected]> Co-authored-by: Jan Wozniak <[email protected]> Signed-off-by: Jorge Turrado <[email protected]> * fix: Selenium Grid scaler exposes sum of pending and ongoing sessions to KDEA (#6368) Signed-off-by: Jorge Turrado <[email protected]> * fix: scaledjobs stuck as not ready (#6329) since code was missing for setting a scaledjob as ready it was stuck as unready if there ever was a problem This is a fix for a regression in #5916 Signed-off-by: Mårten Svantesson <[email protected]> Signed-off-by: Jorge Turrado <[email protected]> * fix: Paused ScaledObject count is reported correctly after operator restart (#6322) Signed-off-by: Jorge Turrado <[email protected]> * update changelog Signed-off-by: Jorge Turrado <[email protected]> * Bump go and deps (#6434) * Bump go and deps Signed-off-by: Jorge Turrado <[email protected]> * bump golang.org/x/net Signed-off-by: Jorge Turrado <[email protected]> * Add missing permissions to code-scaners Signed-off-by: Jorge Turrado <[email protected]> * update release tracker Signed-off-by: Jorge Turrado <[email protected]> * fix aws scaler Signed-off-by: Jorge Turrado <[email protected]> * Pass theregion Signed-off-by: Jorge Turrado <[email protected]> * Pass theregion Signed-off-by: Jorge Turrado <[email protected]> * fix aws tests Signed-off-by: Jorge Turrado <[email protected]> * fix aws tests Signed-off-by: Jorge Turrado <[email protected]> * Update AWS admission probes Signed-off-by: Jorge Turrado <[email protected]> --------- Signed-off-by: Jorge Turrado <[email protected]> Signed-off-by: Jorge Turrado <[email protected]> * commit last vendored deps Signed-off-by: Jorge Turrado <[email protected]> * fix: Selenium Grid in case multiple scaler triggers are activate (#6437) * fix: Selenium Grid scaler avoids overlapping when multiple browserVersion triggers are active Signed-off-by: Viet Nguyen Duc <[email protected]> * Update CHANGELOG Signed-off-by: Viet Nguyen Duc <[email protected]> * Fix e2e template test Signed-off-by: Viet Nguyen Duc <[email protected]> * Change imagePullPolicy to Always to take latest change Signed-off-by: Viet Nguyen Duc <[email protected]> * Update platformName default value as empty Signed-off-by: Viet Nguyen Duc <[email protected]> --------- Signed-off-by: Viet Nguyen Duc <[email protected]> Signed-off-by: Jorge Turrado <[email protected]> * add missing change Signed-off-by: Jorge Turrado <[email protected]> --------- Signed-off-by: Jorge Turrado <[email protected]> Signed-off-by: Omer Aplatony <[email protected]> Signed-off-by: Eng Zer Jun <[email protected]> Signed-off-by: Jan Wozniak <[email protected]> Signed-off-by: Mårten Svantesson <[email protected]> Signed-off-by: Jorge Turrado <[email protected]> Signed-off-by: Viet Nguyen Duc <[email protected]> Co-authored-by: Omer Aplatony <[email protected]> Co-authored-by: smcavallo <[email protected]> Co-authored-by: Eng Zer Jun <[email protected]> Co-authored-by: Jan Wozniak <[email protected]> Co-authored-by: Viet Nguyen Duc <[email protected]> Co-authored-by: Mårten Svantesson <[email protected]>
The experimental functions are now part of the standard library as of Go 1.21 and Go 1.23.
The key difference is that
maps.Keys
andmaps.Values
in thegolang.org/x/exp
package return a slice, whereasmaps.Keys
andmaps.Values
in the standard library return an iterator. To work with slices, we need to useslices.Collect
to convert the iterator into a slice.Reference: https://go.dev/doc/go1.21#slices
Reference: https://go.dev/doc/go1.23#iterators
Checklist