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

observe: Support -f and --first at the same time #1010

Closed
wants to merge 1 commit into from

Conversation

sladyn98
Copy link

@sladyn98 sladyn98 commented May 3, 2023

This PR removes the safeguard for support for -f and --first at the same time. This would support the following PR in the cilium repository as well to make sure the server supports it as well

Refers to #959

@sladyn98 sladyn98 requested a review from a team as a code owner May 3, 2023 22:41
@sladyn98 sladyn98 requested review from chancez and removed request for a team May 3, 2023 22:41
@maintainer-s-little-helper
Copy link

Commit 67132c0 does not contain "Signed-off-by".

Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/contributing/#developer-s-certificate-of-origin

@chancez chancez added the release-note/minor This PR introduces functionality that users may find relevant to operating Hubble. label May 3, 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 May 3, 2023
@kaworu kaworu self-requested a review May 5, 2023 08:06
Copy link
Member

@kaworu kaworu left a comment

Choose a reason for hiding this comment

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

Hello @sladyn98 and thanks for the PR! Couple of things:

  1. Please sign-off the commit
  2. Please add tests on the way around the flags incompatibility. In particular, there should be one test case combining --follow and --first failing before the patch, and succeeding after. You can draw inspiration from this test which setup some selectorOpts fields, then call getFlowsRequest, and finally test assumptions about the returned values.

Comment on lines -619 to -621
if first && selectorOpts.follow {
return nil, fmt.Errorf("cannot set both --first and --follow")
}
Copy link
Member

Choose a reason for hiding this comment

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

Note for reviewers: removing this check is fine, the Hubble server currently does the same validation on the gRPC request object, and thus we'll still get an error if the server doesn't support combining --first and --follow.

@chancez
Copy link
Contributor

chancez commented May 22, 2023

@sladyn98 Are you able to make the changes as requested by @kaworu ?

@sladyn98
Copy link
Author

@chancez Yeah I am working on it

@rolinh
Copy link
Member

rolinh commented Jul 13, 2023

@sladyn98 Any plans to get this done or should we re-assign?

@chancez
Copy link
Contributor

chancez commented Aug 22, 2023

Closing due to inactivity. Feel free to re-open if you start working on it again.

@chancez chancez closed this Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dont-merge/needs-sign-off release-note/minor This PR introduces functionality that users may find relevant to operating Hubble.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants