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

Don't set --last if --input-file is specified #1153

Merged
merged 1 commit into from Jul 26, 2023

Conversation

michi-covalent
Copy link
Collaborator

Don't set --last to 20 if --input-file flag is specified to preserve the previous default behavior of processing all the flows from stdin.

@michi-covalent michi-covalent requested a review from a team as a code owner July 26, 2023 20:53
@michi-covalent michi-covalent requested review from chancez and removed request for a team July 26, 2023 20:53
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label PR is blocked until the release note is set label Jul 26, 2023
@michi-covalent michi-covalent added the release-note/misc This PR makes changes that have no direct user impact. label Jul 26, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label PR is blocked until the release note is set label Jul 26, 2023
@michi-covalent
Copy link
Collaborator Author

looking into the test failure 😶‍🌫️

@@ -174,3 +174,12 @@ func Test_getFlowsRequest_ExperimentalFieldMask_non_json_output(t *testing.T) {
err := handleFlowArgs(os.Stdout, filter, false)
assert.ErrorContains(t, err, "not compatible")
}

// Don't set the number flag in GetFlowsRequest if --input-file is specified
func Test_getFlowsRequestWithInputFile(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have a test where --last is used with --input-file too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good idea 🥰

Don't set --last to 20 if --input-file flag is specified to preserve the
previous default behavior of processing all the flows from stdin.

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
@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 Jul 26, 2023
@chancez chancez merged commit e6cd049 into main Jul 26, 2023
5 checks passed
@chancez chancez deleted the pr/michi/input-file-struggle branch July 26, 2023 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants