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

Improve error behavior when loading policies #506

Open
bluekeyes opened this issue Dec 1, 2022 · 1 comment
Open

Improve error behavior when loading policies #506

bluekeyes opened this issue Dec 1, 2022 · 1 comment

Comments

@bluekeyes
Copy link
Member

bluekeyes commented Dec 1, 2022

As reported in #405, Policy Bot will sometimes fail to discover a policy file due to a GitHub timeout (or other network error.) When this happens, we post a failed status check on the PR. This is undesirable for repositories that otherwise don't use Policy Bot, especially if the timeout or error happened while checking if there was an organization-level policy.

To make the issue worse, the failed status is never removed because when everything works correctly, the repository is ignored.

I think there are a few possible improvements:

  1. Detect and retry timeout errors while loading policies, if we do not already
  2. Make the timeout or retries configurable, if they are not already
  3. Log errors from loading policies and only post failed status checks for errors that happens after we've read a policy file from GitHub. This requires that repositories expecting a Policy Bot status mark it as required. This could also create an opposite problem, where the Policy Bot status is missing from a PR where it is required and it is hard to find out why.
@NargiT
Copy link

NargiT commented Jan 11, 2023

Retrying could fix the problem by either removing the status check or updating it. And we could trigger it by simple writting /retry in the comment.

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

No branches or pull requests

2 participants