Conversation
Branch Targeting SuggestionYou've targeted the
If This is an automated suggestion to help route contributions to the appropriate branch. |
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoRestrict artifact consumers to the firmware CI workflow
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. Valid firmware builds are skipped
|
| # Only act on pull_request-triggered runs that succeeded. | ||
| if: > | ||
| github.event.workflow_run.event == 'pull_request' && | ||
| github.event.workflow_run.path == '.github/workflows/ci.yml' && |
There was a problem hiding this comment.
1. Valid firmware builds are skipped 🐞 Bug ≡ Correctness
Both consumer jobs now require github.event.workflow_run.path to equal the firmware workflow path, but no repository fixture or convention establishes that this property is populated for workflow_run events. When the property is absent, the condition evaluates false and valid pull-request builds are skipped, preventing both artifact consumers from publishing their reports or builds.
Agent Prompt
## Issue description
The consumers require `github.event.workflow_run.path`, but the repository does not establish that this property is present in `workflow_run` event payloads. An absent property makes the condition false, so valid pull-request firmware runs do not reach the artifact consumers.
## Fix Focus Areas
- .github/workflows/pr-test-builds.yml[17-20]
- .github/workflows/ci-size-report.yml[138-142]
## Recommended Fix
Replace the path-based guard with a reliably available identifier for the real firmware workflow, such as its workflow ID or another supported discriminator. Preserve the existing pull-request and successful-conclusion checks, and ensure both consumers reject `non-code-change.yaml` without excluding valid `.github/workflows/ci.yml` runs.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Problem
No issue filed; observed on upstream CI. When a PR touches only non-code paths, the
non-code-change.yamlstub runs instead ofci.yml. Both are named "Build firmware", so the stub's success triggers "PR Test Builds", whosepublishjob fails at "Download PR number" withArtifact not found for name: pr-number. Upstream examples: run 34502954072 (triggered by stub run 34502620127) and run 34253938364 (stub run 34253603715); six such failures between 2026-09-08 and 2026-09-10. The size-report job on master already skips the stub via the guard step from #11878, but only after starting a runner, checking out and querying the jobs API.Cause
.github/workflows/ci.yml:1and.github/workflows/non-code-change.yaml:1sharename: Build firmware..github/workflows/pr-test-builds.yml:17-19gatespublishonly onworkflow_run.event == 'pull_request'andconclusion == 'success', both true for the stub, then downloadspr-numberunconditionally (lines 31-36)..github/workflows/ci-size-report.yml:138-141uses the same job-level condition; the added name check does not tell the two files apart.Change
Adds
github.event.workflow_run.path == '.github/workflows/ci.yml'to the job-levelif:ofpublishinpr-test-builds.ymlandpr-commentinci-size-report.yml. Stub runs no longer enter either job.publish-baselineand the existing "Check upload-artifacts job succeeded" step are untouched.Test
Not run upstream: the "Build firmware" run for this head (34614441492) is awaiting approval, and
workflow_runconsumers execute the default-branch file anyway. Verified in the fork, where the same guard is on the default branch (Raffi1202#12, merge ac6fbcd):pr-commentfailed at "Download PR number" (fork master then lacked the Fix size-diff PR comment crashing when non-code-change build stub fires #11878 guard step).pr-commentthrough all artifact downloads and the PR comment, soworkflow_run.pathis populated and matches for realci.ymlruns.pr-test-builds.ymldoes not execute in the fork (gated ongithub.repository == 'iNavFlight/inav'); its hunk is the identical expression, checked by reading only.Flash / RAM
Not measured yet. The upstream firmware CI has not been released for this PR, so no size report exists.
Docs
No documentation change needed: no file under
docs/describes the consumer trigger conditions, and.github/workflows/README.mddocuments the triggers by workflow name, which is unchanged.