You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry about the title, unsure how to summarise this problem into a brief sentence!
Environment
Nautobot version (Docker tag too if applicable): v2.4.4
Python version: 3.11
Database platform, version: Postgres
Middleware(s): Redis
Steps to Reproduce
Create a Job, make this Job Approval Required
Run the Job, set it to be "run immediately"
Approve the Job, no pop up will occur even though the Job scheduled run time is in the past
Observe that the Job is set to run in the past, as the run time is determined when the original request to run the job is created
Observe that the Job is "one off" false
The job is stuck in Scheduled Jobs and will never run
Expected Behavior
A job that is sent for approval that is set to be "run immediately" should be correctly flagged as one off, so that the pop up is received when approval is attempted, and ran once approved.
Additionally, if run immediately, the job should ideally not be scheduled, but instead triggered to be ran as it is successfully approved (this would somewhat mimic the dry run logic of a job to be approved, where it is enqueued). However, if scheduled, it should be scheduled in such a way that it will run once approved.
Observed Behavior
Job is approved with no pop up even though it is in the past, and it is stuck in the Scheduled jobs queue. This results in Jobs that follow the process of Creation -> Approval -> Approve -> Scheduled, when set to be "Run Immeditately" are never actually ran and lost.
Additionally, it also looks to always show an empty job queue value in the approval screen for the job, even if a default job queue is selected or a job queue value is provided in the jobs run creation.
Note: Celery-beat is confirmed to be on, and other Scheduled Jobs are being triggered daily while this problem is being observed.
Hi :) Thanks for reporting this bug! I was able to reproduce this locally. The same goes to the missing job queue selected, but I decided to split this into separate issue #7043
Sorry about the title, unsure how to summarise this problem into a brief sentence!
Environment
Steps to Reproduce
Expected Behavior
A job that is sent for approval that is set to be "run immediately" should be correctly flagged as one off, so that the pop up is received when approval is attempted, and ran once approved.
Additionally, if run immediately, the job should ideally not be scheduled, but instead triggered to be ran as it is successfully approved (this would somewhat mimic the dry run logic of a job to be approved, where it is enqueued). However, if scheduled, it should be scheduled in such a way that it will run once approved.
Observed Behavior
Job is approved with no pop up even though it is in the past, and it is stuck in the Scheduled jobs queue. This results in Jobs that follow the process of Creation -> Approval -> Approve -> Scheduled, when set to be "Run Immeditately" are never actually ran and lost.
Additionally, it also looks to always show an empty job queue value in the approval screen for the job, even if a default job queue is selected or a job queue value is provided in the jobs run creation.
Note: Celery-beat is confirmed to be on, and other Scheduled Jobs are being triggered daily while this problem is being observed.
The requirement for "one off" for the pop up about job time being in the past can be seen here;
https://github.com/nautobot/nautobot/blob/develop/nautobot/extras/api/views.py#L965
Courtesy of @joewesch for also highlighting that one_off seems to be restricted to type future here: https://github.com/nautobot/nautobot/blob/develop/nautobot/extras/models/jobs.py#L1375
The text was updated successfully, but these errors were encountered: