Skip to content

scaffold generate records a ephemeral path in spec.source for remote template sources #2885

Closed

Description

Atmos version

1.225.0

Reproduction

# any public git:: or https:// scaffold template repo reproduces this
atmos scaffold generate "git::https://github.com/<org>/<scaffold-template-repo>.git" ./out --defaults

cat ./out/.atmos/scaffold.yaml

spec.source is recorded as an OS temp directory path, e.g.:

spec:
  source: /var/folders/xx/.../atmos-scaffold-1234567890

Atmos itself deletes that directory immediately after the command finishes:

ls "$(yq '.spec.source' ./out/.atmos/scaffold.yaml)"
# ls: /var/folders/.../atmos-scaffold-1234567890: No such file or directory

A local template source (a relative/absolute path, or file://...) does not have this problem — spec.source correctly records the original path in that case.

Expected

spec.source should record the original template source string the user/caller specified — the git::... URL, the bare https://... URL, whatever was passed to atmos scaffold generate/atmos init — not the ephemeral directory Atmos downloaded it into and then deleted.

Impact

.atmos/scaffold.yaml's spec.source/spec.baseRef fields exist specifically to record provenance for future updates. For every remote scaffold template, that provenance is a dangling reference to a directory that no longer exists as soon as generation completes — useless for anything (tooling, --update, or a human) that wants to read it back later to know where the project came from.

Activity

  1. jorrite commented on Aug 6, 2026

    @jorrite
    ContributorAuthor

    Proposed a fix in #2869 .

  2. osterman commented on Aug 6, 2026

    @osterman
    Member

    I agree, this appears to be a bug.

  3. jorrite commented on Aug 18, 2026

    @jorrite
    ContributorAuthor

    Closing, fixed via #2869.

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