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

raise exceptions when PR creation fails #8013

Merged
merged 8 commits into from
Sep 12, 2023

Conversation

jakecoffman
Copy link
Member

@jakecoffman jakecoffman commented Sep 12, 2023

We sometimes see reports of PRs failing to create, but the logs have no information in them. I suspect part of this is due to these errors that are being swallowed up as expected.

So I've removed that and replaces a few blank returns with raise so we can see when those cases are happening.

@jakecoffman jakecoffman marked this pull request as ready for review September 12, 2023 16:44
@jakecoffman jakecoffman requested a review from a team as a code owner September 12, 2023 16:44
return if branch_exists?(branch_name) && unmerged_pull_request_exists?
return if require_up_to_date_base? && !base_commit_is_up_to_date?
raise "Unmerged PR exists" if branch_exists?(branch_name) && unmerged_pull_request_exists?
raise "Base commit is not up to date" if require_up_to_date_base? && !base_commit_is_up_to_date?
Copy link
Member

Choose a reason for hiding this comment

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

[newbie q] will these errors get surfaced to the user or will they be currently visible in the logs?

Copy link
Member Author

Choose a reason for hiding this comment

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

These will be in the logs, but there is another effort to show the errors to the users as well.

@jakecoffman jakecoffman enabled auto-merge (squash) September 12, 2023 19:10
@jakecoffman jakecoffman merged commit 743b9c3 into main Sep 12, 2023
80 checks passed
@jakecoffman jakecoffman deleted the jakecoffman/raise-on-failures branch September 12, 2023 19:24
brettfo pushed a commit to brettfo/dependabot-core that referenced this pull request Oct 11, 2023
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