Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Refactor error handling patterns with integration between companions #318

Merged
merged 46 commits into from
Oct 15, 2021

Conversation

joao-paulo-parity
Copy link
Contributor

@joao-paulo-parity joao-paulo-parity commented Oct 8, 2021

In paritytech/substrate#9966 (comment), the first bot merge failed because the companion was not mergeable. The problem is that the bot failed silently and did not explain that an error happened.

As told by the log line

handle_error: Github API says companion paritytech/polkadot#4037 is not mergeable

The problem occurred because the error was not carrying the issue context (otherwise it would have been logged as WithIssue ...).

WithIssue {

when it reached handle_error

async fn handle_error(e: Error, state: &AppState) {

In this PR we attempt to improve the error handling so that it's more likely for the bot to correctly report errors as comments.

This PR also addresses some feedback from https://github.com/paritytech/ci_cd/issues/159#issue-939082694 which is mostly related to the companion integration changes.

@joao-paulo-parity joao-paulo-parity force-pushed the jp/error-handling branch 5 times, most recently from c64a12a to 9bc9cc5 Compare October 9, 2021 04:52
@joao-paulo-parity joao-paulo-parity marked this pull request as draft October 9, 2021 10:31
@joao-paulo-parity joao-paulo-parity force-pushed the jp/error-handling branch 2 times, most recently from 27c46a8 to 6f6624d Compare October 9, 2021 12:46
@joao-paulo-parity joao-paulo-parity changed the title Improve error handling so that processbot is able to post comments about errors Refactor error handling patterns with integration between companions Oct 10, 2021
@joao-paulo-parity joao-paulo-parity marked this pull request as ready for review October 15, 2021 12:01
@joao-paulo-parity joao-paulo-parity merged commit 060d2e9 into master Oct 15, 2021
@joao-paulo-parity joao-paulo-parity deleted the jp/error-handling branch October 16, 2021 08:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant