Skip to content

fix(ci): pin the k8s E2E cluster name (#1040) - #1042

Open
RonaldHensbergen wants to merge 1 commit into
mainfrom
fix/1040-k8s-e2e-cluster-name
Open

RonaldHensbergen wants to merge 1 commit into
mainfrom
fix/1040-k8s-e2e-cluster-name

Conversation

@RonaldHensbergen

Copy link
Copy Markdown
Owner

Closes #1040.

Follow-up from the #1027 review: the CI checkout is a detached HEAD, so k3d-env.sh's branch-derived default named the cluster cds-head. This pins CDS_CLUSTER: cds-k8s-e2e-ci in the job env (with a comment explaining why), pins the invariant in tests/test_k8s_e2e_workflow.py, and adds a CHANGELOG entry.

Verified locally: full suite 1972 passed / 24 skipped, ruff and yamllint clean. The workflow itself changes, so the k8s E2E job runs on this PR and will show the new cluster name in its make k3d-down step.

The CI checkout is a detached HEAD, so the branch-derived default in
k3d-env.sh named the cluster "cds-head". Pin CDS_CLUSTER to
"cds-k8s-e2e-ci" in the job env for attributable logs and diagnostics,
and pin the invariant in test_k8s_e2e_workflow.py.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@sonarqubecloud

Copy link
Copy Markdown

@RonaldHensbergen RonaldHensbergen left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Self-review (contributor == reviewer), all angles checked.

Blocking: none.
Major: none.
Minor: none.

Verified beyond the diff itself:

  • Runtime proof, not just green rendering: the E2E job log on this very commit shows creating cluster cds-k8s-e2e-ci and deleting cluster cds-k8s-e2e-ci — the fix works at runtime, not only in YAML.
  • All 14 checks green on b652c8b, including the k3d E2E job (4m35s) and SonarCloud.
  • Full suite locally: 1972 passed / 24 skipped; ruff and yamllint clean.
  • CHANGELOG [Unreleased] Fixed entry present; no E-/W-codes added, so no README troubleshooting or code-collision impact; minimal 3-file diff.

Conclusion: no loose ends or gaps remain for this PR; in my judgment it is merge-ready.

env:
# actions/checkout leaves the runner at a detached HEAD, so the
# branch-derived default in k3d-env.sh would name the cluster "cds-head".
CDS_CLUSTER: cds-k8s-e2e-ci

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Verified at runtime: the E2E job log on this commit shows creating cluster cds-k8s-e2e-ci and deleting cluster cds-k8s-e2e-ci.

self.assertEqual(steps["Delete cluster"]["if"], "always()")
self.assertEqual(steps["Delete cluster"]["run"], "make k3d-down")

def test_job_pins_a_stable_cluster_name(self) -> None:

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Good: the invariant is pinned so the cluster name cannot silently regress to a derived name.

Comment thread CHANGELOG.md

### Fixed

- The `Kubernetes E2E` workflow now pins its k3d cluster name

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Placed under [Unreleased] Fixed with the #1040 reference, matching the repo convention.

This branch has not been deployed

No deployments
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.

k8s-e2e workflow: pin the CI cluster name instead of the derived cds-head

1 participant