Skip to content

Fix silently-failing board conflict CI check - #270

Merged
mrpollo merged 5 commits into
mainfrom
fix/board-conflict-ci-exit-code
Jun 24, 2026
Merged

Fix silently-failing board conflict CI check#270
mrpollo merged 5 commits into
mainfrom
fix/board-conflict-ci-exit-code

Conversation

@mrpollo

@mrpollo mrpollo commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

The board_types.txt conflict check has never actually failed CI, even when conflicts exist. The awk pass printed any conflicts it found but always exited 0, so the workflow step passed regardless. As a result a genuine unannotated collision on board ID 88 (TARGET_HW_MINDPX_V2 and TARGET_HW_ARK_CAN_FLOW_MR) has been sitting in board_types.txt undetected. This fixes #269.

The script now exits non-zero when a conflict is found, so CI fails loudly. It is also renamed from .txt to .sh (it is an executable bash script), with the workflow and the in-file reference updated to match.

On top of the exit-code fix, the script takes an optional base ref. On pull requests the workflow passes the PR base, so a PR is only checked for conflicts involving the board IDs it actually adds, while still validating those against the full existing set. Push to main/master still runs a full-file check as a backstop, which is what surfaces pre-existing issues.

Two latent bugs are fixed along the way: # same annotated lines now register their mapping so later collisions compare against them correctly, and new IDs are passed to awk space-separated so local runs work on BSD awk (macOS), which the file header tells maintainers to do.

I replayed the fixed script against the last 20 commits that touched board_types.txt. In PR mode it correctly passes the diffs that introduce no new collision and would have failed exactly one: c1b5dca ("add board IDs for missing ARK products"), which is where the id-88 collision entered. Full-file behavior is unchanged for the clean states.

Heads up: once this merges, the push-to-main run will fail on the existing id-88 conflict until it is resolved (one board needs a different ID, or a # same annotation if intentional). That conflict is intentionally left untouched here since it is a data decision, not a script bug.

This PR also adds a weekly scheduled run (Sundays 06:00 UTC) that does a full-file sweep. When the scheduled run fails it opens a tracking issue, or appends a dated comment to the existing open one, so a conflict that persists across weeks collects in one thread instead of spawning a fresh issue every Sunday.

mrpollo added 5 commits June 24, 2026 08:38
The board_types.txt conflict check never failed CI even when conflicts
existed. The awk pass printed conflicts but always exited 0, so the
workflow step passed regardless. A real unannotated collision on board
ID 88 has been sitting in board_types.txt undetected as a result.

This addresses the issue by:

- Making the script exit non-zero when any conflict is found, so CI
  fails loudly.
- Renaming the script from .txt to .sh (it is an executable bash
  script) and updating the workflow and in-file reference.
- Adding an optional base-ref argument so pull requests only validate
  the board IDs they actually add, while still checking those against
  the full existing set. Push to main/master still runs a full-file
  check as a backstop.

Also fixes two latent bugs: "# same" annotated lines now register their
mapping so later collisions compare against them correctly, and new IDs
are passed to awk space-separated so local runs work on BSD awk (macOS).
Runs the full-file board conflict check every Sunday at 06:00 UTC. On a
scheduled failure it opens a tracking issue, or appends a dated comment
to the existing open one so repeated weekly failures collect in a single
thread instead of spawning a new issue each week.
Extract the issue create/append logic into
Tools/report_board_conflict_failure.sh so the workflow file only
describes triggers and invokes scripts, keeping logic out of YAML.
Move the scheduled run and issue-reporting into a dedicated
weekly_board_conflicts.yaml. The push/PR check stays in
check_board_conflicts.yaml and never opens issues, since PR conflicts
are resolved at the PR level. Adds workflow_dispatch so the weekly
sweep can be triggered manually.
Drop the push trigger and the if/else branching. PRs are checked in
new-IDs mode; full-file coverage is owned by the weekly sweep, so the
push-to-main path is no longer needed here.
@mrpollo
mrpollo merged commit 0f4f13e into main Jun 24, 2026
2 checks passed
@mrpollo
mrpollo deleted the fix/board-conflict-ci-exit-code branch June 24, 2026 15:46
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.

CI is silently failing

1 participant