Add retry logic for singularity pull failures#158
Conversation
Retry singularity pull operations that fail with exit code 255, which typically indicates network-related issues (unexpected EOF, timeouts, connection failures). Uses exponential backoff with up to 3 attempts. Cleans up partial downloads between retries and logs progress for visibility. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Summary of ChangesHello @yarikoptic, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the reliability of Singularity image acquisition by introducing a robust retry mechanism. It specifically targets transient network-related failures, identified by Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces valuable retry logic for singularity pull operations, which will improve robustness against transient network failures. My review focuses on enhancing the clarity of the retry mechanism and ensuring that temporary files are cleaned up correctly under all failure conditions to prevent orphaned files.
There was a problem hiding this comment.
Pull request overview
This PR adds retry logic to the singularity pull operation to handle transient network failures. When singularity pull fails with exit code 255 (typically indicating network issues like EOF or timeouts), the code now automatically retries with exponential backoff instead of failing immediately. Partial downloads are cleaned up between retry attempts, and progress is logged for visibility.
Changes:
- Added retry loop with exponential backoff for singularity pull operations
- Implemented cleanup of partial downloads between retries
- Added logging for retry attempts and failures
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
there is fails due to shell check... will push those |
Replace complex chained && || construct with clear if/else statements for better readability and maintainability. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Retry singularity pull operations that fail with exit code 255, which typically indicates network-related issues (unexpected EOF, timeouts, connection failures). Uses exponential backoff with up to 3 attempts. Cleans up partial downloads between retries and logs progress for visibility.