Skip to content

Fix run-rad-commands parse regression and add shell syntax gate for extension actions - #12775

Merged
brooke-hamilton merged 3 commits into
mainfrom
copilot/fix-run-rad-commands-action
Aug 21, 2026
Merged

brooke-hamilton merged 3 commits into
mainfrom
copilot/fix-run-rad-commands-action

Conversation

Copilot AI commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

run-rad-commands on @main was bricked by an unclosed cleanup() function in the composite action shell block, causing immediate bash parse failure before any rad command could run. This PR restores the missing brace and adds a CI guard that syntax-checks all extension action run: | blocks.

  • Action runtime fix
    • Close cleanup() before trap cleanup EXIT in run-rad-commands/action.yml so the script parses and executes.
  • Regression prevention
    • Add a shell test that extracts every .github/extension/actions/**/action.yml run: | block and validates each with bash -n.
  • CI wiring
    • Add test-extension-action-shell-syntax target and include it in the top-level test target.
cleanup() {
  # ...
  write_result
}
trap cleanup EXIT

Reason for change

A single missing } in the composite action shell block made the deploy path non-functional for workflows pinned to @main. YAML/action linting did not catch this class of failure; explicit shell parsing is required.

How to test

Run the focused shell regression checks:

make test-run-rad-commands-action
make test-extension-action-shell-syntax

File change summary

File Summary of change
.github/extension/actions/run-rad-commands/action.yml Restored the missing closing brace for cleanup() before trap cleanup EXIT in the Run rad commands shell block.
.github/extension/actions/action-shell-syntax_test.sh Added a new regression test that parses all extension action `run:
build/test.mk Added test-extension-action-shell-syntax target and wired it into the aggregate test target so CI enforces the syntax gate.

Co-authored-by: sk593 <42750942+sk593@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix unclosed shell function in run-rad-commands action Fix run-rad-commands parse regression and add shell syntax gate for extension actions Aug 21, 2026
Copilot AI requested a review from sk593 August 21, 2026 18:43
@sk593
sk593 marked this pull request as ready for review August 21, 2026 18:44
@sk593
sk593 requested review from a team as code owners August 21, 2026 18:44
Copilot AI lite review requested due to automatic review settings August 21, 2026 18:44
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@sk593 sk593 added the pr:standard Ongoing maintenance, minor improvements, documentation updates, and routine development work label Aug 21, 2026
@sk593

sk593 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve conflicts

Copilot AI left a comment

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.

Pull request overview

Fixes a bash parse regression in the run-rad-commands extension composite action and adds a CI-enforced guard to prevent future unparseable run: | scripts in extension actions.

Changes:

  • Restored the missing } that closes cleanup() in .github/extension/actions/run-rad-commands/action.yml so the action’s bash script parses and runs.
  • Added .github/extension/actions/action-shell-syntax_test.sh to extract each extension action run: | block and validate it with bash -n.
  • Wired the new syntax gate into make test via build/test.mk so it runs in CI.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.github/extension/actions/run-rad-commands/action.yml Fixes the unclosed cleanup() function to eliminate the immediate bash parse failure.
.github/extension/actions/action-shell-syntax_test.sh Adds a regression test that syntax-checks extracted composite-action `run:
build/test.mk Adds test-extension-action-shell-syntax and includes it in the aggregate test target.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

…ommands-action

# Conflicts:
#	build/test.mk

Co-authored-by: sk593 <42750942+sk593@users.noreply.github.com>

Copilot AI commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve conflicts

Resolved in merge commit 1f29012. It retains both the shell-syntax test target and main's validation test package.

@radius-functional-tests

radius-functional-tests Bot commented Aug 21, 2026 •

Copy link
Copy Markdown

Radius functional test overview

🔍 Go to test action run

Click here to see the test run details
Name Value
Repository radius-project/radius
Commit ref 1f29012
Unique ID funcab68ed89ba
Image tag pr-funcab68ed89ba
  • Dapr: 1.14.4
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-funcab68ed89ba
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-funcab68ed89ba
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-funcab68ed89ba
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funcab68ed89ba
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funcab68ed89ba
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting corerp-cloud functional tests...
⌛ Starting ucp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@github-actions

Copy link
Copy Markdown

Unit Tests

    2 files  ±0    459 suites  ±0   7m 39s ⏱️ + 1m 13s
6 355 tests ±0  6 353 ✅ ±0  2 💤 ±0  0 ❌ ±0 
7 613 runs  ±0  7 611 ✅ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit 1f29012. ± Comparison against base commit 787b6ca.

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.95%. Comparing base (787b6ca) to head (1f29012).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #12775   +/-   ##
=======================================
  Coverage   53.94%   53.95%           
=======================================
  Files         774      774           
  Lines       51991    51991           
=======================================
+ Hits        28049    28054    +5     
+ Misses      21315    21311    -4     
+ Partials     2627     2626    -1     

☔ View full report in Codecov by Harness.
📢 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.

@brooke-hamilton
brooke-hamilton added this pull request to the merge queue Aug 21, 2026
@brooke-hamilton
brooke-hamilton removed this pull request from the merge queue due to a manual request Aug 21, 2026
@brooke-hamilton
brooke-hamilton merged commit f841849 into main Aug 21, 2026
76 checks passed
@brooke-hamilton
brooke-hamilton deleted the copilot/fix-run-rad-commands-action branch August 21, 2026 19:33
DariuszPorowski added a commit that referenced this pull request Aug 26, 2026
….1 (#12831)

Patch release `v0.60.1` for channel `0.60`.

## Backported PRs

Listed in cherry-pick (topological) order. **Gap filler** = not
requested for the patch, but included because it touched the same region
of a shared file between `release/0.60` and a requested commit. Without
it the cherry-pick has no common merge base and conflicts.

| # | Commit | PR | Role |
| --- | --- | --- | --- |
| 1 | `6882b5fdf` | #12640 | Requested |
| 2 | `af0443809` | #12721 | Requested |
| 3 | `7c6de043d` | #12733 | **Gap filler** —
`.github/workflows/codeql.yml` |
| 4 | `ca7b5a3e7` | #12728 | Requested |
| 5 | `2eac7c1f1` | #12702 | Requested |
| 6 | `b4ebe2f28` | #12751 | Requested |
| 7 | `e30a2594d` | #12727 | Requested |
| 8 | `3c7dfecd6` | #12769 | **Gap filler** —
`.github/workflows/codeql.yml` |
| 9 | `787b6ca1a` | #12765 | **Gap filler** — `build/test.mk` |
| 10 | `f84184955` | #12775 | Requested |
| 11 | `415d5b9c2` | #12779 | Requested |
| 12 | `a1d976013` | #12782 | Requested |
| 13 | `14a21bd0d` | #12786 | **Gap filler** — `build/test.mk` |
| 14 | `a87146c77` | #12764 | **Gap filler** — `build/test.mk` |
| 15 | `073ca3cfa` | #12758 | Requested |
| 16 | `5e1f94c13` | #12785 | **Gap filler** —
`pkg/cli/cmd/install/kubernetes/kubernetes.go` |
| 17 | `1fd650af5` | #12742 | Requested |
| 18 | `19376c3f3` | #12829 | Requested |

Five of the six gap fillers are CI/test-only. #12785 is not: it adds a
Helm `control-plane-readiness` Job, a `pre-upgrade
wait-for-control-plane` command, UCP readiness probes, and a
NetworkPolicy change. It is required for #12829 to apply.

## Validation

Full chain dry-run cherry-picked onto `release/0.60` with zero
conflicts. `go build ./...` clean; `pkg/cli/cmd/install/kubernetes`,
`cmd/pre-upgrade/cmd`, `pkg/cli/...`, `pkg/graph/...`, and
`test/validation` all pass.

---------

Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
DariuszPorowski pushed a commit that referenced this pull request Aug 26, 2026
…xtension actions (#12775)

## Summary

`run-rad-commands` on `@main` was bricked by an unclosed `cleanup()`
function in the composite action shell block, causing immediate `bash`
parse failure before any `rad` command could run. This PR restores the
missing brace and adds a CI guard that syntax-checks all extension
action `run: |` blocks.

- **Action runtime fix**
- Close `cleanup()` before `trap cleanup EXIT` in
`run-rad-commands/action.yml` so the script parses and executes.
- **Regression prevention**
- Add a shell test that extracts every
`.github/extension/actions/**/action.yml` `run: |` block and validates
each with `bash -n`.
- **CI wiring**
- Add `test-extension-action-shell-syntax` target and include it in the
top-level `test` target.

```bash
cleanup() {
  # ...
  write_result
}
trap cleanup EXIT
```

## Reason for change

A single missing `}` in the composite action shell block made the deploy
path non-functional for workflows pinned to `@main`. YAML/action linting
did not catch this class of failure; explicit shell parsing is required.

## How to test

Run the focused shell regression checks:

```bash
make test-run-rad-commands-action
make test-extension-action-shell-syntax
```

## File change summary

| File | Summary of change |
| ---- | ----------------- |
| `.github/extension/actions/run-rad-commands/action.yml` | Restored the
missing closing brace for `cleanup()` before `trap cleanup EXIT` in the
`Run rad commands` shell block. |
| `.github/extension/actions/action-shell-syntax_test.sh` | Added a new
regression test that parses all extension action `run: |` blocks and
runs `bash -n` on each extracted script body. |
| `build/test.mk` | Added `test-extension-action-shell-syntax` target
and wired it into the aggregate `test` target so CI enforces the syntax
gate. |

<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes #12773

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sk593 <42750942+sk593@users.noreply.github.com>
(cherry picked from commit f841849)
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
DariuszPorowski added a commit that referenced this pull request Aug 26, 2026
….1 (#12831)

Patch release `v0.60.1` for channel `0.60`.

## Backported PRs

Listed in cherry-pick (topological) order. **Gap filler** = not
requested for the patch, but included because it touched the same region
of a shared file between `release/0.60` and a requested commit. Without
it the cherry-pick has no common merge base and conflicts.

| # | Commit | PR | Role |
| --- | --- | --- | --- |
| 1 | `6882b5fdf` | #12640 | Requested |
| 2 | `af0443809` | #12721 | Requested |
| 3 | `7c6de043d` | #12733 | **Gap filler** —
`.github/workflows/codeql.yml` |
| 4 | `ca7b5a3e7` | #12728 | Requested |
| 5 | `2eac7c1f1` | #12702 | Requested |
| 6 | `b4ebe2f28` | #12751 | Requested |
| 7 | `e30a2594d` | #12727 | Requested |
| 8 | `3c7dfecd6` | #12769 | **Gap filler** —
`.github/workflows/codeql.yml` |
| 9 | `787b6ca1a` | #12765 | **Gap filler** — `build/test.mk` |
| 10 | `f84184955` | #12775 | Requested |
| 11 | `415d5b9c2` | #12779 | Requested |
| 12 | `a1d976013` | #12782 | Requested |
| 13 | `14a21bd0d` | #12786 | **Gap filler** — `build/test.mk` |
| 14 | `a87146c77` | #12764 | **Gap filler** — `build/test.mk` |
| 15 | `073ca3cfa` | #12758 | Requested |
| 16 | `5e1f94c13` | #12785 | **Gap filler** —
`pkg/cli/cmd/install/kubernetes/kubernetes.go` |
| 17 | `1fd650af5` | #12742 | Requested |
| 18 | `19376c3f3` | #12829 | Requested |

Five of the six gap fillers are CI/test-only. #12785 is not: it adds a
Helm `control-plane-readiness` Job, a `pre-upgrade
wait-for-control-plane` command, UCP readiness probes, and a
NetworkPolicy change. It is required for #12829 to apply.

## Validation

Full chain dry-run cherry-picked onto `release/0.60` with zero
conflicts. `go build ./...` clean; `pkg/cli/cmd/install/kubernetes`,
`cmd/pre-upgrade/cmd`, `pkg/cli/...`, `pkg/graph/...`, and
`test/validation` all pass.

---------

Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
(cherry picked from commit e5938bf)
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
DariuszPorowski pushed a commit that referenced this pull request Aug 26, 2026
…xtension actions (#12775)

## Summary

`run-rad-commands` on `@main` was bricked by an unclosed `cleanup()`
function in the composite action shell block, causing immediate `bash`
parse failure before any `rad` command could run. This PR restores the
missing brace and adds a CI guard that syntax-checks all extension
action `run: |` blocks.

- **Action runtime fix**
- Close `cleanup()` before `trap cleanup EXIT` in
`run-rad-commands/action.yml` so the script parses and executes.
- **Regression prevention**
- Add a shell test that extracts every
`.github/extension/actions/**/action.yml` `run: |` block and validates
each with `bash -n`.
- **CI wiring**
- Add `test-extension-action-shell-syntax` target and include it in the
top-level `test` target.

```bash
cleanup() {
  # ...
  write_result
}
trap cleanup EXIT
```

## Reason for change

A single missing `}` in the composite action shell block made the deploy
path non-functional for workflows pinned to `@main`. YAML/action linting
did not catch this class of failure; explicit shell parsing is required.

## How to test

Run the focused shell regression checks:

```bash
make test-run-rad-commands-action
make test-extension-action-shell-syntax
```

## File change summary

| File | Summary of change |
| ---- | ----------------- |
| `.github/extension/actions/run-rad-commands/action.yml` | Restored the
missing closing brace for `cleanup()` before `trap cleanup EXIT` in the
`Run rad commands` shell block. |
| `.github/extension/actions/action-shell-syntax_test.sh` | Added a new
regression test that parses all extension action `run: |` blocks and
runs `bash -n` on each extracted script body. |
| `build/test.mk` | Added `test-extension-action-shell-syntax` target
and wired it into the aggregate `test` target so CI enforces the syntax
gate. |

<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes #12773

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sk593 <42750942+sk593@users.noreply.github.com>
(cherry picked from commit f841849)
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
DariuszPorowski added a commit that referenced this pull request Aug 26, 2026
….1 (#12831)

Patch release `v0.60.1` for channel `0.60`.

## Backported PRs

Listed in cherry-pick (topological) order. **Gap filler** = not
requested for the patch, but included because it touched the same region
of a shared file between `release/0.60` and a requested commit. Without
it the cherry-pick has no common merge base and conflicts.

| # | Commit | PR | Role |
| --- | --- | --- | --- |
| 1 | `6882b5fdf` | #12640 | Requested |
| 2 | `af0443809` | #12721 | Requested |
| 3 | `7c6de043d` | #12733 | **Gap filler** —
`.github/workflows/codeql.yml` |
| 4 | `ca7b5a3e7` | #12728 | Requested |
| 5 | `2eac7c1f1` | #12702 | Requested |
| 6 | `b4ebe2f28` | #12751 | Requested |
| 7 | `e30a2594d` | #12727 | Requested |
| 8 | `3c7dfecd6` | #12769 | **Gap filler** —
`.github/workflows/codeql.yml` |
| 9 | `787b6ca1a` | #12765 | **Gap filler** — `build/test.mk` |
| 10 | `f84184955` | #12775 | Requested |
| 11 | `415d5b9c2` | #12779 | Requested |
| 12 | `a1d976013` | #12782 | Requested |
| 13 | `14a21bd0d` | #12786 | **Gap filler** — `build/test.mk` |
| 14 | `a87146c77` | #12764 | **Gap filler** — `build/test.mk` |
| 15 | `073ca3cfa` | #12758 | Requested |
| 16 | `5e1f94c13` | #12785 | **Gap filler** —
`pkg/cli/cmd/install/kubernetes/kubernetes.go` |
| 17 | `1fd650af5` | #12742 | Requested |
| 18 | `19376c3f3` | #12829 | Requested |

Five of the six gap fillers are CI/test-only. #12785 is not: it adds a
Helm `control-plane-readiness` Job, a `pre-upgrade
wait-for-control-plane` command, UCP readiness probes, and a
NetworkPolicy change. It is required for #12829 to apply.

## Validation

Full chain dry-run cherry-picked onto `release/0.60` with zero
conflicts. `go build ./...` clean; `pkg/cli/cmd/install/kubernetes`,
`cmd/pre-upgrade/cmd`, `pkg/cli/...`, `pkg/graph/...`, and
`test/validation` all pass.

---------

Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
(cherry picked from commit e5938bf)
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:standard Ongoing maintenance, minor improvements, documentation updates, and routine development work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

run-rad-commands action on main is unparseable: cleanup() missing closing brace breaks all deploys

5 participants