Skip to content

fix(deploy-check): resolve the context to a file instead of a package root - #95

Merged
ExtraToast merged 1 commit into
mainfrom
fix/deploy-check-context-resolution
Aug 20, 2026
Merged

fix(deploy-check): resolve the context to a file instead of a package root#95
ExtraToast merged 1 commit into
mainfrom
fix/deploy-check-context-resolution

Conversation

@ExtraToast

Copy link
Copy Markdown
Contributor

deploy-preview failed on every service repo PR after v0.15.0 landed, with all five fragments reporting:

ENOENT: no such file or directory, open
'/home/runner/work/_temp/deploy-preview-context/cluster-context-public.yml'

The preview passed the pulled context package's root as --context-dir. The toolkit looks for cluster-context-public.yml directly inside the directory it is given and does not search, so the nested context/public/ layout that oras pull produces cannot be found that way.

This passed local verification because the directory I pointed at was the one that holds the file, not a package root — so the flat and nested layouts were never compared. The unit tests missed it for the same reason: the stub toolkit records arguments but does not enforce the real --context-dir semantics.

Change

The discovered file is always passed as --context-path, which works for either layout. findClusterContext already searched recursively and preferred context/public/; its result is now used rather than discarded.

Coverage

Two tests, both against the nested layout:

  • every render call receives a --context-path that exists and ends in cluster-context-public.yml, and no --context-dir
  • a nested package resolves to the nested file

Reintroducing --context-dir fails the first. Verified end to end against a deliberately nested local package: five fragments render and the scorecard passes.

… root

The preview passed the pulled context package's root directory as
--context-dir. The toolkit looks for cluster-context-public.yml directly
inside the directory it is given and does not search, so with the nested
context/public/ layout that oras produces it exited

  ENOENT: no such file or directory, open
  '/home/runner/work/_temp/deploy-preview-context/cluster-context-public.yml'

on all five fragments. This passed locally because the directory used there
was the one that holds the file, not the package root, so the two layouts
were never compared.

The discovered file is now always passed as --context-path, which works for
either layout. Two tests cover it: every render must receive a
--context-path that exists and ends in cluster-context-public.yml, and a
nested package must resolve to the nested file. Reintroducing --context-dir
fails the first.
@ExtraToast ExtraToast added type: bug Something is broken or behaving incorrectly. area: deploy homelab-deploy, deploy-v2, manifests, and rollout flow. labels Aug 20, 2026
@ExtraToast ExtraToast self-assigned this Aug 20, 2026
@ExtraToast
ExtraToast merged commit c15011b into main Aug 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: deploy homelab-deploy, deploy-v2, manifests, and rollout flow. type: bug Something is broken or behaving incorrectly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant