Bring size-diff baseline fixes to maintenance-10.x - #11805
Conversation
…ush trigger
ci.yml's own push trigger is a no-op (a branches: list with only a negative
pattern matches nothing per GitHub's docs; confirmed zero push-triggered
runs exist in this repo's history). nightly-build.yml ("Build pre-release")
is push-triggered correctly and already invokes ci.yml's jobs via
workflow_call to build nightly releases -- listen to it instead, at no
extra build cost. Add maintenance-10.x and release/9.1 to its branch list
so baselines exist for those bases too.
Also fix ci.yml's "Save branch name" step: it was gated on
github.event_name == 'push', but that reports as 'workflow_call' when
invoked from nightly-build.yml, not 'push' -- so branch.txt would never
have been produced on the path this now depends on.
The Release job (nightly upload to iNavFlight/inav-nightly) can fail for reasons unrelated to the build itself and drags the whole run's conclusion to failure even when the build succeeded and produced the size-report/branch-name artifacts. Confirmed live: the 2026-08-20 push to release/9.1 had every build job succeed but Release fail with "Bad credentials" (NIGHTLY_TOKEN), so publish-baseline never ran and no baseline has ever been published — which is why PR iNavFlight#11800 still shows "No size baseline is available yet". Check the specific build/upload-artifacts job's conclusion instead of the aggregate run conclusion.
|
ⓘ 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 QodoFix size-diff baseline publishing for maintenance-10.x workflows
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1. Brittle job-name gate
|
| CONCLUSION=$(gh api "repos/${{ github.repository }}/actions/runs/${RUN_ID}/jobs" --paginate \ | ||
| --jq '.jobs[] | select(.name == "build / upload-artifacts") | .conclusion') |
There was a problem hiding this comment.
1. Brittle job-name gate 🐞 Bug ☼ Reliability
ci-size-report.yml gates baseline publishing on finding a job named exactly `"build / upload-artifacts"` in the upstream run; any caller job rename (nightly-build) or callee job rename (ci.yml) will cause proceed=false and baseline publishing will be skipped.
Agent Prompt
### Issue description
`publish-baseline` checks upstream success by querying workflow-run jobs and selecting a single hard-coded job name (`build / upload-artifacts`). This is fragile because GitHub job display names can change when either the caller job name (in `nightly-build.yml`) or the callee job id/name (in `ci.yml`) changes, causing baseline publishing to be skipped.
### Issue Context
- Caller workflow `nightly-build.yml` defines the reusable-workflow caller job name as `build`.
- Callee workflow `ci.yml` contains a job id `upload-artifacts`.
- The current jq filter requires an exact combined display name string.
### Fix Focus Areas
- .github/workflows/ci-size-report.yml[54-76]
### Suggested change
Update the jq selection to be resilient, e.g. match by suffix:
- select(.name | endswith("/ upload-artifacts") or endswith(" / upload-artifacts") or .name == "upload-artifacts")
Optionally:
- assert exactly one match and emit an error/warning if multiple matches occur
- include the matched job name in logs for easier debugging
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| # rebuild the base branch to get a comparison point. Only fires for | ||
| # branches nightly-build.yml's own push trigger covers (currently | ||
| # master, maintenance-9.x, maintenance-10.x, release/9.1 — see that | ||
| # file). Stale baselines for since-deleted branches aren't cleaned up |
There was a problem hiding this comment.
2. Branch coverage comment wrong 🐞 Bug ⚙ Maintainability
ci-size-report.yml’s header comment claims baseline publishing only covers master, maintenance-9.x, maintenance-10.x, and release/9.1, but nightly-build.yml also triggers “Build pre-release” on maintenance-8.x.x, so baselines will also be published for that branch.
Agent Prompt
### Issue description
The comment describing which branches are covered by `nightly-build.yml` is inconsistent with the actual `nightly-build.yml` trigger list, which includes `maintenance-8.x.x`.
### Issue Context
This is a documentation mismatch inside the workflow file itself; it can mislead future maintainers about which branches will have baselines published.
### Fix Focus Areas
- .github/workflows/ci-size-report.yml[17-20]
- .github/workflows/nightly-build.yml[6-13]
### Suggested change
Update the comment to include `maintenance-8.x.x` (or, if unintended, remove that branch from the `nightly-build.yml` trigger list).
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
RAM / Flash usage vs. base branch — commit
See RAM/flash optimization guide for techniques to reduce usage. |
|
Test firmware build ready — commit Download firmware for PR #11805 244 targets built. Find your board's
|
Summary
maintenance-10.xnever got two fixes to the RAM/flash size-diff PRcomment feature that already landed on
masterandrelease/9.1. As aresult, pushes to
maintenance-10.x(e.g. #11753, merged a few hours ago)never produced a size baseline —
nightly-build.yml's own copy on thisbranch didn't even list
maintenance-10.xas a trigger branch, so "Buildpre-release" never fired for that push at all.
Root Cause
push-triggered workflows use the copy of the workflow file present onthe branch actually being pushed to, not
master's copy.maintenance-10.x'scopy of
nightly-build.ymlstill only listedmaster/maintenance-8.x.x/maintenance-9.x— the addition ofmaintenance-10.xandrelease/9.1(from an earlier fix) had only reached
masterandrelease/9.1themselves,never
maintenance-10.x.Changes
Cherry-picks two commits already reviewed and merged elsewhere, no new code:
nightly-build.yml: addmaintenance-10.x/release/9.1to the pushbranch list.
ci.yml: fix "Save branch name" step's condition(
github.event_name == 'push'→!= 'pull_request') — it was nevertrue when
ci.ymlruns vianightly-build.yml'sworkflow_call,since
github.event_namereports'workflow_call'there, not'push'.ci-size-report.yml:publish-baselinelistens to "Build pre-release"instead of the dead
ci.ymlpush trigger, and no longer gates on theaggregate
workflow_run.conclusion(a separate, unrelatedReleasejobfailure was dragging that down even when the build itself succeeded —
see Fix publish-baseline never firing due to unrelated Release job failures #11801 for the full diagnosis on
release/9.1).README.md: corresponding doc corrections.Testing
maintenance-10.xwith noconflicts.
shellcheckclean on the size-extraction scripts (unchanged by this PR,verified as a sanity check).
workflow_run-triggered workflow locally; willconfirm live once merged and a subsequent push to
maintenance-10.xtriggers "Build pre-release".
Code Review
Both commits were already reviewed with the
inav-code-reviewagent whenfirst merged to
master/release/9.1(see #11801). No new code in this PR.Related
Part of the size-diff PR comment feature (#11791/#11794/#11795/#11796/#11797/#11801).