ci: REST API CI migration + per-workflow aggregators (#1756)#1800
ci: REST API CI migration + per-workflow aggregators (#1756)#1800lachen-nv wants to merge 23 commits into
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
/ok to test c45dd87 |
🔐 TruffleHog Secret Scan✅ No secrets or credentials found! Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉 🕐 Last updated: 2026-05-19 08:22:01 UTC | Commit: c45dd87 |
|
/ok to test a56dff8 |
🔍 Container Scan Summary
Per-CVE detail lives in the per-service |
|
/ok to test c90fc67 |
2a6e535 to
f1eb47d
Compare
|
/ok to test f1eb47d |
|
/ok to test ede0dcf |
|
/ok to test 2c1e90b |
|
/ok to test 590d19e |
|
/ok to test 4fafb10 |
|
/ok to test 3768f2c |
thossain-nv
left a comment
There was a problem hiding this comment.
Thanks for the aggregation work @lachen-nv This looks good. Two minor suggestions.
|
|
||
| jobs: | ||
| changes: | ||
| name: Detect Carbide CI Gate |
There was a problem hiding this comment.
Should we call this Detect Core CI Gate
| # `changes` + `prepare` are in needs so a gate or prepare failure doesn't | ||
| # silently pass (downstream leaves become SKIPPED in those cases). | ||
| # Branch protection ruleset should require ONLY this aggregator + rest-ci-pass. | ||
| carbide-ci-pass: |
There was a problem hiding this comment.
Similar to above, should we call this core-ci-pass?
Description
Migrates the REST API GitHub Actions from the standalone
nico-restrepo intoinfra-controller-core, and refactors the CI infrastructure so Core CI (Carbide CI) and REST CI (NICo REST CI) can coexist as two independent workflows on the same repo with stable required checks.Issue: #1756.
What changed
REST CI workflows copied over (new files)
.github/workflows/rest-ci.yml— top-level REST CI orchestrator.github/workflows/rest-prepare-build-info.yml— version + build metadata.github/workflows/rest-lint-and-test.yml— Go lint + unit tests.github/workflows/rest-build-binaries.yml— Go cross-compile (linux-amd64, linux-arm64, darwin-arm64).github/workflows/rest-build-push-docker.yml— 9nico-*container images.github/workflows/rest-build-push-service.yml— service image plumbing.github/workflows/rest-helm-workflows.yml— Helm chart validate + pushDual-pipeline gating
changesjob to bothci.yamlandrest-ci.ymlusingdorny/paths-filter@v3with:base: main+fetch-depth: 0+ PR-refs-onlyif:(dorny only runs onpull-request/Nmirror refs from copy-pr-bot; main/release/tag short-circuit torun_*_ci=true)predicate-quantifier: everyon the core side with negative filters to catch any non-rest pathprepare; downstream jobs skip vianeeds.prepare.result == 'success'cascadeci-run-complete-pipelineforces both pipelinesAggregator pattern (stable required check per workflow)
carbide-ci-pass(inci.yaml) —needs: [changes, prepare, build-release-container-x86_64, build-release-container-aarch64, security-secret-scan, lint-police]rest-ci-pass(inrest-ci.yml) —needs: [changes, prepare, lint-and-test, build-binaries, security-secret-scan, build-and-push, helm]if: always()+ jq logic:skippedcounts as pass,failure/cancelledfail the aggregatorREST helm aligned to core's pattern
detect-changesandvalidate-versionsjobs (no more manualChart.yamlbump check)validate-chartsnow runs unconditionally on every PRpush-chartsgate:!cancelled() && event != schedule && event != workflow_dispatch && validate.success && !pull-requestprepare.outputs.helm_version(git-describe-derived, SemVer-strict1.6.0-3.gabc1234) — replaces readingversion:fromChart.yamlhelm-package-pushaction SHA pinned to match core (7de61972...)helm_versiononly readnico-rest/Chart.yaml, ignoringnico-rest-site-agentMisc
REST Secret Scan with TruffleHogto avoid collision with core's same-named job in the PR checks UIname: Detect Carbide CI Gateto corechangesjob (UI alignment with REST'sDetect REST CI Gate)VERSIONfile; both core and REST now usegit describemake rest-api/test-<module>(Kyle's Makefile)Why this design
GitHub Actions has no cross-workflow
needs:and workflow-level path filters leave the other side's required checks stuck at "Expected — Waiting for status" when only one pipeline fires. We considered four options (analysis):ci.yamlis 1467 lines and refactor cost is too high before Computex; also incompatible with copy-pr-bot'spull-request/Npush-event model.on: merge_group.base: mainon the dorny filter is critical for copy-pr-bot: each/ok to testforce-pushes the PR head topull-request/N; without an explicit base,dorny/paths-filterwould diff against the previous force-push tip (i.e., only the delta between PR head versions), which would lose earlier changes after a fixup commit.REST helm aligned to core because the original
detect-changes+ manualChart.yamlbump pattern would block main/release/tag publishes whenever someone forgot to bump the chart version. Git-describe-derived version guarantees uniqueness per commit and unblocksngc-duplicate: fail.Test plan
Tested
if: always()+ jq)skippedcorrectly counts as pass; verified on 4 separate runsdorny/paths-filterwithbase: mainon copy-pr-bot mirrorFilter X = true/falsedecisionSecret Scan with TruffleHog(core) andREST Secret Scan with TruffleHog(rest) appear separately in PR checks UI; no collisionvalidate-chartsunconditionalnico-restandnico-rest-site-agentchartspush-chartsskipped on PR!contains(github.ref, 'pull-request/')evaluates false → SKIPPEDnico-*container builds, all binary cross-compile, all lint/test passNot yet tested
base: mainsaw the full PR diff (113 files) and both gates evaluated true; no PR yet has isolated paths against maingit diffagainstchore/rest-ci-testbase showed correct file-list isolationrelease/v0.X.0pushrelease/v0.1.0–release/v0.9.0branches; gate logic forcesrun_*_ci=truefor non-PR refsOpen gaps (from #1756 spec, not blocking this PR)
flow,powershelf-manager,nvswitch-managerhave notest-Xtarget inrest-api/Makefile; matrix has a TODO comment. Blocked on Makefile updates.Next steps
required-checks ruleset
Update ruleset
10088763(mainbranch)required_status_checksfrom:build-release-container-x86_64 / buildbuild-release-container-aarch64 / buildSecret Scan with TruffleHoglint-policeTo:
carbide-ci-passrest-ci-passVersioning
v1.6.0post-merge sogit describeproduces clean output (avoids REST going backward from 1.x to 0.x).