Skip to content

fix(system): report the stack whose manifest matches the running images - #1171

Open
catinspace-au wants to merge 3 commits into
mainfrom
fix/stack-from-manifest
Open

catinspace-au wants to merge 3 commits into
mainfrom
fix/stack-from-manifest

Conversation

@catinspace-au

Copy link
Copy Markdown
Contributor

A Docker install's compose keeps its build-time stack name. A later stack still shows that older name while running newer images.

The engine reads published stack manifests (ghcr.io/hyperi-io/dfe-stack-manifest) in the background after startup. It reports the newest release, then the newest prerelease, whose digests match every image in DFE_ENGINE_STACK_IMAGES. This matches dfe-infra's ordering: a release beats release candidates with identical images.

  • /system/version and /system/deployment report the matching stack with source "registry". The deploy-repo pins still win. The stack_version label stays the fallback.
  • Startup and readiness never wait on the registry. A failure or no match logs one warning and keeps the label.
  • DFE_ENGINE_STACK_RESOLVE=false switches off registry lookup for an air-gapped site. DFE_ENGINE_STACK_MANIFEST_REPOSITORY points the lookup at a mirror.
  • The settings loader now keeps false or zero top-level environment values. Dropping them caused DFE_ENGINE_STACK_RESOLVE=false to be ignored.

The resolver does not verify the artifact signature.

A Docker install's compose keeps its build-time stack name. A later stack still shows that older name while running newer images.

The engine reads published stack manifests (ghcr.io/hyperi-io/dfe-stack-manifest) in the background after startup. It reports the newest release, then the newest prerelease, whose digests match every image in DFE_ENGINE_STACK_IMAGES. This matches dfe-infra's ordering: a release beats release candidates with identical images.

- /system/version and /system/deployment report the matching stack with source "registry". The deploy-repo pins still win. The stack_version label stays the fallback.
- Startup and readiness never wait on the registry. A failure or no match logs one warning and keeps the label.
- DFE_ENGINE_STACK_RESOLVE=false switches off registry lookup for an air-gapped site. DFE_ENGINE_STACK_MANIFEST_REPOSITORY points the lookup at a mirror.
- The settings loader now keeps false or zero top-level environment values. Dropping them caused DFE_ENGINE_STACK_RESOLVE=false to be ignored.

The resolver does not verify the artifact signature.
The stack resolution task caught only registry errors. Other exceptions ended it with no log.

- Each failure except cancellation logs one warning with its reason. The stack_version label is kept. Cancellation passes through.
- A non-list tag response is rejected as a registry error.
- A deploy repo's stack pin takes precedence, so registry reads are skipped. The pin is read the same way as in deployment facts.
- Tests cover startup with a stalled registry, task cancellation at shutdown, and skipping registry reads for pinned stacks.
ty flags a contextmanager annotated as Iterator.
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