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

cmd/observe: do not set --last to 20 by default in follow mode #573

Merged
merged 1 commit into from
Jun 17, 2021

Conversation

rolinh
Copy link
Member

@rolinh rolinh commented Jun 17, 2021

Change the default behavior with regard to --last when in follow mode.
Previously, running hubble --debug observe --follow resulted in the
following:

$ hubble --debug observe --follow
time="2021-06-17T16:20:25+02:00" level=debug msg="Sending GetFlows request" request="number:20 follow:true"

The new behavior is changed for the following (notice that number is
not set, ie 0):

$ hubble --debug observe --follow
time="2021-06-17T16:21:02+02:00" level=debug msg="Sending GetFlows request" request="follow:true"

There are use-cases where a user is not interested in events that are
already in Hubble's ring buffer cache but only in new ones. A typical
example is when using hubble for testing, e.g. for the connectivity
test.

Note that this PR is a slight change of behavior as, when --last is
not provided, it used to always default to 20 unless --since or
--until is provided.

Change the default behavior with regard to `--last` when in follow mode.
Previously, running `hubble --debug observe --folloow` resulted in the
following:

    $ hubble --debug observe --follow
    time="2021-06-17T16:20:25+02:00" level=debug msg="Sending GetFlows request" request="number:20 follow:true"

The new behavior is changed for the following (notice that `number` is
not set, ie 0):

    $ hubble --debug observe --follow
    time="2021-06-17T16:21:02+02:00" level=debug msg="Sending GetFlows request" request="follow:true"

There are use-cases where a user is not interested in events that are
already in Hubble's ring buffer cache but only in new ones. A typical
example is when using hubble for testing, e.g. for the connectivity
test.

Note that this PR is a slight change of behavior as, when `--last` is
not provided, it used to always default to 20 unless `--since` or
`--until` is provided.

Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
@rolinh rolinh added ⌨️ area/cli Impacts the command line interface of any command in the repository. release-note/minor This PR introduces functionality that users may find relevant to operating Hubble. labels Jun 17, 2021
@rolinh rolinh requested review from gandro and ti-mo June 17, 2021 14:22
@maintainer-s-little-helper maintainer-s-little-helper bot assigned gandro and ti-mo and unassigned ti-mo Jun 17, 2021
Copy link

@ti-mo ti-mo left a comment

Choose a reason for hiding this comment

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

Thanks!

@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 Jun 17, 2021
Copy link
Collaborator

@michi-covalent michi-covalent left a comment

Choose a reason for hiding this comment

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

makes sense

@michi-covalent michi-covalent merged commit 096b151 into master Jun 17, 2021
@michi-covalent michi-covalent deleted the pr/rolinh/observe-follow-zero branch June 17, 2021 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⌨️ area/cli Impacts the command line interface of any command in the repository. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. 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