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
job_status: Convert datetime objects into formatted strings #61043
Conversation
Backport `schedule.job_status` from version 3003 (commit 291912b). Also include my improvemements: * Add missing job_name to schedule.job_status example saltstack#61041 * job_status: Convert datetime objects into formatted strings saltstack#61043 Forwarded: not-needed Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
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.
this will require a changelog and test coverage.
`salt-call schedule.job_status` will return empty values for the `datetime.datetime` objects. So convert the `datetime.datetime` objects into formatted strings. Then they will be shown correctly: ``` $ sudo salt-call schedule.job_status backup local: ---------- _next_fire_time: 2021-10-13T15:10:18 _next_scheduled_fire_time: 2021-10-13T15:10:00 _run: True _splay: 2021-10-13T15:10:18 args: - run_backup function: state.sls name: backup splay: 60 when: 15:10 ``` Forwarded: saltstack#61043 Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
aac0c61
to
01724ee
Compare
Added a changelog and enhanced |
01724ee
to
33a924e
Compare
33a924e
to
4705c84
Compare
Just rebased on master |
Hi! I'm your friendly PR bot!You might be wondering what I'm doing commenting here on your PR. Yes, as a matter of fact, I am... I'm just here to help us improve the documentation. I can't respond to Okay... so what do you do? I detect modules that are missing docstrings or "CLI Example" on existing docstrings! So what does that have to do with my PR? I noticed that in this PR there are some files changed that have some of these Okay, what are they? Well, my favorite, is that since you were making changes here I'm hoping that If I can, then what? Well, you can either add them to this PR or add them to another PR. Either way is fine! Well... what if I can't, or don't want to? That's also fine! We appreciate all contributions to the Salt Project. If you Whatever approach you decide to take, just drop a comment here letting us know! Detected Issues (click me)[INFO] Initializing environment for https://github.com/saltstack/pip-tools-compile-impersonate. [INFO] Initializing environment for https://github.com/asottile/pyupgrade. [INFO] Initializing environment for https://github.com/saltstack/pre-commit-remove-import-headers. [INFO] Initializing environment for https://github.com/s0undt3ch/salt-rewrite. [INFO] Initializing environment for https://github.com/timothycrosley/isort. [INFO] Initializing environment for https://github.com/timothycrosley/isort:toml. [INFO] Initializing environment for https://github.com/psf/black. [INFO] Initializing environment for https://github.com/asottile/blacken-docs. [INFO] Initializing environment for https://github.com/asottile/blacken-docs:black==21.7b0. [INFO] Initializing environment for https://github.com/PyCQA/bandit. [INFO] Initializing environment for https://github.com/saltstack/invoke-pre-commit. [INFO] Initializing environment for https://github.com/saltstack/invoke-pre-commit:blessings,distro,jinja2,msgpack,pyyaml. [INFO] Initializing environment for https://github.com/saltstack/mirrors-nox. [INFO] Initializing environment for https://github.com/saltstack/mirrors-nox:pip>=20.2.4,<21.2,setuptools<58.0. [INFO] Installing environment for https://github.com/saltstack/invoke-pre-commit. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... Check Known Missing Docstrings...........................................Passed - hook id: invoke - duration: 1.25s Thanks again! |
Can you rebase again, Fedora 35 was removed form the pipelines until we can take the time to fix all the tests. |
Rebased. |
4705c84
to
a1590ff
Compare
`salt-call schedule.job_status` will return empty values for the `datetime.datetime` objects. So convert the `datetime.datetime` objects into formatted strings. Then they will be shown correctly: ``` $ sudo salt-call schedule.job_status __mine_interval local: ---------- _last_run: 2021-11-01T12:36:57 _next_fire_time: 2021-11-01T13:36:57 _next_scheduled_fire_time: 2021-11-01T13:36:57 _run_on_start: False _seconds: 3600 _splay: None enabled: True function: mine.update jid_include: True maxrunning: 2 minutes: 60 name: __mine_interval return_job: False run: True run_on_start: True splay: None ``` Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
a1590ff
to
f765cbf
Compare
`salt-call schedule.job_status` will return empty values for the `datetime.datetime` objects. So convert the `datetime.datetime` objects into formatted strings. Then they will be shown correctly: ``` $ sudo salt-call schedule.job_status __mine_interval local: ---------- _last_run: 2021-11-01T12:36:57 _next_fire_time: 2021-11-01T13:36:57 _next_scheduled_fire_time: 2021-11-01T13:36:57 _run_on_start: False _seconds: 3600 _splay: None enabled: True function: mine.update jid_include: True maxrunning: 2 minutes: 60 name: __mine_interval return_job: False run: True run_on_start: True splay: None ``` Forwarded: saltstack#61043 Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com> Gbp-Pq: Name job_status-Convert-datetime-objects-into-formatted-s.patch
`salt-call schedule.job_status` will return empty values for the `datetime.datetime` objects. So convert the `datetime.datetime` objects into formatted strings. Then they will be shown correctly: ``` $ sudo salt-call schedule.job_status __mine_interval local: ---------- _last_run: 2021-11-01T12:36:57 _next_fire_time: 2021-11-01T13:36:57 _next_scheduled_fire_time: 2021-11-01T13:36:57 _run_on_start: False _seconds: 3600 _splay: None enabled: True function: mine.update jid_include: True maxrunning: 2 minutes: 60 name: __mine_interval return_job: False run: True run_on_start: True splay: None ``` Forwarded: saltstack#61043 Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com> Gbp-Pq: Name job_status-Convert-datetime-objects-into-formatted-s.patch
salt-call schedule.job_status
will return empty values for thedatetime.datetime
objects. So convert thedatetime.datetime
objects into formatted strings. Then they will be shown correctly: