fix(ci): release CI ownership on deferred-green to break rework deadlock - #137
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
CiPoller and PrReviewPoller can deadlock: after a rework, a green CI check that is deferred keeps its failure-owned status/retry count, so neither poller ever advances the PR's pending reviewer comments.
TL;DR
Green-but-deferred CI now relinquishes failure ownership so the review poller can dispatch the pending rework.
Summary
mark_ci_greendeferred branch now resetsci_retry_count/failed_checks/ci_failureand drops owned statuses towatching.released_deferred_status/1so a green check no longer satisfiesci_owned_record?/1while finalize stays deferred.ci_owned_issue?/2returns false.Alternatives
ci_owned_record?/1onlast_action == "green_deferred": couples the reader to a log string and leaves stale owned state on the record.ci_owned_issue?/2in the review poller: fixes one caller but keeps the misleading persisted state.Test Plan
make allmix test test/symphony_elixir/ci_poller_test.exs test/symphony_elixir/pr_review_poller_test.exsmix format --check-formatted,mix specs.check,mix credo