-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Added canceled_on field to unified_jobs model #5610
Added canceled_on field to unified_jobs model #5610
Conversation
a big thanks again to @rooftopcellist @beeankha and @rebeccahhh for the help provided. |
awx/main/models/unified_jobs.py
Outdated
@@ -810,11 +817,18 @@ def save(self, *args, **kwargs): | |||
|
|||
# Sanity check: Has the job just completed? If so, mark down its | |||
# completion time, and record its output to the database. | |||
#import sdb |
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.
Let's remove this.
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 seems pretty reasonable to me.
@mabashian @jakemcdermott can you think of anything we might want to do with this in the UI?
Build failed.
|
I actually have a problem with it @ryanpetrello because this...is wrong |
Build failed.
|
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.
I love how simple this is. It needs to be in the serializer, but if it's easier to remove it from the summary_fields data to get tests passing, I would not object to that.
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.
It looks like Alan has some minor feedback, but this looks great 🎉
Thanks @thedoubl3j !
My comments were only suggestions to get the test passing, that's the only blocker |
@AlanCoding so what do you think the next steps are? anything else we should add/remove/change? |
Build failed.
|
I think you need to rebase to get tests passing |
Build failed.
|
- When a job is canceled, the canceled_on field will populate with date/time
Build succeeded.
|
Build succeeded (gate pipeline).
|
related Jobs canceled before starting should not show a "finished" time #3988
SUMMARY
Please see #5406 for previous comments/discussion about the decisions made.
ISSUE TYPE
COMPONENT NAME
AWX VERSION
ADDITIONAL INFORMATION
Before, this would look like
With this addition, a new field is added called canceled_on that displays the timestamp that the job was canceled based on the cancel_flag.
So it now will display something like