Skip to content

ci: fix change detection rebuilding everything on main in some cases - #540

Merged
nathanaelhuffman merged 1 commit into
mainfrom
ndh/fix-change-detector
Oct 7, 2026
Merged

nathanaelhuffman merged 1 commit into
mainfrom
ndh/fix-change-detector

Conversation

@nathanaelhuffman

Copy link
Copy Markdown
Collaborator

resolve-base-commit.py anchor's by listing the branch's successful runs (?branch=main&status=success). That listing has been returning the 2026-08-21 run as the newest even though later runs succeeded, so every diff reached back to that commit. Walk back from HEAD instead and query each commit's runs by head_sha, filtering on branch and conclusion locally.

A second bug also around renames:
git diff --name-status reports as "R094 oldnew". BTD rejects the line, and a failed BTD falls back to building everything. Pass --no-renames so they become a D and an A.

Since this touches ci everything builds again after this.

Two bugs compounded so that every push to main built all targets:

resolve-base-commit.py found its anchor by listing the branch's successful
runs (?branch=main&status=success). That listing has been returning the
2026-08-21 run as the newest even though later runs succeeded, so every
diff reached back to that commit. Walk back from HEAD instead and query
each commit's runs by head_sha, filtering on branch and conclusion locally.

That wide diff contained renames, which `git diff --name-status` reports
as "R094 old<TAB>new". BTD rejects the line, and a failed BTD falls back
to building everything. Pass --no-renames so they become a D and an A.
@nathanaelhuffman
nathanaelhuffman enabled auto-merge (squash) October 7, 2026 20:59
@nathanaelhuffman
nathanaelhuffman merged commit a234a41 into main Oct 7, 2026
30 of 37 checks passed
@nathanaelhuffman
nathanaelhuffman deleted the ndh/fix-change-detector branch October 7, 2026 21:54
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