Skip to content

fix(init): consolidate scaffold templates and gitignore .astro/*.local.{yml,yaml}#2126

Merged
jlaneve merged 3 commits into
mainfrom
gitignore-astro-local-yml
May 6, 2026
Merged

fix(init): consolidate scaffold templates and gitignore .astro/*.local.{yml,yaml}#2126
jlaneve merged 3 commits into
mainfrom
gitignore-astro-local-yml

Conversation

@jlaneve
Copy link
Copy Markdown
Contributor

@jlaneve jlaneve commented May 6, 2026

Summary

The original two-line gitignore change in this PR was a no-op: astro dev init (and astro-desktop, which scaffolds via the same module) both go through pkg/airflowrt.Scaffold, not through airflow/include/airflow{2,3}/gitignore. The Af{2,3}Gitignore embed vars in airflow/airflow.go had no consumers — so the new lines never reached scaffolded projects.

This PR fixes that and removes the dead duplicate template tree so the same kind of drift can't happen again.

Commits

  1. fix(init): apply gitignore additions to airflowrt source-of-truth — moves the .astro/*.local.yml / .astro/*.local.yaml additions to pkg/airflowrt/include/gitignore, which is what astro dev init actually reads. Reverts the no-op additions in airflow/include/airflow{2,3}/gitignore.

  2. chore(airflow): remove duplicate scaffold templates — deletes the dead Af{2,3}* embeds in airflow/airflow.go and the corresponding files in airflow/include/airflow{2,3}/. After this, the only remaining live embeds are Af2MonitoringDag (used by cloud/deploy) and Af{2,3}Composeyml (used by airflow/container.go); everything else routes through pkg/airflowrt. ~900 lines of stale duplicate templates removed.

After this, pkg/airflowrt/include is the single source of truth for project scaffolding, shared by astro-cli and external consumers like astro-desktop.

Notes for review

  • The cli's dead airflow/include/airflow3/dockerfile had hardcoded the astrocrpublic.azurecr.io/ registry; airflowrt's uses configurable %s placeholders. No behavior change since cli's was unread, but worth flagging — the airflowrt version is the live one.
  • airflow/airflow.Init(...) already calls airflowrt.Scaffold(...) (since the pkg/airflowrt extraction); this PR just removes the now-unused embedded copies.

Test plan

  • go build ./... passes
  • go vet passes for ./airflow/..., ./cloud/deploy/..., ./cmd/..., ./pkg/airflowrt/...
  • go test ./pkg/airflowrt/... passes
  • go test ./cmd/... passes
  • go test ./cloud/deploy/... passes
  • go test ./airflow/... — pre-existing podman/docker env-detection failures on main are unchanged; not introduced by this PR
  • Run astro dev init in an empty dir and confirm .astro/*.local.yml and .astro/*.local.yaml appear in the generated .gitignore
  • Drop a .astro/foo.local.yml and verify git status ignores it

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jlaneve jlaneve requested a review from a team as a code owner May 6, 2026 19:59
@coveralls-official
Copy link
Copy Markdown

coveralls-official Bot commented May 6, 2026

Coverage Report for CI Build 6

Coverage remained the same at 39.746%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 65899
Covered Lines: 26192
Line Coverage: 39.75%
Coverage Strength: 9.41 hits per line

💛 - Coveralls

schnie and others added 2 commits May 6, 2026 17:08
`astro dev init` (and astro-desktop) both scaffold projects via
`pkg/airflowrt.Scaffold`. The `airflow/include/airflow{2,3}/gitignore`
files are dead — their `Af{2,3}Gitignore` embed vars in
`airflow/airflow.go` have no consumers. Move the
`.astro/*.local.{yml,yaml}` additions to `pkg/airflowrt/include/gitignore`
so they actually take effect.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The `airflow/include/airflow{2,3}/` tree contained stale duplicates of
the scaffolding templates that live in `pkg/airflowrt/include/`. Their
backing `Af{2,3}*` embed vars in `airflow/airflow.go` had no consumers
— `astro dev init` already routes through `airflowrt.Scaffold`, and
those templates had silently drifted (e.g. `airflow3/dockerfile`
hardcoded the registry while airflowrt's uses configurable %s
placeholders).

Drop the dead embeds and template files. The remaining live embeds
are kept:
- `Af2MonitoringDag` — used by `cloud/deploy/deploy.go`
- `Af{2,3}Composeyml` — used by `airflow/container.go`

After this, `pkg/airflowrt/include` is the single source of truth for
project scaffolding templates.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@schnie schnie changed the title chore(init): gitignore .astro/*.local.{yml,yaml} in project templates fix(init): consolidate scaffold templates and gitignore .astro/*.local.{yml,yaml} May 6, 2026
@jlaneve jlaneve merged commit 9c6b6ad into main May 6, 2026
5 of 6 checks passed
@jlaneve jlaneve deleted the gitignore-astro-local-yml branch May 6, 2026 22:23
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.

2 participants