-
Notifications
You must be signed in to change notification settings - Fork 220
Fix worker error reporting when asset cannot be found #963
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
Conversation
|
I'm pretty sure my change shouldn't cause that failure. |
|
that's what QA always says |
I introduced a problem in baac24b by using `locate_asset` here. Previously when the asset wasn't found, the variable (`$iso` or whatever) would be the path where we were looking for it; now, it's undef. So the error message won't tell us what asset it was looking for, and additionally we get a (non-fatal) perl error constructing the error message. So let's keep the asset filename around for the purpose of creating the error message, and tweak the wording a bit.
aaannz
left a comment
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.
👍
| my $hdd = $job->{settings}->{"HDD_$i"} || undef; | ||
| if ($hdd) { | ||
| $hdd = locate_asset('hdd', $hdd, 1); | ||
| my $hddname = $job->{settings}->{"HDD_$i"} || undef; |
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.
why the '|| undef'?
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.
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.
yeah, I didn't add that.
I introduced a problem in baac24b by using
locate_assethere.Previously when the asset wasn't found, the variable (
$isoorwhatever) would be the path where we were looking for it; now,
it's undef, and that actually causes the worker process to error
out trying to produce the error string. So let's keep the asset
filename around for the purpose of creating the error message,
and tweak the wording a bit.