-
Notifications
You must be signed in to change notification settings - Fork 1.2k
refactor: replace experimental maps
and slices
with stdlib
#6372
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
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 <engzerjun@gmail.com>
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
/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 <wozniak.jan@gmail.com>
/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 <engzerjun@gmail.com> Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com> Co-authored-by: Jan Wozniak <wozniak.jan@gmail.com>
…ore#6372) Signed-off-by: Eng Zer Jun <engzerjun@gmail.com> Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com> Co-authored-by: Jan Wozniak <wozniak.jan@gmail.com>
…ore#6372) Signed-off-by: Eng Zer Jun <engzerjun@gmail.com> Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com> Co-authored-by: Jan Wozniak <wozniak.jan@gmail.com> Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
* fix: CVE-2024-45337 (#6422) Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * :fix: ensure consistent JSON log format for automaxprocs (#6335) * fix: ensure consistent JSON log format for automaxprocs Signed-off-by: Omer Aplatony <omerap12@gmail.com> * moved to Unreleased Signed-off-by: Omer Aplatony <omerap12@gmail.com> --------- Signed-off-by: Omer Aplatony <omerap12@gmail.com> Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * Upgrade to the latest new-relic-go v2 client (#6325) Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * refactor: replace experimental `maps` and `slices` with stdlib (#6372) Signed-off-by: Eng Zer Jun <engzerjun@gmail.com> Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com> Co-authored-by: Jan Wozniak <wozniak.jan@gmail.com> Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * fix: Selenium Grid scaler exposes sum of pending and ongoing sessions to KDEA (#6368) Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * 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 <Marten.Svantesson@ticket.se> Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * fix: Paused ScaledObject count is reported correctly after operator restart (#6322) Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * update changelog Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * Bump go and deps (#6434) * Bump go and deps Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * bump golang.org/x/net Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * Add missing permissions to code-scaners Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * update release tracker Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * fix aws scaler Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * Pass theregion Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * Pass theregion Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * fix aws tests Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * fix aws tests Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * Update AWS admission probes Signed-off-by: Jorge Turrado <jorge.turrado@scrm.lidl> --------- Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> Signed-off-by: Jorge Turrado <jorge.turrado@scrm.lidl> * commit last vendored deps Signed-off-by: Jorge Turrado <jorge.turrado@scrm.lidl> * 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 <nguyenducviet4496@gmail.com> * Update CHANGELOG Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com> * Fix e2e template test Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com> * Change imagePullPolicy to Always to take latest change Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com> * Update platformName default value as empty Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com> --------- Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com> Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * add missing change Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> --------- Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> Signed-off-by: Omer Aplatony <omerap12@gmail.com> Signed-off-by: Eng Zer Jun <engzerjun@gmail.com> Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com> Signed-off-by: Mårten Svantesson <Marten.Svantesson@ticket.se> Signed-off-by: Jorge Turrado <jorge.turrado@scrm.lidl> Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com> Co-authored-by: Omer Aplatony <omerap12@gmail.com> Co-authored-by: smcavallo <smcavallo@users.noreply.github.com> Co-authored-by: Eng Zer Jun <engzerjun@gmail.com> Co-authored-by: Jan Wozniak <wozniak.jan@gmail.com> Co-authored-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com> Co-authored-by: Mårten Svantesson <marten.svantesson@ticket.se>
…ore#6372) Signed-off-by: Eng Zer Jun <engzerjun@gmail.com> Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com> Co-authored-by: Jan Wozniak <wozniak.jan@gmail.com> Signed-off-by: Chirag Bhatia <chiragbhatia8@gmail.com>
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