Skip to content

Fix LRT Azure failures: scope skip-list update to install/upgrade only#11456

Open
Copilot wants to merge 4 commits intomainfrom
copilot/fix-radius-installation-script
Open

Fix LRT Azure failures: scope skip-list update to install/upgrade only#11456
Copilot wants to merge 4 commits intomainfrom
copilot/fix-radius-installation-script

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 19, 2026

LRT on Azure was failing due to skip-delete-resources-list.txt being unconditionally overwritten every run regardless of whether install/upgrade occurred.

Changes

.github/scripts/manage-radius-installation.sh

  • Extract kubectl UCP resource snapshot into save_skip_resources_list() helper (with error handling); call it only in the install and upgrade branches — not the version-match no-op path

.github/workflows/long-running-azure.yaml

  • Remove the unconditional "Create a list of resources not to be deleted" step; the snapshot now lives inside manage-radius-installation.sh and is scoped to install/upgrade only

Type of change

  • This pull request fixes a bug in Radius and has an approved issue (issue link required).

Contributor checklist

  • 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

…pshot to install/upgrade only

Co-authored-by: sk593 <42750942+sk593@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix long-running tests by reverting database setting and updating resources list Fix LRT Azure failures: revert database.enabled and scope skip-list update to install/upgrade only Mar 19, 2026
Copilot AI requested a review from sk593 March 19, 2026 17:53
run: |
kubectl get resources.ucp.dev -n radius-system --no-headers -o custom-columns=":metadata.name" > skip-delete-resources-list.txt

- name: Save list of resources not to be deleted
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is the save needed each time workflow runs with a new key? perhaps the script can return if install/upgrade was done and we use that?

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.23%. Comparing base (1506c2f) to head (ee0d860).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11456      +/-   ##
==========================================
+ Coverage   51.21%   51.23%   +0.02%     
==========================================
  Files         699      699              
  Lines       44050    44050              
==========================================
+ Hits        22560    22571      +11     
+ Misses      19330    19326       -4     
+ Partials     2160     2153       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 24, 2026

Unit Tests

    2 files  ±0    415 suites  ±0   6m 23s ⏱️ -21s
4 862 tests ±0  4 860 ✅ ±0  2 💤 ±0  0 ❌ ±0 
5 764 runs  ±0  5 762 ✅ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit ee0d860. ± Comparison against base commit 1506c2f.

♻️ This comment has been updated with latest results.

@sk593 sk593 requested a deployment to external-contributor-approval March 25, 2026 22:37 — with GitHub Actions Waiting
@sk593 sk593 changed the title Fix LRT Azure failures: revert database.enabled and scope skip-list update to install/upgrade only Fix LRT Azure failures: scope skip-list update to install/upgrade only Mar 25, 2026
@sk593 sk593 marked this pull request as ready for review March 25, 2026 22:39
@sk593 sk593 requested review from a team as code owners March 25, 2026 22:39
Copilot AI review requested due to automatic review settings March 25, 2026 22:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes Azure long-running test (LRT) failures by ensuring skip-delete-resources-list.txt is only refreshed when Radius is actually installed/upgraded, instead of being overwritten on every run.

Changes:

  • Move UCP resource snapshot generation into save_skip_resources_list() inside manage-radius-installation.sh.
  • Call the snapshot helper only on install/upgrade paths (not on the version-match no-op path).
  • Remove the unconditional workflow step that regenerated the skip list every run.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/long-running-azure.yaml Removes the always-run kubectl snapshot step; relies on the script to generate the skip list only when needed.
.github/scripts/manage-radius-installation.sh Adds save_skip_resources_list() helper and invokes it from install/upgrade branches.
Comments suppressed due to low confidence (1)

.github/workflows/long-running-azure.yaml:282

  • After removing the step that always generated skip-delete-resources-list.txt, this cache save step can run when the file was neither restored (cache miss) nor created (version-match no-op). actions/cache/save typically fails when the specified path doesn't exist, which would break the workflow even though skipping install/upgrade is a valid outcome. Guard this step with an if that checks the file exists (or create a minimal file in the no-op path without overwriting an existing one).
      - name: Save list of resources not to be deleted
        uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
        with:
          path: skip-delete-resources-list.txt
          key: skip-delete-resources-list-${{ steps.gen-id.outputs.UNIQUE_ID || github.run_id }}

Comment on lines +107 to +111
if ! kubectl get resources.ucp.dev -n radius-system --no-headers -o custom-columns=":metadata.name" > skip-delete-resources-list.txt; then
echo "Error: Failed to retrieve UCP resources from cluster." >&2
exit 1
fi
echo "Skip resources list saved."
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

save_skip_resources_list redirects output directly to skip-delete-resources-list.txt, which truncates the existing file before kubectl succeeds. If kubectl get fails (transient API error, RBAC, etc.), the workflow can lose the previously-restored skip list and later cleanup may delete resources that should have been preserved. Write to a temporary file and atomically replace the destination only on success (and leave the previous file intact on failure).

Suggested change
if ! kubectl get resources.ucp.dev -n radius-system --no-headers -o custom-columns=":metadata.name" > skip-delete-resources-list.txt; then
echo "Error: Failed to retrieve UCP resources from cluster." >&2
exit 1
fi
echo "Skip resources list saved."
local tmp_file
tmp_file="$(mktemp skip-delete-resources-list.txt.XXXXXX)"
if kubectl get resources.ucp.dev -n radius-system --no-headers \
-o custom-columns=":metadata.name" > "${tmp_file}"; then
mv "${tmp_file}" skip-delete-resources-list.txt
echo "Skip resources list saved."
else
echo "Error: Failed to retrieve UCP resources from cluster." >&2
rm -f "${tmp_file}"
exit 1
fi

Copilot uses AI. Check for mistakes.
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.

4 participants