Skip to content
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

handle $aborted with a bit more logic #97

Merged
merged 1 commit into from
Dec 11, 2014
Merged

Conversation

coolo
Copy link
Contributor

@coolo coolo commented Dec 11, 2014

trying to preserve the functionality though

}
if (($aborted||'') eq 'obsolete') {
$result = $overall if !$aborted && $overall;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if I understand right, suppose a case here: aborted due to cancel, then aborted=cancel, result=cancel, overall is none, in the end, worker will call api_call('post', 'jobs/'.$job->{'id'}.'/set_done', {result => cancel}); I think, but I don't think we have "cancel" in our job_results.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: I just moved that line.

we have JobState cancelled. So the right thing to do here is result='incomplete', state='cancelled' - but it looks like the job is first set to cancelled by openQA and then the worker is told. So actually the worker doesn't need to do anything, so it doesn't really harm in the light of things if the worker sets an invalid result (and get a 500 as return).

I'll try to clean this up

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, not really matter with this line, I just not sure where is the best line to add the comment, so just pick this one.

@coolo
Copy link
Contributor Author

coolo commented Dec 11, 2014

please give it another review - I will test it now :)

@coolo
Copy link
Contributor Author

coolo commented Dec 11, 2014

it's still buggy - not my changes but the whole thing :)

@nilxam
Copy link
Member

nilxam commented Dec 11, 2014

hmm...the changes LGTM then I don't understand where is buggy :)

@coolo
Copy link
Contributor Author

coolo commented Dec 11, 2014

qemu wans't properly dead when it started a new job - this explains the issues I had in https://progress.opensuse.org/issues/5344

@nilxam
Copy link
Member

nilxam commented Dec 11, 2014

LGTM

all ends go into stop_job and kill_worker now and there it waits.
@aaannz
Copy link
Contributor

aaannz commented Dec 11, 2014

Ok with me. Nothing going against my plan :)

coolo added a commit that referenced this pull request Dec 11, 2014
handle $aborted with a bit more logic
@coolo coolo merged commit 0a3aad8 into master Dec 11, 2014
@coolo coolo deleted the rework_aborted_logic branch December 11, 2014 12:06
@coolo
Copy link
Contributor Author

coolo commented Dec 11, 2014

happy rebase then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants