Skip to content

Auto-populate stack payload cache on demand #43

@drernie

Description

@drernie

Context

Today, commands that consume the cached stack payload (e.g. quiltx logs, quiltx ecs ..., quiltx bucket ... when it needs region/account info) require the user to have previously run quiltx catalog stack <dns> to populate stack.json for the catalog.

When the cache is missing, the canonical error is:

No cached stack payload for <dns>. Run quiltx catalog stack <dns> first.

This is the spec'd UX (see [03-stack-ux-stories.md §Stack payload cache], Story 9/10) and is intentionally explicit — but it forces a two-step workflow for first-time use of every catalog.

Proposal

Add an opt-in (or default) auto-populate path: when a consumer detects a missing cache, transparently invoke the equivalent of quiltx catalog stack <dns> (CFN/API describe → write stack.json) and continue.

Open questions:

  • Auth: catalog stack may need credentials the calling command does not currently set up — define the auth contract.
  • Default vs opt-in: silent auto-fetch hides a state transition that some users may want to see. Consider --auto-stack flag, or a userconfig setting.
  • Scope: every consumer of stack_lib.require_stack_payload would need the same handling — factor into a single helper.
  • Error path: on auto-fetch failure, fall back to the canonical error (preserving today's UX).

Out of scope

This issue does not block the canonical error path; that remains the current behavior and the spec'd default.

References

  • Filed as a follow-up from the multi-auth review (REVIEWED.md, package proj/260427-quiltx-multi-auth).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions