Skip to content

Fix transient errors in nightly rad CLI tests workflow#11194

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-transient-errors-in-workflow
Draft

Fix transient errors in nightly rad CLI tests workflow#11194
Copilot wants to merge 3 commits intomainfrom
copilot/fix-transient-errors-in-workflow

Conversation

Copy link
Contributor

Copilot AI commented Feb 6, 2026

Description

The nightly rad CLI tests workflow was experiencing transient failures when calling the GitHub releases API. Two issues:

  1. The API was called 6 times (once per OS/arch matrix combination), increasing rate limit exposure
  2. When parsing failed, no debug output was shown—making failures impossible to diagnose

Changes:

  • Single API call: New get-version job fetches the release version once, passes it to matrix jobs via output
  • Error visibility: When version parsing fails, the first 50 lines of the API response are echoed
  • Reliable parsing: Replaced fragile grep | awk | sed pipeline with jq
  • Script simplification: test-cli-download.sh now requires RAD_VERSION as a parameter (no longer makes its own API call)
# Before: API called in each matrix job via shell script
- name: Test CLI download
  run: make test-cli-download OS=${{ matrix.os }} ...

# After: Version fetched once, passed to matrix jobs
get-version:
  outputs:
    rad_version: ${{ steps.get-version.outputs.rad_version }}
    
download:
  needs: get-version
  run: make test-cli-download ... RAD_VERSION=${{ needs.get-version.outputs.rad_version }}

Type of change

  • This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Radius (issue link optional).

Contributor checklist

Please verify that the PR meets the following requirements, where applicable:

  • An overview of proposed schema changes is included in a linked GitHub issue.
    • Yes
    • Not applicable
  • A design document PR is created in the design-notes repository, if new APIs are being introduced.
    • Yes
    • Not applicable
  • The design document has been reviewed and approved by Radius maintainers/approvers.
    • Yes
    • Not applicable
  • A PR for the samples repository is created, if existing samples are affected by the changes in this PR.
    • Yes
    • Not applicable
  • A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
    • Yes
    • Not applicable
  • A PR for the recipes repository is created, if existing recipes are affected by the changes in this PR.
    • Yes
    • Not applicable

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Move GitHub API call to single get-version job instead of once per matrix combination
- Add error handling to echo API response when parsing fails
- Use jq for more reliable JSON parsing instead of grep/awk/sed
- Update shell script to accept RAD_VERSION as optional parameter
- Update Makefile to support RAD_VERSION parameter

Co-authored-by: brooke-hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix transient errors in nightly RAD CLI tests Fix transient errors in nightly rad CLI tests workflow Feb 6, 2026
Copilot AI requested a review from brooke-hamilton February 6, 2026 15:20
echo "Using provided RAD_VERSION: $RAD_VERSION"
else
echo "Fetching latest release version from GitHub API..."
radReleaseUrl="https://api.github.com/repos/radius-project/radius/releases"
Copy link
Member

Choose a reason for hiding this comment

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

@copilot why are you calling the GitHub API in both the workflow and the script? I think you should call it once only.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Removed the GitHub API call from the shell script in 7437d01. The API is now called only once in the workflow's get-version job, and the script requires RAD_VERSION to be passed as a parameter.

The GitHub API call is now only in the workflow's get-version job.
The shell script now requires RAD_VERSION to be provided as a parameter.

Co-authored-by: brooke-hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants