Skip to content

olf infra destroy (installed) refusal cannot point at a source-tree deployment's kubeconfig #1343

Open

Description

@malon64

Found while verifying v0.7-beta on kind, with main at 45c9f20.

Check: destroy names its state (#1282 / #1285) — the refusal "points at the other mode's kubeconfig and that mode's destroy command".

What fails: when a stack was deployed from the source tree and the installed olf is asked to destroy it, the refusal names the kubeconfig it read, its mode, state root and foundation state, but does not point at the source-tree kubeconfig or the source-tree destroy command. The pointer is only printed when the other mode's kubeconfig is found at <project dir>/.tmp/kubeconfigs/local.yaml (tools/olf/olf/infra/deployment/local/reachability.py, lines 42-48 and 80-84). For the installed mode that path is relative to the directory olf was started in, so it only matches when olf is run from the repository root. Run from the repository root, though, the installed olf behaves as source-tree olf and performs a real destroy instead of refusing (it destroyed the whole stack and the kind cluster in this verification).

Reproduction

  1. Check out main at 45c9f20, then from the repository root run uv run --project tools/olf --locked olf infra deploy (local kind, any profile) until the cluster is up.
  2. Build and install the openlakeforge wheel in a separate tool directory (uv build for packages/core, packages/lakehouse-services, packages/runtime and tools/olf, then uv tool install --find-links <dist> openlakeforge==<version>).
  3. From an empty directory outside the repository run olf infra destroy with that installed binary.

Observed (exit 1, cluster left untouched, 3 nodes and 80 pods before and after):

ERROR: Kubernetes context 'kind-openlakeforge-local' is not reachable through kubeconfig ~/.openlakeforge/state/local/kubeconfig.yaml (installed olf state root ~/.openlakeforge/state/local; foundation state ~/.openlakeforge/state/local/foundation.tfstate). The platform must be destroyed before the local foundation is destroyed.
kind cluster 'openlakeforge-local' is running at https://127.0.0.1:<port>, but ~/.openlakeforge/state/local/kubeconfig.yaml has no server for that context: this state belongs to another deployment of 'openlakeforge-local'.

Expected: a further line naming the source-tree kubeconfig and the source-tree destroy command (uv run --project tools/olf --locked olf infra destroy from the repository root), as the reverse direction can (the source-tree mode always knows ~/.openlakeforge/state/local/kubeconfig.yaml).

Not verified: the reverse direction (deploy with the installed olf, destroy from the source tree) was not run end to end.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions