Skip to content

[tasks/github] Catch ResourceGoneException in message collection#3723

Draft
devs6186 wants to merge 1 commit intoaugurlabs:mainfrom
devs6186:fix/3710-catch-resource-gone-in-messages
Draft

[tasks/github] Catch ResourceGoneException in message collection#3723
devs6186 wants to merge 1 commit intoaugurlabs:mainfrom
devs6186:fix/3710-catch-resource-gone-in-messages

Conversation

@devs6186
Copy link
Copy Markdown

Changeset

  • Added ResourceGoneException to the import from github_data_access in messages.py
  • Extended the existing except UrlNotFoundException clause to also catch ResourceGoneException

Notes

Repos that have GitHub Issues disabled return HTTP 410 when you try to fetch comment URLs, which raises ResourceGoneException in paginate_resource(). Only UrlNotFoundException (404) was being caught, so message collection would crash on those repos and mark core collection as errored. The fix skips those URLs the same way 404s are already skipped, so collection continues normally for the rest of the repo.

The ResourceGoneException class is already defined in github_data_access.py and is already excluded from the tenacity retry logic there, so catching it here is the natural completion of that design.

Related issues/PRs

Description

  • Catch ResourceGoneException (HTTP 410 / issues disabled) in message collection so the task doesn't crash

This PR fixes #3710

Notes for Reviewers
Two-line change: one import addition and one except clause extension. The log message now includes the exception string so it's clear whether it was a 404 or a 410.

Signed commits

  • Yes, I signed my commits.

Repos with GitHub Issues disabled return HTTP 410, which raises
ResourceGoneException in paginate_resource(). Only UrlNotFoundException
(404) was caught, so message collection would crash on those repos and
mark core as errored. Added ResourceGoneException to the except clause so
the comment URL is skipped and collection continues normally.

Fixes augurlabs#3710

Signed-off-by: devs6186 <[email protected]>
@MoralCode MoralCode added the stale Stuff that's abandoned or not making forward progress and may need taking over/reassignment/closing label Feb 19, 2026
Comment on lines -127 to +128
except UrlNotFoundException:
logger.info(f"{task_name}: PR or issue comment url of {comment_url} returned 404. Skipping.")
except (UrlNotFoundException, ResourceGoneException) as e:
logger.info(f"{task_name}: Skipping {comment_url}: {e}")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this is a good start but i think we can do better by checking for missing pr/issue messages sooner

I think its worth either:

  • checking a few urls and if all of them are 404, then just skip all the rest of the message collection
  • checking this sooner and returning from the function earlier/sooner

@MoralCode MoralCode marked this pull request as draft February 24, 2026 03:54
@MoralCode
Copy link
Copy Markdown
Collaborator

marking draft because contributor indicated on slack that this was being abandoned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Stuff that's abandoned or not making forward progress and may need taking over/reassignment/closing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Catch ResourceGoneException('Issues are disabled for this repo') and skip collecting messages for issues when they arent available

2 participants