Skip to content

ti: ci: board tests: ignore checks of replaced workflow runs - #259

Open
muhammedajmalti wants to merge 1 commit into
TexasInstruments:v4.4.0-ti-nextfrom
muhammedajmalti:ci/board-tests-newest-check
Open

muhammedajmalti wants to merge 1 commit into
TexasInstruments:v4.4.0-ti-nextfrom
muhammedajmalti:ci/board-tests-newest-check

Conversation

@muhammedajmalti

Copy link
Copy Markdown
Collaborator

When another workflow runs more than once on the same commit (a label
added, a reopen, a re-run), the replaced run keeps its check runs on the
commit, though the pull request page no longer shows them. The board-test
wait counted them, so the failed always-run status job of a cancelled
Documentation Build run skipped the board tests while the newer run was
still queued
Now only the check runs of each workflow's newest run count; check runs
from outside GitHub Actions count by name, newest first. The late-approval
re-run job counted check runs the same way and gets the same rule. A
failure in the newest run still skips the board tests.

@muhammedajmalti
muhammedajmalti requested a review from a team December 3, 2026 06:13
@qodo-code-review

qodo-code-review Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

ti: ci: board tests: ignore checks of replaced workflow runs

🐞 Bug fix 🕐 20-40 Minutes

Grey Divider

AI Description

• Board-test wait counts only check runs of each workflow's newest run, not replaced or cancelled
 runs.
• Late-approval re-run job gets the same rule, so stale check runs no longer block it.
• Check runs from outside GitHub Actions still count by name, newest first; a failure in the newest
 run still skips the board tests.
Merge Risk 🟡 Medium

Blast radius 🟢 Low 💥 1 capability

  • 1 affected end-to-end capability after fault-specific containment; implementation boundaries do not widen its functional scope.
  • The changed gate and scheduled scan jointly control one bounded integration outcome: whether the hardware board-test workflow is held, started, or resumed after approval.
  • The workflow's wait job directly controls the board-test job, while the scheduled path re-runs the same skipped board-test run; these are orchestration stages of one integration rather than separate technical capabilities.
Behavioral complexity 🟡 Medium 🧩 Interacting branches, Compatibility cases

  • Before, the gate counted all non-self check runs and newest workflow runs with simpler independent filters.
  • After, it correlates check-suite IDs with workflow-run lists, selects newest runs, distinguishes GitHub Actions from outside apps, and groups repeated checks by run or app and name.
  • The new correctness conditions are that replaced or rerun workflow suites must not contribute stale checks, outside-app checks must remain visible even without a workflow run, and the gate and scheduled resumption logic must apply equivalent identity rules.
  • These are newly interacting temporal and mixed-source states, not merely reuse of jq or GitHub APIs.
Potential damage 🟡 Medium 🩹 Recoverable

  • If current checks are omitted, hardware tests may run before required checks or approval; if stale checks are retained, tests may be delayed or skipped.
  • The affected result is the board-test orchestration decision, not repository data.
  • Reverting stops future misclassification, while an already skipped or prematurely scheduled board test may require a later workflow re-run or scheduled retry; no automatic repair beyond the existing rerun path is established by this change.
  • Code rollback restores subsequent gate decisions.
  • A missed board test still requires the recorded scheduled re-run or manual re-run, while a prematurely started test may consume hardware capacity but does not alter repository state based on the inspected workflow.
Assessed commit 55e6f1e
Diagram

graph TD
A["Commit check runs and workflow runs"] --> B["Keep newest run per workflow"] --> C["Board-test wait gate"]
B --> D["Late-approval re-run job"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Use the check-runs API filter=latest
  • ➕ Fewer lines of jq and shell logic
  • ➕ Handled by GitHub rather than the workflow script
  • ➖ Returns the latest check run per name, not per workflow run, so it can mix results from different runs of the same workflow
  • ➖ Does not reproduce the newest-run-per-workflow rule used for other workflow runs

Recommendation: Keep the per-workflow newest-run filtering in jq. It scopes the rule to each workflow's latest run by check_suite_id, which matches how the PR page shows runs. A simpler API-side filter could work, but it would group check runs by name across workflows and could mix results from unrelated runs. The current approach is the better fit.

Files changed (1) +28 / -12

Bug fix (1) +28 / -12
zephyr-board-ci.ymlCount only newest-run check runs in board-test wait and late-approval job +28/-12

Count only newest-run check runs in board-test wait and late-approval job

• The board-test gate now keeps only check runs whose check suite belongs to each other workflow's newest run, plus check runs from outside Actions, deduplicated by name. The late-approval job applies the same rule when counting action-required checks. Comments explain why replaced runs keep their check runs on the commit.

.github/workflows/zephyr-board-ci.yml

@qodo-code-review

qodo-code-review Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Code Review by Qodo


Action required

Nice, no open findings for this group


Remediation recommended

Nice, no open findings for this group


Informational

Nice, no open findings for this group


Comment thread .github/workflows/zephyr-board-ci.yml Resolved
Comment thread .github/workflows/zephyr-board-ci.yml Resolved
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

✅ Board tests passed

Commit 55e6f1e08059

Board Build Test Jenkins build Logs
mspm0g3519 SUCCESS SUCCESS #31-mspm0g3519- log.html · build.log
am62l SUCCESS SUCCESS #35-am62l- log.html · build.log
mspm0l2228 SUCCESS SUCCESS #28-mspm0l2228- log.html · build.log
mspm33c321a SUCCESS SUCCESS #28-mspm33c321a- log.html · build.log
am13e230 SUCCESS SUCCESS #27-am13e230- log.html · build.log

All board logs (log.html and build.log) in one download: board-logs (kept 14 days)

Jenkins build: Zephyr_Board_CI #32 · Workflow run

When another workflow runs more than once on the same commit (a label
added, a reopen, a re-run), the replaced run keeps its check runs on
the commit, though the pull request page no longer shows them. The
wait counted them, so the failed always-run status job of a cancelled
Documentation Build run skipped the board tests while the newer run
was still queued. The late-approval re-run job counted them too.

Count only the check runs of each workflow's newest run in both
places. GitHub Actions check runs are known by their app, so one from
a run missing from the run list is never taken for an outside check.
A re-run check counts once per workflow run or outside app; the same
name in different workflows or apps counts separately.

Signed-off-by: Muhammed Ajmal <muhammed.ajmal@ti.com>
@muhammedajmalti
muhammedajmalti force-pushed the ci/board-tests-newest-check branch from f4b640c to 55e6f1e Compare December 3, 2026 12:14
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.

1 participant