Fix skipped cloud functional tests on schedule#11208
Fix skipped cloud functional tests on schedule#11208willdavsmith wants to merge 5 commits intoradius-project:mainfrom
Conversation
Signed-off-by: willdavsmith <willdavsmith@gmail.com>
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
brooke-hamilton
left a comment
There was a problem hiding this comment.
The functional test failure on this PR is due to the test not authenticating to Azure from the branch.
sylvainsf
left a comment
There was a problem hiding this comment.
Thanks for catching this and fixing!
There was a problem hiding this comment.
Pull request overview
Fixes the scheduled execution path of the cloud functional test workflow by adding explicit job-level if: guards so downstream jobs don’t get auto-skipped when an upstream needs: job is skipped (notably approval-gate on schedule).
Changes:
- Add explicit
if: always()gating to thechanges,build, andskip-testsjobs to prevent “skipped needs => skipped job” cascading. - Add explicit success-result gating for
tests(andchanges) so tests only run when prerequisites succeeded.
| name: Build Radius for test | ||
| needs: [setup, changes] | ||
| # Skip if only docs/markdown changed | ||
| if: needs.changes.outputs.only_changed != 'true' | ||
| if: always() && needs.changes.outputs.only_changed != 'true' | ||
| runs-on: ubuntu-24.04 |
There was a problem hiding this comment.
build now uses if: always() && needs.changes.outputs.only_changed != 'true', which can evaluate to true when setup/changes were skipped or failed (e.g., scheduled runs on forks where setup is intentionally skipped). That would allow the build job to run without valid needs.setup.outputs.* values and bypass the schedule fork guard. Update the condition to also require needs.setup.result == 'success' and needs.changes.result == 'success' (and then apply the docs-only check).
Description
functional-test-cloud.yamlskipping onscheduletrigger.Cloud functional tests are skipping steps and returning
Successincorrectly: https://github.com/radius-project/radius/actions/workflows/functional-test-cloud.yaml?query=event%3AscheduleIf any job in the
needs:dependency chain of a job is skipped, it will also be skipped unless you provide it an explicitif:clause (source: https://docs.github.com/en/enterprise-cloud@latest/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idneeds)In this case,
approval-gatewas being skipped onscheduletriggers, which caused the cloud functional tests to skip execution and report early success.Verification:
Example: running from
mainskips tests:https://github.com/radius-project/radius/actions/runs/21845972237
Changes cause steps to not be skipped:
https://github.com/radius-project/radius/actions/runs/21846478986
Type of change
Fixes: N/A
Contributor checklist
Please verify that the PR meets the following requirements, where applicable: