Repository navigation
Add retry logic and logging to install-gh-aw.sh for transient API failures - #6216
Merged
Merged
Conversation
- Add retry logic (3 attempts with exponential backoff) to fetch_release_data - Add logging for each fetch attempt showing attempt number - Add logging for retry delays and exit codes - Improve error messages to guide users to specify version directly - Update usage documentation with example - Support for version argument already exists (skip latest fetch) Co-authored-by: pelikhan <[email protected]>
- Quote variables in numeric comparisons to prevent globbing - Fixes SC2086 warnings in the new retry logic Co-authored-by: pelikhan <[email protected]>
- Verify max_retries variable exists - Verify retry loop is implemented - Verify fetch attempts are logged - Verify exponential backoff is present Co-authored-by: pelikhan <[email protected]>
Copilot
AI
changed the title
[WIP] Add retry mechanism for fetching latest release in install.sh
Add retry logic and logging to install-gh-aw.sh for transient API failures
Dec 12, 2025
Collaborator
The logging from print_info/print_warning/print_error was going to stdout and mixing with the JSON response, breaking jq parsing. Now all logging in fetch_release_data is explicitly redirected to stderr with >&2. Fixes the "jq: parse error: Invalid numeric literal" issue. Co-authored-by: pelikhan <[email protected]>
Contributor
Author
Fixed in 65712fa. The logging from Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
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.
Implementation Complete ✅
All requirements from the issue have been successfully implemented:
Changes Made
1. Added Retry Logic to
fetch_release_dataFunction2. Added Comprehensive Logging
"Fetching release data (attempt X/3)...""Fetch attempt X failed (exit code: Y). Retrying in Zs...""Failed to fetch release data after 3 attempts""Failed to fetch latest release information from GitHub API""You can specify a version directly: ./install-gh-aw.sh v1.0.0"3. Version Argument Support ✅
VERSION=${1:-""}4. Additional Improvements
scripts/test-install-script.sh:max_retries=3variable existsBug Fix
fetch_release_datawas going to stdout and mixing with JSON response, breaking parsing. All logging now explicitly redirected to stderr with>&2.Testing
Files Modified
install-gh-aw.sh- Main installation script with retry logic and stderr logging fixscripts/test-install-script.sh- Enhanced test coverageError Addressed
This fixes the intermittent failure seen in GitHub Actions run #20157888506 where macOS install test failed with "Failed to fetch latest release information". The new retry logic will handle transient API failures gracefully.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.