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

cilium/cmd: make output of 'cilium policy selectors' sorted. #27803

Merged

Conversation

tommyp1ckles
Copy link
Contributor

Previously, the output would be sent in no particular order, thus when running the 'policy selectors' command output would often be printed in different order. This makes it hard to compare subsequent outputs.

This PR simply sorts output by selector string before it is printed to make the ordering stable.

@tommyp1ckles tommyp1ckles added release-note/minor This PR changes functionality that users may find relevant to operating Cilium. area/cli Impacts the command line interface of any command in the repository. labels Aug 29, 2023
@tommyp1ckles tommyp1ckles marked this pull request as ready for review August 29, 2023 16:29
@tommyp1ckles tommyp1ckles requested a review from a team as a code owner August 29, 2023 16:29
@tommyp1ckles
Copy link
Contributor Author

/test

@joestringer
Copy link
Member

Minor nit: I'd consider this API unstable, but I think you're communicating that the output should be sorted. I agree with that :-)

@tommyp1ckles tommyp1ckles force-pushed the pr/tp/make-selector-output-stable branch from f63cacb to e6c4117 Compare August 29, 2023 22:24
@tommyp1ckles
Copy link
Contributor Author

/test

@tommyp1ckles tommyp1ckles force-pushed the pr/tp/make-selector-output-stable branch from e6c4117 to 4c979a1 Compare August 30, 2023 05:46
@tommyp1ckles
Copy link
Contributor Author

/test

@tommyp1ckles tommyp1ckles changed the title cilium/cmd: make output of 'cilium policy selectors' stable. cilium/cmd: make output of 'cilium policy selectors' sorted. Aug 30, 2023
@tommyp1ckles
Copy link
Contributor Author

@joestringer updated commit so people don't get the wrong idea

Copy link
Contributor

@derailed derailed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, the output would be sent in no particular order, thus when
running the 'policy selectors' command output would often be printed in different order.
This makes it hard to compare subsequent outputs.

This PR simply sorts output by selector string before it is printed to make the ordering
stable.

Signed-off-by: Tom Hadlaw <tom.hadlaw@isovalent.com>
@tommyp1ckles tommyp1ckles force-pushed the pr/tp/make-selector-output-stable branch from 4c979a1 to 1432279 Compare August 30, 2023 21:50
@tommyp1ckles
Copy link
Contributor Author

/test

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Aug 31, 2023
@borkmann borkmann merged commit 4b13347 into cilium:main Aug 31, 2023
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Impacts the command line interface of any command in the repository. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/minor This PR changes functionality that users may find relevant to operating Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants