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

Make port print --format elements order-independent #1356

Closed
mieubrisse opened this issue Sep 20, 2023 · 0 comments · Fixed by #1359
Closed

Make port print --format elements order-independent #1356

mieubrisse opened this issue Sep 20, 2023 · 0 comments · Fixed by #1359
Labels

Comments

@mieubrisse
Copy link
Collaborator

Background & motivation

$ kurtosis port print --format ip,protocol,number tired-knoll postgres postgresql
127.0.0.1postgresql://:64615

I can't think of a usecase where we'd want to out-of-order the elements (and if the user really wants to do it they can just inline two separate kurtosis port print calls in the same way

Desired behaviour

The elems to --format are order-independent:

$ kurtosis port print --format ip,protocol,number tired-knoll postgres postgresql
postgresql://127.0.0.1:64615


### How important is this to you?

Nice to have; this feature would make using Kurtosis more enjoyable.
@github-actions github-actions bot added the nice to have Nice to have feature label Sep 20, 2023
@mieubrisse mieubrisse changed the title Make port print --format order-independent Make port print --format elements order-independent Sep 20, 2023
victorcolombo added a commit that referenced this issue Sep 21, 2023
## Description:
<!-- Describe this change, how it works, and the motivation behind it.
-->
This PR introduces:
- Argument order validation check
- Custom formatting when only one value is specified on format string
- Unit tests for formatting functions
- CI test for the CLI command

This PR also fixes the default flag of the command

## Is this change user facing?
YES
<!-- If yes, please add the "user facing" label to the PR -->
<!-- If yes, don't forget to include docs changes where relevant -->

## References (if applicable):
<!-- Add relevant Github Issues, Discord threads, or other helpful
information. -->
Closes #1355 
Closes #1356  
Closes #1357
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant