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

Do not sort targets from mirrord ls based on string values, instead let the iterator chain handle it. #2732

Merged
merged 6 commits into from
Sep 6, 2024

Conversation

meowjesty
Copy link
Member

Remove a string sort that we had in the targets, when running mirrord ls. We have a neat chain of iterators that sorts the targets by type, starting with pods, which is nicer than alphabetical ordering.

@meowjesty meowjesty linked an issue Sep 4, 2024 that may be closed by this pull request
@Razz4780
Copy link
Contributor

Razz4780 commented Sep 5, 2024

Note - targets are still sorted in the plugin here

@aviramha
Copy link
Member

aviramha commented Sep 5, 2024

Can we switch the order so deployments will always be first?

@Razz4780
Copy link
Contributor

Razz4780 commented Sep 5, 2024

Can we switch the order so deployments will always be first?

Maybe deployments -> rollouts -> whatever?

@aviramha
Copy link
Member

aviramha commented Sep 5, 2024

Can we switch the order so deployments will always be first?

Maybe deployments -> rollouts -> whatever?

sure

@meowjesty
Copy link
Member Author

I don't have any rollout, but cli now presents it like this:

$ mirrord ls
["deployment/sample-python-deployment","statefulset/web","cronjob/autoquit-cronjob","pod/sample-python-deployment-796d8bcd4f-zv62c","pod/web-0","pod/web-1"]

And the extension:

image

Copy link
Contributor

@Razz4780 Razz4780 left a comment

Choose a reason for hiding this comment

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

Only comment needs an update 👍

mirrord/cli/src/main.rs Outdated Show resolved Hide resolved
meowjesty and others added 2 commits September 6, 2024 11:57
Co-authored-by: Michał Smolarek <34063647+Razz4780@users.noreply.github.com>
@meowjesty meowjesty added this pull request to the merge queue Sep 6, 2024
Merged via the queue into metalbear-co:main with commit e7211c5 Sep 6, 2024
17 checks passed
@meowjesty meowjesty deleted the issue/147/sort-targets branch September 6, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mirrord lists cronjob first
3 participants