Skip to content

ci/build-one: accept arbitrary commit input; publish to nightly-bisect-* tag#2116

Merged
widgetii merged 1 commit into
masterfrom
ci/build-one-accepts-commit
May 21, 2026
Merged

ci/build-one: accept arbitrary commit input; publish to nightly-bisect-* tag#2116
widgetii merged 1 commit into
masterfrom
ci/build-one-accepts-commit

Conversation

@widgetii
Copy link
Copy Markdown
Member

Summary

PR-E of six. Tiny CI-only change: build-one.yml gains an optional commit workflow_dispatch input. With it, git bisect run can drive sub-nightly granularity rebuilds when daily resolution isn't enough.

What changes

  • New optional input commit: (SHA). When set, checkout pulls that ref.
  • New resolve job computes the upload tag once and threads it via job outputs:
    • With commit: nightly-bisect-<short> (deterministic per commit, prerelease)
    • Without commit: nightly-bisect-<short>-<UTC ts> (so repeated one-offs of the same HEAD don't collide)
  • Upload becomes prerelease with a structured body (sha=, short=, platform=, one_off=true).
  • Retry budget bumped to match ci/manifest: publish on partial failure; fix built_at=; extend retry budget #2115 (30 60 120 300 600 1200).

Tag namespace separation

nightly-bisect-* is deliberately distinct from nightly-YYYYMMDD-<short> (the dated nightlies produced by build.yml):

This means sysupgrade --build=nightly-bisect-<short> won't resolve via the manifest path (correct — these aren't channel-published builds), but sysupgrade --url=<github asset url> works as always.

Use it

# Single platform, single commit
gh workflow run build-one.yml -f platform=hi3520dv200_lite -f commit=<sha>

# git bisect run example (will be wrapped by upcoming PR-D's openipc-bisect)
git bisect start <bad-sha> <good-sha>
git bisect run sh -c '
  gh workflow run build-one.yml -f platform=hi3520dv200_lite -f commit=$(git rev-parse HEAD) &&
  gh run watch $(gh run list -L1 -w build-one.yml --json databaseId -q .[0].databaseId)
'

Test plan

  • CI passes on this PR.
  • After merge, dispatch with platform=hi3520dv200_lite and no commit → builds HEAD, publishes to nightly-bisect-<short>-<ts>.
  • Dispatch with platform=hi3520dv200_lite -f commit=<earlier sha> → builds that ref, publishes to nightly-bisect-<short> (deterministic).
  • Verify the dated nightly index on gh-pages is unchanged (no nightly-bisect-* entries in manifest.flat).

🤖 Generated with Claude Code

…t-* tag

build-one.yml gains an optional `commit` workflow_dispatch input. When
present, the checkout step pulls that ref and the resulting release is
tagged `nightly-bisect-<short>` (prerelease). When absent, the workflow
falls back to building HEAD and tags as
`nightly-bisect-<short>-<timestamp>` so repeated one-offs of the same
HEAD don't collide.

The tag namespace `nightly-bisect-*` is deliberately distinct from
nightly-YYYYMMDD-<short> (the daily scheduled releases produced by
build.yml) so:
- one-off bisect rebuilds don't pollute the dated nightly index
  (enrich_manifest.py filters strictly on the dated naming pattern, so
  nightly-bisect-* releases never enter manifest.{json,flat})
- the retention sweep (cleanup.yml) leaves them alone (same regex)

This is what enables `git bisect run` to invoke
  gh workflow run build-one.yml -f platform=X -f commit=<sha>
for sub-nightly granularity. Combined with the upcoming contrib/
openipc-bisect host driver, that gives a full bisect loop down to a
single commit when daily granularity isn't enough.

Also bumped the retry budget to match #2115 (30 60 120 300 600 1200)
since build-one shares the same upstream-CDN flake exposure as the
matrix build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@widgetii widgetii merged commit d97831a into master May 21, 2026
93 checks passed
@widgetii widgetii deleted the ci/build-one-accepts-commit branch May 21, 2026 08:16
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