Skip to content
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

cmd/observe: stop sorting reserved identity names #798

Merged
merged 1 commit into from
Oct 13, 2022

Conversation

kaworu
Copy link
Member

@kaworu kaworu commented Oct 13, 2022

Now that we vendor a version of Cilium including cilium/cilium#20048 identity.GetAllReservedIdentities() consistently returned a sorted list already.

@kaworu kaworu added kind/enhancement This would improve or streamline existing functionality. area/misc Impacts miscellaneous areas of the code not otherwise owned by another area. release-note/misc This PR makes changes that have no direct user impact. labels Oct 13, 2022
@kaworu kaworu requested a review from chancez October 13, 2022 15:34
@kaworu kaworu requested a review from a team as a code owner October 13, 2022 15:34
@kaworu kaworu requested review from michi-covalent and removed request for a team October 13, 2022 15:34
Now that we vendor a version of Cilium including
cilium/cilium#20048
identity.GetAllReservedIdentities() consistently returned a sorted list
already.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
@kaworu
Copy link
Member Author

kaworu commented Oct 13, 2022

See

// Because our reservedIdentities source is a go map, and go map order is
// randomized, we need to sort the resulting slice before returning it.
sort.Slice(identities, func(i, j int) bool {
return identities[i].Uint32() < identities[j].Uint32()
})
for the vendored identity.GetAllReservedIdentities()

@rolinh rolinh merged commit a7fd656 into master Oct 13, 2022
@rolinh rolinh deleted the pr/kaworu/dont-sort-reserved-identities-names branch October 13, 2022 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/misc Impacts miscellaneous areas of the code not otherwise owned by another area. kind/enhancement This would improve or streamline existing functionality. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants