fix: raise Ignore() when issues are disabled to prevent chord cascade failure#3793
Open
mn-ram wants to merge 3 commits intoaugurlabs:mainfrom
Open
fix: raise Ignore() when issues are disabled to prevent chord cascade failure#3793mn-ram wants to merge 3 commits intoaugurlabs:mainfrom
mn-ram wants to merge 3 commits intoaugurlabs:mainfrom
Conversation
… failure When a repository has GitHub Issues intentionally disabled, the GitHub API returns HTTP 410 Gone, causing ResourceGoneException to be raised inside collect_issues. Previously this was swallowed by the bare except block and returned -1, but Celery still treated the task result in a way that could propagate through the enclosing chord and abort all collection for that repo (commits, PRs, contributors, releases — not just issues). Catch ResourceGoneException before the general except clause and raise celery.exceptions.Ignore() instead. Celery marks the task as IGNORED (a graceful skip), so the chord continues and the rest of the repo's data is collected normally. Add three unit tests that cover: - ResourceGoneException on get_resource_page_count (HEAD request phase) - ResourceGoneException on paginate_resource (pagination phase) - Unrelated exceptions still return -1 as before Fixes augurlabs#3461 Signed-off-by: mn-ram <152869502+prakash-kalwaniya@users.noreply.github.com>
added 2 commits
March 26, 2026 04:26
The issues/events and issues/comments GitHub API endpoints also return HTTP 410 Gone when Issues are disabled on a repository. collect_events and collect_github_messages had no ResourceGoneException handling at all, so they would raise unhandled exceptions in the secondary collection group that runs after collect_issues. Apply the same Ignore()-based fix to both tasks so that the full secondary group (events, messages, clones) skips gracefully rather than failing when Issues are disabled. Also extends the unit-test suite with coverage for collect_events and collect_github_messages under the same condition. Refs augurlabs#3461 Signed-off-by: mn-ram <152869502+prakash-kalwaniya@users.noreply.github.com>
The previous fix wrapped the entire GithubTaskManifest context manager in a try/except, which unnecessarily indented the full function body. Move the try/except inside the with-block so it only wraps the two calls that can raise ResourceGoneException (fast_retrieve_all_pr_and_issue_messages and process_large_issue_and_pr_message_collection). No behaviour change. Also add unit tests for GithubDataAccess._decide_retry_policy (introduced in commit 04ef1ef) to verify that ResourceGoneException and UrlNotFoundException are excluded from retries while transient errors are still retried. Refs augurlabs#3461 Signed-off-by: mn-ram <152869502+prakash-kalwaniya@users.noreply.github.com>
Collaborator
|
this seems like a PR that does a lot of different things Lets chat about this in more detail over on the CHAOSS Slack in the #wg-augur-8knot channel |
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.
Summary
Fixes #3461
`ResourceGoneException` was introduced in commit `04ef1ef` and correctly excluded from Celery's retry policy in `_decide_retry_policy`. However it was never given a graceful skip path at the task level, so any repo with GitHub Issues disabled would silently abort its entire core collection phase — not just issue collection.
This PR applies one fix — catch `ResourceGoneException` and raise `Ignore()` — across three tasks that all access Issues-dependent endpoints:
All three endpoints return HTTP 410 Gone when Issues are disabled on a repo — so all three need the same fix. They are grouped in one PR because the change is identical in each file and splitting them would just produce three single-line PRs for the same root cause.
Because these tasks run inside a Celery chord/chain, an unhandled exception in any one of them aborted the entire collection phase — commits, pull requests, contributors, and releases were all skipped for the affected repo. Raising `Ignore()` lets Celery treat the task as intentionally skipped so the rest of the chord continues normally.
Changes:
Test Plan