Skip to content

ci(kwok): add flux-git lane with in-cluster gitea#1290

Merged
mchmarny merged 3 commits into
NVIDIA:mainfrom
haarchri:feature/kwok-flux-git-lane
Jun 13, 2026
Merged

ci(kwok): add flux-git lane with in-cluster gitea#1290
mchmarny merged 3 commits into
NVIDIA:mainfrom
haarchri:feature/kwok-flux-git-lane

Conversation

@haarchri

@haarchri haarchri commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the flux-git KWOK deployer lane: an in-cluster Gitea receives the filesystem bundle via git push, and Flux reconciles it from a GitRepository source — closing the Git-source round-trip gap in the deployer matrix. Along the way this fixes the chainsaw sync-gate exists-semantics bug (#1288).

Motivation / Context

The KWOK matrix only validated OCI round-trips (argocd-oci, argocd-helm-oci, flux-oci — ADR-008 / PR #956). The flux deployer's Git output shape (sources/gitrepo-*.yaml GitRepository CRs, branch: main default, GitRepository sourceRef on local-chart HelmReleases) had zero end-to-end coverage, so regressions in it would ship undetected. The first live run of the new lane immediately surfaced two such masked bugs — validating the premise. Design rationale in ADR-010 (docs/design/010-kwok-git-source-lanes.md).

Fixes: #1288
Related: #963 (flux half; argocd-git follows on the same Gitea infra), #843, #1285, kubernetes-sigs/dra-driver-nvidia-gpu#1184

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Build/CI/tooling

Component(s) Affected

  • CLI (cmd/aicr, pkg/cli)
  • API server (cmd/aicrd, pkg/server)
  • Recipe engine / data (pkg/recipe)
  • Bundlers (pkg/bundler, pkg/component/*)
  • Collectors / snapshotter (pkg/collector, pkg/snapshotter)
  • Validator (pkg/validator)
  • Core libraries (pkg/errors, pkg/k8s)
  • Docs/examples (docs/, examples/)
  • Other: KWOK test infra (kwok/, tests/chainsaw/kwok), CI workflows (.github/), conformance validators (validators/), component values (recipes/components, recipes/checks)

Implementation Notes

Testing

unset GITLAB_TOKEN
make qualify                                          # PASS ("Codebase qualification completed")
golangci-lint run -c .golangci.yaml ./validators/...  # 0 issues
go test -race ./validators/deployment/... ./validators/conformance/...  # ok
make bom-docs                                         # regenerated, no diff (values change is name-only)

# Lane end-to-end on a fresh Kind cluster (new 3300 port mapping):
kind delete cluster --name aicr-kwok-test
make kwok-test-deployer RECIPE=eks-training DEPLOYER=flux-git
kubectl get gitrepo -A
NAMESPACE     NAME                                                           URL                                                                       AGE     READY   STATUS
flux-system   aicr-bundle                                                    http://gitea.aicr-registry.svc.cluster.local:3000/aicr/eks-training.git   3m30s   True    stored artifact for revision 'main@sha1:5cfc60766d957eca628620afde8b6f27618fcecb'
flux-system   gitea-aicr-registry-svc-cluster-local-3000-aicr-eks-training   http://gitea.aicr-registry.svc.cluster.local:3000/aicr/eks-training.git   3m29s   True    stored artifact for revision 'main@sha1:5cfc60766d957eca628620afde8b6f27618fcecb'

[...]
INFO] ========================================
[INFO] Results
[INFO] ========================================
  ✓ eks-training
[INFO] Cleaning up for next test...
node "gpu-0" force deleted
node "gpu-1" force deleted
node "gpu-2" force deleted
node "gpu-3" force deleted
node "system-0" force deleted
node "system-1" force deleted
No resources found
[INFO] All 1 recipe(s) passed!
[INFO] Cluster preserved. Delete with: kind delete cluster --name aicr-kwok-test

Risk Assessment

  • Low — Isolated change, well-tested, easy to revert
  • Medium — Touches multiple components or has broader impact
  • High — Breaking change, affects critical paths, or complex rollout

Rollout notes:

  • Local KWOK clusters created before this PR must be recreated (kind delete cluster --name aicr-kwok-test) to pick up the 3300→30300 port mapping; install-infra.sh exit 71 is the telltale.
  • CI matrix grows: Tier 1 +1 cell per generic overlay, Tier 3 +1 deployer per recipe (batching stays under GitHub's 256-config cap).

Checklist

  • Tests pass locally (make test with -race)
  • Linter passes (make lint)
  • I did not skip/disable tests to make CI green
  • I added/updated tests for new functionality
  • I updated docs if user-facing behavior changed
  • Changes follow existing patterns in the codebase
  • Commits are cryptographically signed (git commit -S) — GPG signing info

@haarchri haarchri requested review from a team as code owners June 10, 2026 12:22
@copy-pr-bot

copy-pr-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: a6114b6a-4e71-4253-b300-24d2155a42b9

📥 Commits

Reviewing files that changed from the base of the PR and between ec3a15f and 4ea7bed.

📒 Files selected for processing (2)
  • .settings.yaml
  • Makefile

📝 Walkthrough

Walkthrough

This pull request introduces the flux-git deployer lane to the KWOK testing matrix and fixes Chainsaw sync-gate semantics so gates require ALL resources to converge. It adds Gitea install wiring (Deployment, NodePort Service, health probe, admin bootstrap) and diagnostics, updates CI matrices, Kind port mappings, Makefile and action metadata, extends runner/validator scripts to generate and push git-mode bundles to in-cluster Gitea, applies Flux GitRepository/Kustomization wrappers, adjusts cleanup to sweep inner sources, adds a flux-git-specific Chainsaw test, applies the error-polarity sync-gate fix to flux-sync, and updates ADRs and contributor documentation.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related issues

  • #1288: The PR directly addresses this sync-gate correctness bug by converting terminal-pass asserts to error-polarity negations in both flux-sync and flux-git-sync, enforcing all-resources-converged semantics instead of any-resource-converged.

Suggested labels

theme/ci-dx

Suggested reviewers

  • mchmarny
  • lockwobr
  • lalitadithya
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'ci(kwok): add flux-git lane with in-cluster gitea' is clear, specific, and directly summarizes the main feature addition in the changeset.
Description check ✅ Passed The description provides comprehensive context about the flux-git lane addition, related design decisions (ADR-010), motivation, testing results, and rollout implications.
Linked Issues check ✅ Passed The PR comprehensively addresses issue #1288 by implementing existence-safety assertions combined with error-polarity negation in chainsaw sync gates, replacing the buggy 'any-match' semantics with true 'all resources converged' enforcement across flux-sync, flux-git-sync, and related tests.
Out of Scope Changes check ✅ Passed All changes align with stated objectives: KWOK deployer matrix extension (flux-git lane), sync-gate correctness fixes (#1288), infrastructure setup (Gitea), documentation updates, and CI workflow expansion. No unrelated modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@mchmarny mchmarny left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @haarchri — this is a lot of careful work landing in one PR, and the bundling makes sense (#1288 and #1289 only surfaced because the new lane existed). ADR-010 is comprehensive, the distinct exit codes 70/71/72 follow the existing pattern, and the DRA name rollback is documented in 5 places that cross-reference each other so it's hard to drift.

One actionable: add the upstream kubernetes-sigs/dra-driver-nvidia-gpu issue link in values.yaml so "revert when the chart fix ships" has a closeable trigger. Two nits inline. Nothing blocking.

The workload rename (nvidia-dra-driver-gpu-*dra-driver-nvidia-gpu-*) is a behavior change anyone selecting on the old names will feel — your rollout note already covers it, just flagging for visibility.

Comment thread recipes/components/nvidia-dra-driver-gpu/values.yaml Outdated
Comment thread validators/deployment/expected_resources_test.go Outdated
namespace: flux-system
status:
((conditions[?type=='Ready']|[0].status == 'True') || ((conditions[?type=='Released']|[0].status == 'True') && (history|[0].status == 'deployed') && (conditions[?type=='Stalled']|[0].status != 'True'))): true
((conditions[?type=='Ready']|[0].status != 'True') && ((conditions[?type=='Released']|[0].status != 'True') || (history|[0].status != 'deployed') || (conditions[?type=='Stalled']|[0].status == 'True'))): true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existence + error-polarity pair is exactly the right fix, and the WHY comment ("1 Ready + 12 dependency-blocked HRs passed instantly") is the kind of context that saves the next person hours. Quickly verified the De Morgan'd predicate against the positive form — matches. Nice catch surfacing this from the flux-git lane.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
recipes/components/nvidia-dra-driver-gpu/values.yaml (1)

59-59: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add the upstream issue link to unblock restoration.

The comment references an upstream bug but provides no issue number or link. Without a tracking reference, the "restore the override once a fixed chart ships" guidance on lines 60-61 is unactionable — nobody will know when the fix is available.

📎 Suggested fix
-  kubernetes-sigs/dra-driver-nvidia-gpu; restore the override (and the
+  kubernetes-sigs/dra-driver-nvidia-gpu#<issue-number>; restore the override (and the
   nvidia-dra-driver-gpu-* workload names below) once a fixed chart
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@recipes/components/nvidia-dra-driver-gpu/values.yaml` at line 59, The comment
that says "bundle of this component. Upstream bug filed against" and the
follow-up guidance to "restore the override once a fixed chart ships" lacks an
upstream issue reference; update that comment in values.yaml to include the
upstream issue URL or issue/PR number (or a link to the vendor's issue tracker)
so anyone can track the fix, and if the exact issue is unknown add a TODO with a
clear placeholder like "UPSTREAM-ISSUE: <url-or-number>" so the restore action
is actionable and discoverable.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@recipes/components/nvidia-dra-driver-gpu/values.yaml`:
- Line 59: The comment that says "bundle of this component. Upstream bug filed
against" and the follow-up guidance to "restore the override once a fixed chart
ships" lacks an upstream issue reference; update that comment in values.yaml to
include the upstream issue URL or issue/PR number (or a link to the vendor's
issue tracker) so anyone can track the fix, and if the exact issue is unknown
add a TODO with a clear placeholder like "UPSTREAM-ISSUE: <url-or-number>" so
the restore action is actionable and discoverable.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 6295b579-ea28-4986-a7fb-7fa55ee74861

📥 Commits

Reviewing files that changed from the base of the PR and between 7bb7059 and 5188632.

📒 Files selected for processing (21)
  • .github/actions/kwok-test/action.yml
  • .github/workflows/kwok-recipes.yaml
  • .settings.yaml
  • Makefile
  • docs/contributor/inference-perf-fluctuation.md
  • docs/contributor/tests.md
  • docs/contributor/validator.md
  • docs/design/008-kwok-deployer-matrix.md
  • docs/design/010-kwok-git-source-lanes.md
  • kwok/README.md
  • kwok/kind-config.yaml
  • kwok/scripts/install-infra.sh
  • kwok/scripts/run-all-recipes.sh
  • kwok/scripts/validate-scheduling.sh
  • recipes/checks/nvidia-dra-driver-gpu/health-check.yaml
  • recipes/components/nvidia-dra-driver-gpu/values.yaml
  • tests/chainsaw/ai-conformance/common/assert-dra-driver.yaml
  • tests/chainsaw/kwok/flux-git-sync/chainsaw-test.yaml
  • tests/chainsaw/kwok/flux-sync/chainsaw-test.yaml
  • validators/conformance/dra_support_check.go
  • validators/deployment/expected_resources_test.go

@mchmarny

mchmarny commented Jun 10, 2026

Copy link
Copy Markdown
Member

Looks like the root-caused the OKE flux failures (all 6 OKE flux-oci / flux-git cells) has one-line fix.

Symptom (from helm-controller logs on Tier 1: oke-inference (flux-oci)):

Helm install failed for release nvidia-dra-driver/... with chart [email protected]:
  error while running post render on manifests: yaml: unmarshal errors:
  line 29: mapping key "nvidia-dra-driver-gpu-component" already defined at line 28

This is exactly the upstream duplicate-label bug this PR is fixing — but recipes/components/nvidia-dra-driver-gpu/values-oke.yaml still carries the old nameOverride: nvidia-dra-driver-gpu from #1285 (L23-25 on main):

# See values.yaml for why both nameOverride and fullnameOverride are pinned.
nameOverride: nvidia-dra-driver-gpu          # ← needs to go
fullnameOverride: nvidia-dra-driver-gpu

OKE recipes merge values-oke.yaml on top of values.yaml, so the override comes back, and Flux's strict YAML parser rejects the rendered pod template.

Why only OKE-flux fails:

  • helm / argocd-* parse YAML leniently and silently accept the duplicate (so they pass)
  • Flux's helm-controller post-renderer is strict (so it fails)
  • Other overlays don't include values-oke.yaml, so flux-* there is fine

Cascade: nvsentinel and prometheus-adapter HelmReleases fail with dependency 'nvidia-dra-driver-gpu' is not ready — same root cause via the dependsOn chain.

Fix: delete the nameOverride line in values-oke.yaml (keep fullnameOverride) and update the comment header to match the new rationale in values.yaml. The 5 cross-referencing comments elsewhere already imply OKE doesn't deviate, so no other changes needed.

@haarchri

Copy link
Copy Markdown
Contributor Author

@mchmarny seeing upstream folks working on the issue regarding the label kubernetes-sigs/dra-driver-nvidia-gpu#1187 - we want to wait for a v0.4.1 or RC release and pin this ?

@haarchri haarchri requested a review from mchmarny June 11, 2026 05:45
@mchmarny

Copy link
Copy Markdown
Member

we want to wait for a v0.4.1 or RC release and pin this ?

Yes, let's give it a day, than we pin to the RC.

@haarchri haarchri force-pushed the feature/kwok-flux-git-lane branch from 807e52b to 356032f Compare June 12, 2026 11:06
@haarchri haarchri force-pushed the feature/kwok-flux-git-lane branch from 356032f to ec3a15f Compare June 12, 2026 11:07
@haarchri

Copy link
Copy Markdown
Contributor Author

@mchmarny i removed the changes for the issue: #1289 - so it is expected that the CI will fail because of the DRA issue - when fixed on main with an chart bump we can rebase

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/actions/kwok-test/action.yml (1)

110-111: ⚠️ Potential issue | 🔴 Critical

Gate Flux installation on Flux deployers (matches flux_version documented contract)

flux_version is documented as required only for flux-oci and flux-git, but /.github/actions/kwok-test/action.yml always passes install_flux: 'true' (with flux_version defaulting to ''):

        install_flux: 'true'
        flux_version: '${{ inputs.flux_version }}'

/.github/actions/setup-build-tools/action.yml installs Flux when install_flux=true and fails if FLUX_VERSION is empty, so non-Flux deployers (including the default deployer: helm) will break. Gate install_flux based on inputs.deployer (or require/populate flux_version for all deployers).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/actions/kwok-test/action.yml around lines 110 - 111, The action
always sets install_flux: 'true' and passes flux_version even when deployer is
not a Flux deployer; change the logic in .github/actions/kwok-test/action.yml so
install_flux is only true when inputs.deployer indicates a Flux-based deployer
(e.g., 'flux-oci' or 'flux-git') or alternatively require/populate
inputs.flux_version for all deployers; locate the install_flux and flux_version
keys in the job inputs (references: install_flux, flux_version, inputs.deployer)
and gate setting install_flux (or validate flux_version) accordingly so
setup-build-tools no longer receives an empty FLUX_VERSION for non-Flux
deployers.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/design/010-kwok-git-source-lanes.md`:
- Around line 141-145: The architecture diagram entry for the aicr-registry uses
the incorrect image tag "registry:3" which conflicts with the ADR and KWOK
install docs; update the diagram text inside the block that shows
"aicr-registry" so the image label reads "registry:2" (matching other references
like registry:2 and the KWOK deployment image) to keep the documentation
consistent.
- Around line 97-103: In docs/design/010-kwok-git-source-lanes.md the ADR
reference links use "../docs/..." which, relative to docs/design, resolves to
docs/docs/...; update those links to use sibling-relative paths (e.g. replace
"../docs/..." with "../..."/appropriate "../<file>" so they point to the
intended files) ensuring each ADR link correctly targets the file from the
docs/design directory.

In `@kwok/scripts/validate-scheduling.sh`:
- Around line 968-981: The GIT_PUSH_URL currently embeds KWOK_GITEA_USER and
KWOK_GITEA_PASSWORD raw, which breaks URLs when credentials contain reserved
chars; update the script to URL-encode the overrides before constructing
GIT_PUSH_URL (or alternatively set credentials via git config/environment
instead of embedding). Implement or call a helper (e.g., url_encode or similar)
to encode ${KWOK_GITEA_USER} and ${KWOK_GITEA_PASSWORD} and use the encoded
variables when forming
GIT_PUSH_URL="http://${ENC_USER}:${ENC_PASS}`@localhost`:${gitea_host_port}/${gitea_user}/${recipe}.git"
(keep GIT_IN_CLUSTER_URL unchanged). Ensure any helper is sourced/defined in the
same script so encoding always runs when KWOK_GITEA_USER/KWOK_GITEA_PASSWORD are
overridden.

In `@tests/chainsaw/kwok/flux-git-sync/chainsaw-test.yaml`:
- Around line 144-167: Update the misleading numeric step references in the sync
note so they use step identifiers instead of step numbers: replace the comment
that says "Steps 2-4 (Kustomization, the HelmRelease terminal-pass predicate,
ArtifactGenerator) MUST stay byte-identical" with wording that names the steps
(e.g., refer to assert-kustomization-ready, the HelmRelease terminal-pass
predicate step name, and the ArtifactGenerator step name) so the note remains
correct even when assert-no-gitrepository-failed is inserted; apply the same
change to the other occurrences that mirror this comment (the blocks covering
the later ranges).

---

Outside diff comments:
In @.github/actions/kwok-test/action.yml:
- Around line 110-111: The action always sets install_flux: 'true' and passes
flux_version even when deployer is not a Flux deployer; change the logic in
.github/actions/kwok-test/action.yml so install_flux is only true when
inputs.deployer indicates a Flux-based deployer (e.g., 'flux-oci' or 'flux-git')
or alternatively require/populate inputs.flux_version for all deployers; locate
the install_flux and flux_version keys in the job inputs (references:
install_flux, flux_version, inputs.deployer) and gate setting install_flux (or
validate flux_version) accordingly so setup-build-tools no longer receives an
empty FLUX_VERSION for non-Flux deployers.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 55aed5ed-dfa3-4e1a-bfe3-f54674ffc2f0

📥 Commits

Reviewing files that changed from the base of the PR and between 807e52b and ec3a15f.

📒 Files selected for processing (14)
  • .github/actions/kwok-test/action.yml
  • .github/workflows/kwok-recipes.yaml
  • .settings.yaml
  • Makefile
  • docs/contributor/tests.md
  • docs/design/008-kwok-deployer-matrix.md
  • docs/design/010-kwok-git-source-lanes.md
  • kwok/README.md
  • kwok/kind-config.yaml
  • kwok/scripts/install-infra.sh
  • kwok/scripts/run-all-recipes.sh
  • kwok/scripts/validate-scheduling.sh
  • tests/chainsaw/kwok/flux-git-sync/chainsaw-test.yaml
  • tests/chainsaw/kwok/flux-sync/chainsaw-test.yaml

Comment on lines +97 to +103
Host 3300, not Gitea's default 3000, for the same collision-avoidance
reason as the registry's 5500-vs-5000 (port 3000 is commonly held by
Grafana / local dev servers).

**Branch `main` is a hard requirement.** The bundler defaults
`GitRepository.ref.branch` to `main` (`resolveTargetRevision()`), and
there is no CLI flag to change it for filesystem output, so the test

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix the relative links in the ADR references.

These paths are resolved from docs/design/, so ../docs/... points at docs/docs/... and breaks the links. Use sibling-relative paths instead.

Suggested fix
-Lane details, sync gates, exit codes, and tuning variables are
-documented in
-[docs/contributor/tests.md](../docs/contributor/tests.md) ("KWOK
-Matrix Testing"); design rationale in
-[ADR-008](../docs/design/008-kwok-deployer-matrix.md) (OCI lanes) and
-[ADR-010](../docs/design/010-kwok-git-source-lanes.md) (Git-source
-lanes).
+Lane details, sync gates, exit codes, and tuning variables are
+documented in
+[docs/contributor/tests.md](../contributor/tests.md) ("KWOK Matrix
+Testing"); design rationale in
+[ADR-008](008-kwok-deployer-matrix.md) (OCI lanes) and
+[ADR-010](010-kwok-git-source-lanes.md) (Git-source lanes).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/design/010-kwok-git-source-lanes.md` around lines 97 - 103, In
docs/design/010-kwok-git-source-lanes.md the ADR reference links use
"../docs/..." which, relative to docs/design, resolves to docs/docs/...; update
those links to use sibling-relative paths (e.g. replace "../docs/..." with
"../..."/appropriate "../<file>" so they point to the intended files) ensuring
each ADR link correctly targets the file from the docs/design directory.

Comment on lines +141 to +145
┌─────────────────── Kind cluster (KWOK-enabled) ───────────────────┐
│ │
│ ┌──────────────────────────┐ ┌───────────────────────────┐ │
│ │ aicr-registry │ │ flux-system │ │
│ │ registry:3 Service:5000 │ │ source-controller │ │

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Correct the registry image label in the architecture diagram.

registry:3 conflicts with the registry:2 image used elsewhere in the ADR and in the KWOK install docs. The diagram should match the actual Deployment image.

Suggested fix
-│  │  registry:3 Service:5000 │      │  source-controller        │  │
+│  │  registry:2 Service:5000 │      │  source-controller        │  │
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/design/010-kwok-git-source-lanes.md` around lines 141 - 145, The
architecture diagram entry for the aicr-registry uses the incorrect image tag
"registry:3" which conflicts with the ADR and KWOK install docs; update the
diagram text inside the block that shows "aicr-registry" so the image label
reads "registry:2" (matching other references like registry:2 and the KWOK
deployment image) to keep the documentation consistent.

Comment on lines +968 to +981
local gitea_host_port="${KWOK_GITEA_HOST_PORT:-3300}"
local gitea_user="${KWOK_GITEA_USER:-aicr}"
local gitea_password="${KWOK_GITEA_PASSWORD:-aicr-kwok-ci}"
# Dual-view URLs (same pattern as OCI_REF / OCI_IN_CLUSTER_REF):
# the runner pushes via the Kind host-port mapping; Flux's
# source-controller clones via Service DNS. --repo gets the
# IN-CLUSTER URL because it is baked into the bundle's own
# GitRepository source CR, which source-controller resolves
# from inside the cluster. The repo must be anonymously
# readable: the bundler's gitrepo template has no secretRef
# (install-infra.sh configures Gitea so pushed repos are
# public via DEFAULT_PUSH_CREATE_PRIVATE=false).
GIT_IN_CLUSTER_URL="http://gitea.aicr-registry.svc.cluster.local:3000/${gitea_user}/${recipe}.git"
GIT_PUSH_URL="http://${gitea_user}:${gitea_password}@localhost:${gitea_host_port}/${gitea_user}/${recipe}.git"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

URL-encode overridden Gitea credentials before building the push URL.

KWOK_GITEA_USER and KWOK_GITEA_PASSWORD are documented as overridable, but this interpolates them raw into http://user:pass@.... Any @, :, /, or # in either value produces an invalid remote URL, so the flux-git push path fails even though Gitea itself is healthy. Encode the credentials first, or pass them through Git config/environment instead of embedding raw values in the URL.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@kwok/scripts/validate-scheduling.sh` around lines 968 - 981, The GIT_PUSH_URL
currently embeds KWOK_GITEA_USER and KWOK_GITEA_PASSWORD raw, which breaks URLs
when credentials contain reserved chars; update the script to URL-encode the
overrides before constructing GIT_PUSH_URL (or alternatively set credentials via
git config/environment instead of embedding). Implement or call a helper (e.g.,
url_encode or similar) to encode ${KWOK_GITEA_USER} and ${KWOK_GITEA_PASSWORD}
and use the encoded variables when forming
GIT_PUSH_URL="http://${ENC_USER}:${ENC_PASS}`@localhost`:${gitea_host_port}/${gitea_user}/${recipe}.git"
(keep GIT_IN_CLUSTER_URL unchanged). Ensure any helper is sourced/defined in the
same script so encoding always runs when KWOK_GITEA_USER/KWOK_GITEA_PASSWORD are
overridden.

Comment on lines +144 to +167
- name: assert-kustomization-ready
description: |
Kustomization must reach Ready=True. Proves kustomize-controller
could PARSE the bundle's root kustomization.yaml and APPLY all
manifests (no template-render bugs, no missing files, no schema
violations).
try:
- assert:
resource:
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: ($kustomizationName)
namespace: flux-system
status:
(conditions[?type=='Ready']|[0].status == 'True'): true
catch:
- script:
content: |
echo "--- Kustomizations ---"
kubectl get kustomization -A 2>&1 || true
kubectl get kustomization -n flux-system -o yaml 2>&1 || true
echo "--- kustomize-controller (tail=200) ---"
kubectl logs -n flux-system deploy/kustomize-controller --tail=200 2>&1 || true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial | 💤 Low value

SYNC NOTE step numbering is off by one due to the extra GitRepository step.

The comment at lines 21-23 says "Steps 2-4 (Kustomization, the HelmRelease terminal-pass predicate, ArtifactGenerator) MUST stay byte-identical" but with the additional assert-no-gitrepository-failed step, those are actually steps 3-5 in this file's step array. Consider updating the comment to reference step names instead of numbers for clarity and maintainability.

The functional content of the Kustomization, HelmRelease, and ArtifactGenerator steps is correctly byte-identical to the sibling flux-sync/chainsaw-test.yaml.

Also applies to: 169-228, 230-274

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/chainsaw/kwok/flux-git-sync/chainsaw-test.yaml` around lines 144 - 167,
Update the misleading numeric step references in the sync note so they use step
identifiers instead of step numbers: replace the comment that says "Steps 2-4
(Kustomization, the HelmRelease terminal-pass predicate, ArtifactGenerator) MUST
stay byte-identical" with wording that names the steps (e.g., refer to
assert-kustomization-ready, the HelmRelease terminal-pass predicate step name,
and the ArtifactGenerator step name) so the note remains correct even when
assert-no-gitrepository-failed is inserted; apply the same change to the other
occurrences that mirror this comment (the blocks covering the later ranges).

@mchmarny

mchmarny commented Jun 12, 2026

Copy link
Copy Markdown
Member

@mchmarny seeing upstream folks working on the issue regarding the label kubernetes-sigs/dra-driver-nvidia-gpu#1187 - we want to wait for a v0.4.1 or RC release and pin this ?

PR 1341 (pin nvidia-dra-driver-gpu to 0.4.1-rc.1) has been merged. Should be unblocked now

@mchmarny mchmarny enabled auto-merge (squash) June 13, 2026 21:27
@mchmarny mchmarny merged commit 91c009a into NVIDIA:main Jun 13, 2026
132 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ci(kwok): chainsaw sync gates pass when ANY resource converges, not ALL

2 participants