-
Notifications
You must be signed in to change notification settings - Fork 290
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
suite.Run.schedule_jobs: Unmask error in dry-run #1958
Conversation
For whatever reason we were suppressing an error related to unavailable packages. Signed-off-by: Zack Cerza <[email protected]>
And clean up the code a bit Signed-off-by: Zack Cerza <[email protected]>
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.
👍
not self.args.dry_run and | ||
not config.suite_allow_missing_packages | ||
): | ||
if not config.suite_allow_missing_packages: | ||
util.schedule_fail( |
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.
Just thinking about the user impact...it would be better to identify all the jobs clearly that are missing packages when --dry-running. Would it be better to report something identifying the job and continue, rather than calling schedule_fail here? In a non-dry-run, failure makes sense (although arguably it ought to fail when there are any jobs missing packages), but in dry-run, reporting as much as possible seems better. wdyt?
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 felt important to converge the behavior of the two modes, since users seemed pretty surprised that they differed. I do think we could stand to include a little more information though, like what specifically was missing
log.error('can''t find %d parents of %s in %s: %s', | ||
int(count), sha1, project, resp.json()['error']) | ||
resp_json = resp.json() | ||
err_msg = resp_json.get("error") or resp_json.get("err") |
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.
@zmc I wonder why have you left get("error")?
Also fix a KeyError.