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

suite.Run.schedule_jobs: Unmask error in dry-run #1958

Merged
merged 2 commits into from
Jun 14, 2024
Merged

Conversation

zmc
Copy link
Member

@zmc zmc commented Jun 14, 2024

Also fix a KeyError.

zmc added 2 commits June 14, 2024 13:07
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]>
@zmc zmc requested a review from dmick June 14, 2024 19:10
Copy link
Contributor

@yuriw yuriw left a comment

Choose a reason for hiding this comment

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

👍

@zmc zmc merged commit 052f8db into main Jun 14, 2024
8 checks passed
@zmc zmc deleted the suite-dryrun-pkgs branch June 14, 2024 19:21
not self.args.dry_run and
not config.suite_allow_missing_packages
):
if not config.suite_allow_missing_packages:
util.schedule_fail(
Copy link
Member

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?

Copy link
Member Author

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")
Copy link
Contributor

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")?

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.

4 participants