Skip to content

test: probe ats GitOps bundle testing under Flux (do not merge)#199

Draft
QuentinBisson wants to merge 10 commits into
mainfrom
test/ats-gitops-bundle-flux
Draft

test: probe ats GitOps bundle testing under Flux (do not merge)#199
QuentinBisson wants to merge 10 commits into
mainfrom
test/ats-gitops-bundle-flux

Conversation

@QuentinBisson

Copy link
Copy Markdown
Contributor

Experimental. Do not merge. Convergence probe, not a permanent CI gate.

Purpose

Exercise app-test-suite's new GitOps bundle testing (giantswarm/app-test-suite #664-#667) against this meta-package, the reference bundle chart. The feature was already proven end-to-end on the flux-bundle-app example (all scenarios green on kind, including the upgrade two-phase). This probes whether the trimmed tests/test-values.yaml render converges under a live Flux engine on kind.

What changed

  • .ats/main.yaml: un-skip smoke, set smoke-tests-gitops-engines: flux, short smoke-tests-gitops-bundle-ready-timeout: 5m.
  • .circleci/workflows.yml: pin execute-chart-tests to the ats dev image 0.15.0-84cda623836b7c03358837fdcdbcecdfbad8370c (the #664-#667 stack tip). Edited the generated file directly because the custom.yml deep-merge appends list items rather than overriding a generated job's params.

ats installs Flux, deploys the bundle into agentic-platform-flux, and waits for every rendered HelmRelease/OCIRepository to report Ready.

Expected outcome

Uncertain, and that is the point. This meta-package renders HelmReleases for ~9 components that pull child charts from OCI and need their own CRDs. On a bare kind cluster the bundle-ready fixpoint may never be reached, which is exactly why .ats/main.yaml skips ATS today and defers real validation to a management cluster. If it times out, that confirms the meta-package is not a kind-testable bundle as-is; if it converges, we have a real CI smoke for the bundle. Either result is informative.

Experimental branch to exercise app-test-suite's new GitOps bundle testing
(app-test-suite #664-#667) against this meta-package. Un-skips the smoke step,
selects the Flux engine, and pins the ats dev image carrying the feature. ats
installs Flux on the kind cluster, deploys the bundle into agentic-platform-flux,
and waits for every rendered HelmRelease/OCIRepository to become Ready.

Short bundle-ready timeout so a non-converging component set fails fast. Not for
merge: this is a convergence probe, not a permanent CI gate.
@QuentinBisson

Copy link
Copy Markdown
Contributor Author

Local verification (prod image, kind v1.34)

Ran the same ats build locally against a fresh kind cluster to get full logs. The bundle converges under Flux and the smoke leg is green end to end:

  • Flux installed; bundle deployed into agentic-platform-flux.
  • Bundle ready: all 4 GitOps resources Readymuster (0.22.10) and agentic-platform-connectivity (1.20.0), both Helm install succeeded.
  • Smoke test test_api_working passed; teardown drained cleanly. ATS exit 0.

So my earlier non-convergence worry was wrong: the trimmed tests/test-values.yaml renders only 2 components (not 9), and both install on bare kind.

Two findings that block the CI run (not the feature)

  1. tests/ats is pipenv (Pipfile), ats runs uv sync. The devctl-generated Pipfile is "DO NOT EDIT" and pipenv-only, so uv sync can't consume it and the pytest step fails before any test runs. This affects any devctl-scaffolded repo that actually enables the ats smoke. Worked around here by adding tests/ats/pyproject.toml mirroring the pins (uv prefers it over the Pipfile). The real fix belongs in devctl (generate a uv project) or in ats (accept a Pipfile).
  2. uv cache perms (app-test-suite#669): running the image as a mapped non-root UID fails uv sync on a root-owned /ats/.cache. Worked around locally by mounting a writable /ats/.cache; may bite the orb-driven CI run depending on how it invokes the container.

Feature verdict: works against the real reference bundle chart. Remaining redness is test-harness plumbing, tracked above.

The new ats runs `uv sync` for the pytest executor; the devctl-generated
Pipfile is pipenv-only and can't be consumed. Convert tests/ats to a uv
project (pyproject.toml + uv.lock) and drop the Pipfile and pytest.ini
(markers move to [tool.pytest.ini_options]).

Verified locally against a kind cluster with the pinned ats dev image: the
bundle reaches Ready under Flux (muster + agentic-platform-connectivity) and
the smoke test passes.
@QuentinBisson

Copy link
Copy Markdown
Contributor Author

Replicated the muster#854 migration

Replaced the earlier ad-hoc pyproject.toml with the proper pipenv→uv migration, matching giantswarm/muster#854 (which is green):

  • tests/ats: dropped Pipfile + pytest.ini, added pyproject.toml (markers under [tool.pytest.ini_options]) + uv.lock.
  • No pre-deploy.sh: muster uses it to seed muster-crds, but this stack's ats predates --app-tests-pre-deploy-script, and the trimmed render converges without seeding (verified).
  • No .python-version: pinning 3.13 makes uv try to download an interpreter into a root-owned dir; the dev image ships 3.14, so letting uv use the container interpreter is correct here.

Re-verified locally against kind with the pinned dev image: bundle Ready under Flux (muster + agentic-platform-connectivity), uv sync ok, smoke passed, drained. ATS exit 0.

The uv migration is the part worth keeping; the Flux engine + image pin in .ats/main.yaml/workflows.yml stay experiment-only (revert before any merge), same convention as muster#854.

@QuentinBisson

Copy link
Copy Markdown
Contributor Author

✅ Green in CI

execute-chart-tests passed (job 2940). The earlier reds were the pinned image tag: architect push-dev publishes X.Y.Z-dev.<branch>.<date>.<time>.h<shorthash>, not the X.Y.Z-<sha> that architect project version prints. Correct tag is 0.15.1-dev.gitops-docs.2026-07-06.17-09-14.h84cda62.

So end to end, on real CI: ats installs Flux on the kind cluster, deploys the agentic-platform bundle, waits for the rendered HelmReleases/OCIRepositories to become Ready (muster + agentic-platform-connectivity), and runs the smoke test. The GitOps bundle testing feature (app-test-suite #664-#667) works against the real reference bundle chart.

Keep: the tests/ats pipenv→uv migration. Revert before any merge: the .ats/main.yaml Flux-engine block and the workflows.yml tag pin (experiment-only, same as muster#854).

tests/ats had only a placeholder smoke test. Add real assertions for the
GitOps bundle: the expected component HelmReleases (muster,
agentic-platform-connectivity) are present and Ready, and the OCIRepository
sources are Ready. Gated to the Flux engine leg so a plain Helm run skips them.

.ats runs smoke/functional/upgrade under Flux. The upgrade baseline is the
latest published stable deployed with the same trimmed test-values, so the
stable release renders the 2-component bundle and converges on kind.

Verified locally on kind: all three scenarios green, upgrade exercises the
two-phase deploy (stable Ready -> upgrade -> Ready) under a live engine.
@QuentinBisson

Copy link
Copy Markdown
Contributor Author

Real tests added + all three scenarios green in CI

tests/ats had only a placeholder. Added bundle-readiness assertions (Flux-leg gated):

  • smoke + functional + upgrade: expected component HelmReleases (muster, agentic-platform-connectivity) present and Ready.
  • functional: OCIRepository sources Ready.
  • test_api_working retained (basic cluster reachability), now runs in all three scenarios.

.ats now runs smoke/functional/upgrade under Flux. Root-caused the earlier upgrade "stall": the stable deploy takes its values from --upgrade-tests-app-config-file, which was unset, so the stable release rendered the full meta-package (~9 components) and couldn't converge on kind. Fixed by setting upgrade-tests-app-config-file: tests/test-values.yaml (same trim as the candidate). Not a PR#666 bug — the upgrade path deployed correctly once given the stable config.

Verified locally (all three green; upgrade exercises stable Ready → upgrade → Ready under Flux) and now green in CI (execute-chart-tests passed). The tests/ats additions are the keep-worthy change; the Flux-engine/upgrade .ats config stays experiment-only.

Add test_muster_component_running (the muster Deployment reaches all-replicas-ready,
flaky-rerun guarded, runs in every scenario incl. before/after upgrade) and
test_connectivity_httproute_present (the connectivity component renders its HTTPRoute
wiring). HelmRelease Ready only means the child chart installed; these assert the
produced workload/wiring is up.

Verified locally on kind: smoke 3/3, functional 5/5, upgrade 3+3 (pre+post).
Extend the Flux experiment to run every scenario under both engines. ats stacks
ci/gitops-values-<engine>.yaml to switch the meta-package's render layer between
Flux HelmReleases and Argo Applications, so the bundle is validated identically
on each.

- ci/gitops-values-{flux,argo}.yaml: engine-selecting overlays (argo project and
  destination server default to what ats provisions on the test cluster)
- .ats/main.yaml: *-tests-gitops-engines flux -> flux,argo
- tests/ats: engine-aware bundle assertions. Component readiness now covers both
  HelmRelease Ready and Application Healthy+Synced; the workload and HTTPRoute
  checks run on both legs; the OCIRepository-source check stays Flux-only (an Argo
  Application embeds its source, with no separate CR)
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