Skip to content

Add info for events backlog and scope#809

Closed
BretFisher wants to merge 2 commits intodocker:masterfrom
BretFisher:patch-1
Closed

Add info for events backlog and scope#809
BretFisher wants to merge 2 commits intodocker:masterfrom
BretFisher:patch-1

Conversation

@BretFisher
Copy link
Contributor

@BretFisher BretFisher commented Jan 14, 2018

Fixes #727

- What I did

  1. Add docker events description info on the two scope types of events.
  2. Add docker events note in two places about backlog limit of event log.

- How I did it
After testing and using the events feature and discovering these undocumented things, I edited some markdown lines with my bare hands :)

- How to verify it
Like @joaofnfernandes mentioned in docker/docs#5432 (comment) we may need @cpuguy83 and/or @thaJeztah to validate the 1000 message buffer limit.

- Description for the changelog

Added documentation on docker events scope and buffer limits.

- A picture of a cute animal (not mandatory but encouraged)

giphy

Signed-off-by: Bret Fisher bret@bretfisher.com

@codecov-io
Copy link

codecov-io commented Jan 14, 2018

Codecov Report

Merging #809 into master will decrease coverage by 2.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #809      +/-   ##
==========================================
- Coverage   52.95%   50.91%   -2.04%     
==========================================
  Files         244      237       -7     
  Lines       15839    15332     -507     
==========================================
- Hits         8387     7807     -580     
- Misses       6898     7025     +127     
+ Partials      554      500      -54

1. Adds `docker events` description info on the two scope types of events.
2. Adds `docker events` note in two places about backlog limit of event log.

Further info and background info in Issue #727

Signed-off-by: Bret Fisher <bret@bretfisher.com>
@docker docker deleted a comment from GordonTheTurtle Jan 15, 2018
Copy link
Collaborator

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

LGTM 🐸

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

Thanks! Left a suggestion, but let me know what you think 👍

scoped events are only seen on the node they take place on, and swarm scoped
events are seen on all managers.

Note that there is a limited backlog of events you can filter. `docker events` is
Copy link
Member

Choose a reason for hiding this comment

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

If this is a "note", this should use our standard markup for notes:

> **Note**: There is a limited backlog of events you can filter. `docker events`
> is  a rolling log, and has at most 1000 events at a time.

However, trying to preserve "notes" for exceptional cases; perhaps this can be rephrased slightly to not be a "note". Something like:

Docker uses a rolling log to store the last 1000 events, which means that at
most 1000 events at a time are returned.

(not entirely happy with that example; perhaps you have a better suggestion)

Copy link
Contributor

Choose a reason for hiding this comment

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

How about just "Only the last 1000 log events are returned. You can use filters to further limit the number of events returned."

scoped events are only seen on the node they take place on, and swarm scoped
events are seen on all managers.

Note that there is a limited backlog of events you can filter. `docker events` is
Copy link
Contributor

Choose a reason for hiding this comment

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

How about just "Only the last 1000 log events are returned. You can use filters to further limit the number of events returned."

@GordonTheTurtle
Copy link

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "patch-1" git@github.com:BretFisher/cli.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354655680
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

@BretFisher
Copy link
Contributor Author

ping @thaJeztah and @MistyHacks

Signed-off-by: Bret Fisher <bret@bretfisher.com>
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

changes LGTM, but erm.. could you squash your commits?

@mdlinville mdlinville changed the title closes #727, add info for events backlog and scope Add info for events backlog and scope Jan 30, 2018
@mdlinville
Copy link
Contributor

I updated the title to not include an issue number in it, since the title will become the commit message, and would ping issue 727 every time it hits a different branch or even gets put into a different repo (like docker/docker-ce). This kind of info is best left in the description like you already have it.

@thaJeztah
Copy link
Member

Ah, yes, bet to remove that from the commit description (GitHub is a pain in that respect) 😅

@thaJeztah
Copy link
Member

carried / squashed in #1999

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Docker Events notes about limited backlog of events and event scope.

6 participants