-
Notifications
You must be signed in to change notification settings - Fork 255
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
Conversation
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 |
There was a problem hiding this 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:
- Please sign-off the commit
- 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 someselectorOpts
fields, then callgetFlowsRequest
, and finally test assumptions about the returned values.
if first && selectorOpts.follow { | ||
return nil, fmt.Errorf("cannot set both --first and --follow") | ||
} |
There was a problem hiding this comment.
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 Yeah I am working on it |
@sladyn98 Any plans to get this done or should we re-assign? |
Closing due to inactivity. Feel free to re-open if you start working on it again. |
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