Chore/rest ci test#1800
Draft
lachen-nv wants to merge 22 commits into
Draft
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. |
Contributor
Author
|
/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 |
Contributor
Author
|
/ok to test a56dff8 |
🔍 Container Scan Summary
Per-CVE detail lives in the per-service |
Contributor
Author
|
/ok to test c90fc67 |
2a6e535 to
f1eb47d
Compare
Contributor
Author
|
/ok to test f1eb47d |
Contributor
Author
|
/ok to test ede0dcf |
Contributor
Author
|
/ok to test 2c1e90b |
Contributor
Author
|
/ok to test 590d19e |
This was referenced May 21, 2026
Contributor
Author
|
/ok to test 4fafb10 |
Contributor
Author
|
/ok to test 3768f2c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.Closes #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 refsworkflow_dispatchHelm push guard4fafb10fhadbuild-release-container-x86_64fail at the docker build stepOpen gaps (from #1756 spec, not blocking this PR)
make rest-api/test-<module>lost-race/ coverage / JUnit XML in PR comment. Waiting for Kyle's Makefile updates to add-race/ coverage /-vflags.flow,powershelf-manager,nvswitch-managerhave notest-Xtarget inrest-api/Makefile; matrix has a TODO comment. Blocked on Makefile updates.Next steps (post-merge)
Phase 3 — required-checks ruleset flip (small follow-up change)
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-passMonitor ≥3 merges before declaring stable.
Phase 4 — pre-Computex (2026-06-02)
v1.6.0post-merge sogit describeproduces clean output (avoids REST going backward from 1.x to 0.x).release/*trigger →release/**to align with ruleset10088851glob (refs/heads/release/**/**); only matters if multi-segment release branches start being used.ci-run-complete-pipelineescape hatch in a.github/CI.md.Post-Computex
artifact_version(stripv, drop redundantshort_shasuffix wheresemantic_versionalready embeds the SHA) so core and REST artifacts use the same format..github/workflows/docker-build.yml(and other reusable workflows) trigger both pipelines, or stay core-only as today?🤖 Generated with Claude Code