Make 4XX responses not retriable for attachment downloads
What does this MR do and why?
This update improves the GitHub import process by preventing retries for file download failures. Previously, attachments like images or documents that failed to download with errors 403, 404, or 410 would be retried five times before Sidekiq marked the job as failed. Since these errors are unrecoverable, retrying only extended the migration time unnecessarily.
The change modifies GitHub Import to skip retries for such failed downloads, making the process more resilient. It avoids getting stuck on inaccessible files while maintaining links to accessible files on GitHub. Like before, the import can finish successfully even if some attachments fail to download.
Failed downloads are recorded in the import_failures table and can be viewed on the import details page.
The /status page shows a link to the errors.
References
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

