-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Miscellaneous improvements to option.NewNamedMapOptions #40529
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Remove a potential pitfall and ensure that NewMapOptions correctly initializes the given map if nil, so that the values can be set properly. Currently, instead, the map is initialized, but the original pointer is not updated, which means that the caller has no ways to see the configured values. Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
The name parameter is only assigned, but never read, so we can drop it to simplify the callers. Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
Rework the NewMapOptions validator to actually perform validation only, rather than possibly mutating the values as well. Indeed, all validators are always passing through the given value, except the BPFMapEventBuffers one, but the returned values are never read in that case. Additionally, let's make the set of validators variadic, so that we can drop the nil parameter from all callers that don't set a validator. Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
/test |
tklauser
approved these changes
Jul 15, 2025
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.
Nice!
asauber
approved these changes
Jul 16, 2025
thorn3r
approved these changes
Jul 16, 2025
zocimek
added a commit
to zocimek/home-ops
that referenced
this pull request
Aug 25, 2025
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [aqua:cilium/cilium-cli](https://redirect.github.com/cilium/cilium-cli) | patch | `0.18.5` -> `0.18.6` | --- ### Release Notes <details> <summary>cilium/cilium-cli (aqua:cilium/cilium-cli)</summary> ### [`v0.18.6`](https://redirect.github.com/cilium/cilium-cli/releases/tag/v0.18.6) [Compare Source](https://redirect.github.com/cilium/cilium-cli/compare/v0.18.5...v0.18.6) #### What's Changed **Minor Changes:** - Cilium uninstall now removes annotations from Kubernetes nodes when clean-cilium-state: true ([cilium/cilium#39931](https://redirect.github.com/cilium/cilium/issues/39931), [@​AritraDey-Dev](https://redirect.github.com/AritraDey-Dev)) - Deprecate `v2alpha1` version of `CiliumLoadBalancerIPPool` CRD in favor of the `v2` version ([cilium/cilium#39134](https://redirect.github.com/cilium/cilium/issues/39134), [@​pippolo84](https://redirect.github.com/pippolo84)) **Bugfixes:** - Fix bug where we would display the Max Seq. Number for IPsec on 32bits. ([cilium/cilium#40622](https://redirect.github.com/cilium/cilium/issues/40622), [@​pchaigno](https://redirect.github.com/pchaigno)) **CI Changes:** - Add l7 proxy check for `to-fqdns` connectivity test ([cilium/cilium#40549](https://redirect.github.com/cilium/cilium/issues/40549), [@​vipul-21](https://redirect.github.com/vipul-21)) - cli: switch coredns image to registry.k8s.io, and fix renovate ([cilium/cilium#40706](https://redirect.github.com/cilium/cilium/issues/40706), [@​giorio94](https://redirect.github.com/giorio94)) - connectivity: Allow customization of tcpdump kill timeout ([cilium/cilium#40774](https://redirect.github.com/cilium/cilium/issues/40774), [@​gentoo-root](https://redirect.github.com/gentoo-root)) - connectivity: rework sniffer to execute tcpdump in background ([cilium/cilium#40487](https://redirect.github.com/cilium/cilium/issues/40487), [@​smagnani96](https://redirect.github.com/smagnani96)) **Misc Changes:** - chore(deps): update docker.io/library/golang:1.24.4 docker digest to [`20a022e`](https://redirect.github.com/cilium/cilium-cli/commit/20a022e) (main) ([cilium/cilium#40379](https://redirect.github.com/cilium/cilium/issues/40379), [@​cilium-renovate](https://redirect.github.com/cilium-renovate)\[bot]) - chore(deps): update docker.io/library/golang:1.24.5 docker digest to [`ef5b4be`](https://redirect.github.com/cilium/cilium-cli/commit/ef5b4be) (main) ([cilium/cilium#40738](https://redirect.github.com/cilium/cilium/issues/40738), [@​cilium-renovate](https://redirect.github.com/cilium-renovate)\[bot]) - chore(deps): update go to v1.24.5 (main) ([cilium/cilium#40496](https://redirect.github.com/cilium/cilium/issues/40496), [@​cilium-renovate](https://redirect.github.com/cilium-renovate)\[bot]) - cilium-cli: Print partial output upon `bgp peers` errors ([cilium/cilium#40278](https://redirect.github.com/cilium/cilium/issues/40278), [@​rastislavs](https://redirect.github.com/rastislavs)) - cilium-cli: Update default network-perf image ([cilium/cilium#40376](https://redirect.github.com/cilium/cilium/issues/40376), [@​HadrienPatte](https://redirect.github.com/HadrienPatte)) - cilium-cli: Use slim k8s packages for connectivity tests ([cilium/cilium#40708](https://redirect.github.com/cilium/cilium/issues/40708), [@​HadrienPatte](https://redirect.github.com/HadrienPatte)) - Fix misc typos ([cilium/cilium#40769](https://redirect.github.com/cilium/cilium/issues/40769), [@​HadrienPatte](https://redirect.github.com/HadrienPatte)) - go.mod, vendor: pull in charts for Cilium 1.18.0 and Tetragon 1.5.0 ([cilium/cilium#40823](https://redirect.github.com/cilium/cilium/issues/40823), [@​tklauser](https://redirect.github.com/tklauser)) - Miscellaneous improvements to option.NewNamedMapOptions ([cilium/cilium#40529](https://redirect.github.com/cilium/cilium/issues/40529), [@​giorio94](https://redirect.github.com/giorio94)) - The unableTranslateCIDRgroups variable is removed as it is not used since the v1.17 release ([cilium/cilium#40267](https://redirect.github.com/cilium/cilium/issues/40267), [@​Surya-7890](https://redirect.github.com/Surya-7890)) - vendor: Update github.com/google/go-github to v73 ([cilium/cilium#40326](https://redirect.github.com/cilium/cilium/issues/40326), [@​HadrienPatte](https://redirect.github.com/HadrienPatte)) - Update stable release to v0.18.5 by [@​tklauser](https://redirect.github.com/tklauser) in [https://github.com/cilium/cilium-cli/pull/3060](https://redirect.github.com/cilium/cilium-cli/pull/3060) - chore(deps): update docker.io/library/golang:1.24.4 docker digest to [`20a022e`](https://redirect.github.com/cilium/cilium-cli/commit/20a022e) by [@​renovate](https://redirect.github.com/renovate)\[bot] in[https://github.com/cilium/cilium-cli/pull/3061](https://redirect.github.com/cilium/cilium-cli/pull/3061)1 - Update RELEASE.md by [@​michi-covalent](https://redirect.github.com/michi-covalent) in [https://github.com/cilium/cilium-cli/pull/3062](https://redirect.github.com/cilium/cilium-cli/pull/3062) - chore(deps): update golang docker tag to v1.24.5 by [@​renovate](https://redirect.github.com/renovate)\[bot] in[https://github.com/cilium/cilium-cli/pull/3063](https://redirect.github.com/cilium/cilium-cli/pull/3063)3 - chore(deps): update go to v1.24.5 (patch) by [@​renovate](https://redirect.github.com/renovate)\[bot] in[https://github.com/cilium/cilium-cli/pull/3065](https://redirect.github.com/cilium/cilium-cli/pull/3065)5 - chore(deps): update golangci/golangci-lint docker tag to v2.2.2 by [@​renovate](https://redirect.github.com/renovate)\[bot] in[https://github.com/cilium/cilium-cli/pull/3066](https://redirect.github.com/cilium/cilium-cli/pull/3066)6 - chore(deps): update dependency cilium/cilium to v1.17.6 by [@​renovate](https://redirect.github.com/renovate)\[bot] in[https://github.com/cilium/cilium-cli/pull/3068](https://redirect.github.com/cilium/cilium-cli/pull/3068)8 - chore(deps): update golang:1.24.5-alpine3.21 docker digest to [`3ebc008`](https://redirect.github.com/cilium/cilium-cli/commit/3ebc008) by [@​renovate](https://redirect.github.com/renovate)\[bot] in[https://github.com/cilium/cilium-cli/pull/3067](https://redirect.github.com/cilium/cilium-cli/pull/3067)7 - chore(deps): update golang:1.24.5-alpine3.21 docker digest to [`72ff633`](https://redirect.github.com/cilium/cilium-cli/commit/72ff633) by [@​renovate](https://redirect.github.com/renovate)\[bot] in[https://github.com/cilium/cilium-cli/pull/3069](https://redirect.github.com/cilium/cilium-cli/pull/3069)9 - chore(deps): update golang:1.24.5-alpine3.21 docker digest to [`6edc205`](https://redirect.github.com/cilium/cilium-cli/commit/6edc205) by [@​renovate](https://redirect.github.com/renovate)\[bot] in[https://github.com/cilium/cilium-cli/pull/3070](https://redirect.github.com/cilium/cilium-cli/pull/3070)0 - chore(deps): update golangci/golangci-lint docker tag to v2.3.0 - autoclosed by [@​renovate](https://redirect.github.com/renovate)\[bot] in[https://github.com/cilium/cilium-cli/pull/3071](https://redirect.github.com/cilium/cilium-cli/pull/3071)1 - chore(deps): update dependency cilium/cilium to v1.18.0 by [@​renovate](https://redirect.github.com/renovate)\[bot] in[https://github.com/cilium/cilium-cli/pull/3073](https://redirect.github.com/cilium/cilium-cli/pull/3073)3 - chore(deps): update docker.io/library/golang:1.24.5 docker digest to [`ef5b4be`](https://redirect.github.com/cilium/cilium-cli/commit/ef5b4be) by [@​renovate](https://redirect.github.com/renovate)\[bot] in[https://github.com/cilium/cilium-cli/pull/3072](https://redirect.github.com/cilium/cilium-cli/pull/3072)2 - Prepare for v0.18.6 release by [@​tklauser](https://redirect.github.com/tklauser) in [https://github.com/cilium/cilium-cli/pull/3074](https://redirect.github.com/cilium/cilium-cli/pull/3074) **Full Changelog**: cilium/cilium-cli@v0.18.5...v0.18.6 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/zocimek/home-ops). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS40My41IiwidXBkYXRlZEluVmVyIjoiNDEuNDYuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsidHlwZS9wYXRjaCJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Łukasz Pospiech <zocimek@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cilium-cli
This PR contains changes related with cilium-cli
kind/cleanup
This includes no functional changes.
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
release-note/misc
This PR makes changes that have no direct user impact.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Remove a few pitfalls associated with
option.NewNamedMapOptions
, and simplify its API surface. Please refer to the individual commits for additional details.