augur icon indicating copy to clipboard operation
augur copied to clipboard

[Tasks] Fix error handling for deleted repositories in GitHub move detection

Open saksham23467 opened this issue 4 months ago • 5 comments

Description

  • This PR fixes error handling for deleted repositories (404 errors) in the GitHub repository move detection system.
  • Previously, when a repository returned a 404 (deleted), the system would mark it as IGNORE but still raise an exception, causing Celery tasks to fail.
  • Now deleted repositories are handled gracefully without causing task failures.

Changes Made

  • Fixed 404 error handling in ping_github_for_repo_move() to return gracefully instead of raising exceptions
  • Added comprehensive task-level error handling with try-catch blocks
  • Enhanced API call retry logic with better error handling and validation
  • Added validation for repository URL parsing and API responses
  • Improved logging throughout the process for better monitoring
  • Deleted repositories are now properly marked as IGNORE in the database

Testing

  • The fix addresses the specific error case where repositories like https://github.com/anaconda-platform/transformers-feedstock return 404 errors
  • Error handling now prevents Celery task failures for deleted repositories
  • System continues processing other repositories even when encountering deleted ones

This PR fixes #3166

Notes for Reviewers

  • The changes are backward compatible and don't affect existing functionality
  • Enhanced logging makes it easier to monitor repository status changes
  • Error handling follows existing patterns in the codebase

Signed commits

  • [x] Yes, I signed my commits.

saksham23467 avatar Aug 01 '25 10:08 saksham23467

@saksham23467 : This looks promising.

sgoggins avatar Aug 12 '25 19:08 sgoggins

@saksham23467 : This looks promising.

Thanks for reviewing! If everything looks good, could you approve the PR so we can move it forward?

saksham23467 avatar Aug 28 '25 20:08 saksham23467

@IsaacMilarky / @Ulincsys : Could you review this?

sgoggins avatar Sep 09 '25 19:09 sgoggins

ignoring the cross-pollination with the other PR, I dont see a fundamental change to the code in this PR except wrapping everything in try-catch statements...

MoralCode avatar Oct 16 '25 19:10 MoralCode

I have force pushed and rebased this PR to both a) only include the relevant commit, and b) be based on current main.

I agree with sean about the technical merits of this PR though, I suspect theres an additional component to the problem thats not being addressed

MoralCode avatar Oct 27 '25 18:10 MoralCode

Closing. I dont see a path to these specific changes getting merged in this specific PR. Discussion should happen in other issues/PRs addressing the repo move detection, such as #3391

MoralCode avatar Dec 19 '25 18:12 MoralCode