-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: implement timestamp callback plugin to show simple timestamp for each header #8308
feat: implement timestamp callback plugin to show simple timestamp for each header #8308
Conversation
Fixed issues for license and type annotation that caused CI to fail. Sorry for my trivial mistakes. |
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.
Thanks for your contribution!
I would probably add a seealso
reference to the ansible.posix.profile_tasks callback (https://github.com/ansible-collections/ansible.posix/blob/main/plugins/callback/profile_tasks.py).
@felixfontein |
Sorry for massive updates, I've corrected invalid links ( |
@felixfontein Any opinions on whether this failure should be ignored, or fixed in some way? Thanks! |
Please add ignore entries to
(Please make sure to insert them alphabetically, i.e. before the first lookup.) |
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
@felixfontein |
Rebasing is not needed. It's only needed when you have conflicts, or you need code that's already in |
Aww, I was confusing the rules with other repositories, sorry for annoying you 😞 |
No worries! Rebasing doesn't hurt, and you definitely didn't annoy me :) |
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.
Looks good to me! If nobody objects, I'll merge this in ~a week.
LGTM |
bb73f28
into
ansible-collections:main
…r each header (ansible-collections#8308) * feat: add community.general.timestamp callback plugin * feat: add minimal integration tests for timestamp callback plugin * feat: add maintainers for timestamp callback plugin * fix: correct license * fix: remove type annotation for the older python environment * fix: remove unnecessary comment Co-authored-by: Felix Fontein <felix@fontein.de> * fix: add trailing period Co-authored-by: Felix Fontein <felix@fontein.de> * fix: split long description into list Co-authored-by: Felix Fontein <felix@fontein.de> * fix: remove default and add type Co-authored-by: Felix Fontein <felix@fontein.de> * fix; add type Co-authored-by: Felix Fontein <felix@fontein.de> * fix: split long description into list Co-authored-by: Felix Fontein <felix@fontein.de> * fix: improve description for format_string to describe usable format codes * fix: clarify the original codes and add copyright from that * fix: shorten long lines * fix: correct link format * fix: add seealso section * fix: add ignore entries for EOL CI * fix: update seealso to correctly associate with related plugin Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
SUMMARY
This PR introduce new callback plugin to show simple timestamp for each header line.
This plugin reduces the number of
*
's in the header by the number of characters in the timestamp, and display the timestamp on the far right.On the output screen of an AWX job, a timestamp appears in each header by default. This PR implements this timestamp idea as a callback plugin.
There is a plugin that can be used for a similar purpose,
ansible.posix.profile_tasks
, but it adds a new line for displaying the timestamps, which complicates the output.The plugin in this PR is as simple as possible and provides only minimal information, so it is not at all obtrusive to keep it enabled at all times.
Available options:
timezone
: Users can specify timezone for the timestamp. This is helpful for containerized ansible environment. Ignored on Python < 3.9format_string
: The format string for timestampISSUE TYPE
COMPONENT NAME
timestamp
ADDITIONAL INFORMATION
Tested with:
This is the first time for me to send PR for this collection. I have a few concerns and would love to hear any input. Thanks!
callback
role like other callback plugins because the timestamp changes each time it is executed. For this reason I am only testing that the timestamp format is given a fixed string and that at least the timestamp is displayed in the proper position without the header line being folded back (this is the core feature of this plugin that has to be tested at least). Should I implement the test more rigorously?If this should not continue, feel free to close it. Thanks in advance! 😃