Skip to content

test: migrate workload-derives-deployment from infra (WIP)#160

Draft
ecv wants to merge 1 commit into
mainfrom
test/migrate-workload-derives-deployment-from-infra
Draft

test: migrate workload-derives-deployment from infra (WIP)#160
ecv wants to merge 1 commit into
mainfrom
test/migrate-workload-derives-deployment-from-infra

Conversation

@ecv

@ecv ecv commented Jul 1, 2026

Copy link
Copy Markdown

WIP / DRAFT — not intended to be green CI yet. See "Known-uncertain" below.
Depends on #159 (the workload-api-acceptance migration), which introduces
the Chainsaw harness (kind + chainsaw Makefile tooling and the
make test-chainsaw target). This PR adds test files only.

What

Migrates the workload-derives-deployment Chainsaw test out of
datum-cloud/infra into this repo (the owner of the compute.datumapis.com
Workload / WorkloadDeployment contract).

  • New test: test/e2e/workload-derives-deployment/ (chainsaw test + location.yaml,
    network.yaml, workload.yaml fixtures copied from infra).
  • Applies a Workload, asserts the control plane accepts it, waits for the
    derived WorkloadDeployment (e2e-derived-workload-central) to reach
    Progressing=true, and asserts it — control-plane derivation only, no wait for
    VMs to become Available.

Why

datum-cloud/infra#3006 consolidates infra's live-env Chainsaw suite into one
"construct" group and evacuates single-service API-contract tests to their owning
repos, to be run against the local kind harness pre-merge. This test validates a
compute.datumapis.com contract owned by this repo.

Related: datum-cloud/infra#3006, datum-cloud/infra#3005.

Adaptations from the infra original

  • Removed the datumctl auth update-kubeconfig setup step and the
    clusters: / cluster: project blocks referencing ./test-kubeconfig.
  • Target a local kind cluster via spec.cluster: compute-e2e, mirroring NSO.
  • Removed spec.skip: true.

Introduces Chainsaw to compute — decision to confirm

Compute has no Chainsaw harness today (only the kubebuilder Go e2e stub).
This PR relies on the proposed Chainsaw harness added in #159. The compute team
should decide between:

Known-uncertain

  • Networking CRDs / controller are not in this repo. Fixtures use
    networking.datumapis.com (Location, Network); a compute-only kind env
    will not serve them unless NSO CRDs are installed in the e2e bring-up.
  • Workload derivation depends on the networking integration. The Workload
    validating webhook lists LocationBinding and validates cityCodes: [ORD]
    against LocationBinding.Spec.Topology["topology.datum.net/city-code"], so a
    matching LocationBinding (not just the Location in the fixture) is required
    or ValidateCreate fails Invalid. Reaching WorkloadDeployment Progressing=true further depends on the controller's networking behavior:
    with NetworkingEnabled=false the Network scheduling gate is cleared and
    Progressing can be reached without networking; with it enabled, a resolvable
    Location/Network is needed. The correct harness config (install NSO CRDs +
    LocationBinding fixture, vs. run compute with NetworkingEnabled=false) is a
    compute-team decision. This is the same class of failure that had the original
    test skip: true (infra #2733).
  • spec.cluster name assumed compute-e2e (see test: migrate workload-api-acceptance from infra (WIP) #159; KIND_CLUSTER var).
  • 3m wait timeout carried over from the infra original; may need tuning for
    the local harness.

Migrate the Workload-derives-WorkloadDeployment contract test out of
datum-cloud/infra into the owning repo, per datum-cloud/infra#3006. That issue
consolidates infra's live-env Chainsaw suite into one "construct" group and
evacuates single-service compute.datumapis.com contract tests to compute, run
against the local kind harness pre-merge.

This test applies a Workload and asserts the control plane accepts it, then
waits for the derived WorkloadDeployment (<name>-central) to reach
Progressing=true and asserts it — control-plane derivation only, no wait for
VMs to become Available.

Key changes:
- Add test/e2e/workload-derives-deployment/ with the chainsaw test and the
  location.yaml / network.yaml / workload.yaml fixtures copied from infra.
- Drop the datumctl auth update-kubeconfig setup step and the project
  control-plane cluster block; target a local kind cluster via spec.cluster,
  mirroring datum-cloud/network-services-operator.
- Remove spec.skip: true.

Depends on the chainsaw harness introduced in the workload-api-acceptance
migration PR (Makefile kind + chainsaw tooling and the test-chainsaw target).
@ecv

ecv commented Jul 1, 2026

Copy link
Copy Markdown
Author

⚠️ Action required before this leaves draft

  1. Depends on test: migrate workload-api-acceptance from infra (WIP) #159 for the Chainsaw harness wiring (Makefile tool vars + test-chainsaw
    target). Merge/settle test: migrate workload-api-acceptance from infra (WIP) #159 first.
  2. Networking dependency (same as test: migrate workload-api-acceptance from infra (WIP) #159): reaching WorkloadDeployment Progressing=true
    requires the Workload to pass admission — which needs networking.datumapis.com CRDs +
    a matching LocationBinding — and depends on the controller's NetworkingEnabled flag.
    Resolve the networking-CRD decision from test: migrate workload-api-acceptance from infra (WIP) #159 before this can go green.
  3. Chainsaw-vs-Go-e2e direction inherited from test: migrate workload-api-acceptance from infra (WIP) #159 — confirm.

Not green CI by design (draft). Tracks datum-cloud/infra#3006.

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