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
search()->update() can wipe the entire table #183
Conversation
So we better require a fixed DBIx::Class (unfortunately 13.2 is affected by this) Also don't put 2 now() in one update call to avoid the harmless but still ugly warning about possibly corrupt data (I don't see any value in setting the started == finished) also fix one -in call
ecb9519
to
3084878
Compare
@@ -689,7 +693,6 @@ sub _job_skip_children{ | |||
{ | |||
state => OpenQA::Schema::Result::Jobs::DONE, | |||
result => OpenQA::Schema::Result::Jobs::INCOMPLETE, | |||
t_started => now(), | |||
t_finished => now(), |
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.
AFAIR scheduled jobs are meant to be set to cancelled rather than done+incomplete. the latter is used for jobs that were running already. And in case of cancelled neither t_started nor t_finished make sense to be set.
it's actually very confusing in the webui to see jobs as incomplete because their parent failed |
btw: I already fixed the package to require the fixed DBIx::Class, so this PR is mainly for cleanup |
Problem with CANCELLED is that it can be changed back to SCHEDULED. For a job with dependencies it could be problematic. Currently, the job is DONE, job_restart duplicates it and the CHAINED dependency to the parent is dropped during duplication. So we can either add a new result to indicate that the job failed because of dependencies (maybe use existing SKIPPED?) or handle restarting of CANCELLED job the same as DONE job. |
SKIPPED sounds good to me |
Vladimir Nadvornik schrieb:
So the code that restarts resp uncancels jobs needs to be made aware
We had a similar discussion for jobs that were cancelled because a |
SKIPPED is a result, not a state. |
search()->update() can wipe the entire table
I have put my proposal here: |
So we better require a fixed DBIx::Class (unfortunately 13.2 is affected by this)
Also don't put 2 now() in one update call to avoid the harmless but still ugly
warning about possibly corrupt data (I don't see any value in setting the started == finished)
also fix one -in call