Skip to content

feat(hooks): terraform init lifecycle hooks + --skip-hooks before-* fix - #2574

Merged
Andriy Knysh (aknysh) merged 10 commits into
mainfrom
osterman/global-terraform-hooks
Jun 9, 2026
Merged

Andriy Knysh (aknysh) merged 10 commits into
mainfrom
osterman/global-terraform-hooks

Conversation

@osterman

@osterman Erik Osterman (Cloud Posse) (osterman) commented Jun 5, 2026 •

Copy link
Copy Markdown
Member

what

  • Fix --skip-hooks for before- hooks.* Previously it only skipped after-* hooks; before-terraform-plan/apply/deploy hooks ran regardless. Now --skip-hooks (skip all) and --skip-hooks=name1,name2 (skip by name) are honored symmetrically for before and after events.
  • Add before-terraform-init and after-terraform-init lifecycle hooks for the atmos terraform init command. after-terraform-init is new; before-terraform-init was documented but never dispatched to user hooks — now it fires. They run through the same runHooks/RunAll path, so the skip fix applies to them too.
  • Add tests (real parsed Cobra flag, not viper.Set), strengthen hook-inheritance coverage with a fixture proving top-level terraform.hooks: is inherited by every component (and components.terraform.hooks: is not), update the Hooks docs, blog post, and roadmap.

why

  • --skip-hooks is a global flag bound to Viper inside RunE, but before-* hooks run earlier in PreRunE — so viper.GetString("skip-hooks") never saw the CLI value and before-hooks fired anyway. The flag is now resolved directly from the parsed command (Viper/ATMOS_SKIP_HOOKS fallback), mirroring how --ci and --verbose are read in PreRunE.
  • Init had no user-hook surface at all: init.go wired no hooks and the BeforeTerraformInit event was never dispatched. Wiring PreRunE/PostRunE on the init command (like plan/apply/deploy) closes the lifecycle gap so teams can validate tooling, vendor sources, or notify systems around terraform init declaratively.
  • The previous skip tests injected via viper.Set with a nil command, sidestepping the exact flag-binding lifecycle that was broken — which is how the bug shipped; the new tests fail against the old implementation.

references

  • Hooks documentation: /stacks/hooks
  • Note: before-/after-terraform-init fire on the explicit atmos terraform init, not the implicit init that plan/apply run.

Summary by CodeRabbit

  • New Features
    • Added Terraform init lifecycle event: after-terraform-init (alongside before-terraform-init); Terraform-scoped default hooks can be inherited by Terraform components.
  • Bug Fixes
    • Fixed --skip-hooks precedence so CLI flag reliably overrides env/config and consistently skips before/after hook phases.
    • Clarified hook scope handling so misplaced hook keys aren’t incorrectly applied.
  • Documentation
    • Blog, docs, and roadmap updated to describe init hook events and skip-hooks behavior.
  • Tests
    • Expanded coverage for hook inheritance, scope, init wiring, event filtering, and skip-hooks CLI behavior.
  • Chores
    • CI Codecov step made non-fatal for transient upload errors.

--skip-hooks only skipped after-* hooks. before-* hooks run in PreRunE,
before the global persistent flag is bound to Viper in RunE, so the skip
decision (viper.GetString("skip-hooks") in RunAll) never saw the CLI value
and before-hooks fired regardless.

Resolve the flag directly from the Cobra command (preferring an explicitly
set flag, falling back to Viper for ATMOS_SKIP_HOOKS/default), mirroring how
--ci and --verbose are read in PreRunE. This makes skipping symmetric across
before-* and after-* for plan, apply, and deploy.

Tests:
- TestResolveSkipHooks: drives a real parsed Cobra flag (not viper.Set),
  covering nil-cmd fallback, bare flag, list, env fallback, and CLI-wins
  precedence. Fails against the old viper-only implementation.
- TestRunAll_SkipHooksFromCobraFlag: a before-terraform-plan hook is skipped
  via the real flag and fires when absent (negative path).
- Strengthen stack_processor_process_stacks_test hooks cases to assert
  inheritance onto components; add TestProcessStackConfig_HooksWrongScopeNotInherited.
- Add describe-component end-to-end test + fixture proving top-level
  terraform.hooks (and global hooks:) are inherited by a component with no
  hooks of its own.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@atmos-pro

atmos-pro Bot commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

@osterman Erik Osterman (Cloud Posse) (osterman) added the patch A minor, backward compatible change label Jun 5, 2026
@github-actions github-actions Bot added the size/m Medium size PR label Jun 5, 2026
@github-actions

github-actions Bot commented Jun 5, 2026 •

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@coderabbitai

coderabbitai Bot commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor

Wondering what really moved? Review this PR in Change Stack to inspect semantic changes, definitions, and references.

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • ✅ Review completed - (🔄 Check again to review again)
📝 Walkthrough

Walkthrough

Adds Cobra-aware --skip-hooks resolution, introduces before-/after-terraform-init hook wiring and a new AfterTerraformInit event, and adds tests + fixtures verifying that stack-level terraform.hooks are merged into Terraform components and skip flags are honored.

Changes

Hook skip-flag resolution and inheritance validation

Layer / File(s) Summary
Skip-hooks CLI flag resolution
pkg/hooks/hooks.go
Hooks.RunAll calls resolveSkipHooks(cmd) to prefer an explicitly-changed Cobra --skip-hooks value, falling back to viper.GetString("skip-hooks") when the flag wasn't changed or cmd is nil.
Skip-hooks and RunAll tests
pkg/hooks/skip_test.go, pkg/hooks/hooks_test.go
Tests for resolveSkipHooks and RunAll validate CLI/no-opt parsing, Cobra-vs-Viper precedence, and that RunAll skips hooks when the CLI skip flag matches.
Hook inheritance in stack processing
internal/exec/stack_processor_process_stacks_test.go, internal/exec/describe_component_hooks_test.go
Processor and describe tests assert top-level terraform.hooks from imported _defaults are merged into Terraform components lacking local hooks, and that mis-scoped components.terraform.hooks entries are treated as literal components.
Test fixtures for hook scenarios
tests/fixtures/scenarios/hooks-terraform-scope/*
New scenario supplies _defaults.yaml with terraform.hooks, test.yaml referencing defaults, atmos.yaml, and a minimal Terraform module to support the inheritance integration test.
Terraform init command hook wiring
cmd/terraform/init.go
Adds PreRunE/PostRunE and deferred error handling to run BeforeTerraformInit and AfterTerraformInit hooks, with multi-component suppression and empty output payload handling.
Hook event and matching tests
pkg/hooks/event.go, pkg/hooks/*_test.go
Introduces AfterTerraformInit HookEvent and tests verifying IsPostExecution, Normalize behavior for init events, and hook matching for before/after init cases.
Docs, blog, roadmap updates
website/docs/stacks/hooks.mdx, website/blog/*, website/src/data/roadmap.js
Adds after-terraform-init to docs, a blog post describing init-hook support and the --skip-hooks fix, and updates roadmap metadata.

Sequence Diagram(s)

sequenceDiagram
  participant CobraCmd
  participant Hooks
  participant Viper
  CobraCmd->>Hooks: resolveSkipHooks(cmd) (use flag when Changed)
  Hooks->>Viper: fallback to viper.GetString("skip-hooks")
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers

  • aknysh
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.89% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the two main changes: adding terraform init lifecycle hooks and fixing --skip-hooks to work with before-* events.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch osterman/global-terraform-hooks

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
pkg/hooks/skip_test.go (1)

41-42: ⚡ Quick win

Use assert.NoError directly for consistency.

Line 41 creates a variable named require from assert.New(t), but this doesn't give you require semantics (test continues on failure). The rest of your test cases use assert.NoError(t, ...) directly. Stick to that pattern.

♻️ Align with the pattern used in other sub-tests
-	require := assert.New(t)
-	require.NoError(cmd.ParseFlags([]string{"--skip-hooks"}))
+	assert.NoError(t, cmd.ParseFlags([]string{"--skip-hooks"}))
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/hooks/skip_test.go` around lines 41 - 42, Replace the local `require :=
assert.New(t)` usage and the subsequent
`require.NoError(cmd.ParseFlags([]string{"--skip-hooks"}))` call with the direct
package-level assertion `assert.NoError(t,
cmd.ParseFlags([]string{"--skip-hooks"}))` so the test uses the same
`assert.NoError(t, ...)` pattern as other sub-tests; remove the `require`
variable and call `assert.NoError` directly against the `cmd.ParseFlags`
invocation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@pkg/hooks/skip_test.go`:
- Around line 41-42: Replace the local `require := assert.New(t)` usage and the
subsequent `require.NoError(cmd.ParseFlags([]string{"--skip-hooks"}))` call with
the direct package-level assertion `assert.NoError(t,
cmd.ParseFlags([]string{"--skip-hooks"}))` so the test uses the same
`assert.NoError(t, ...)` pattern as other sub-tests; remove the `require`
variable and call `assert.NoError` directly against the `cmd.ParseFlags`
invocation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 068653ac-98c3-4b47-a234-d9576b49c1a2

📥 Commits

Reviewing files that changed from the base of the PR and between 3c0b3e5 and a16b448.

📒 Files selected for processing (9)
  • internal/exec/describe_component_hooks_test.go
  • internal/exec/stack_processor_process_stacks_test.go
  • pkg/hooks/hooks.go
  • pkg/hooks/hooks_test.go
  • pkg/hooks/skip_test.go
  • tests/fixtures/scenarios/hooks-terraform-scope/atmos.yaml
  • tests/fixtures/scenarios/hooks-terraform-scope/components/terraform/vpc/main.tf
  • tests/fixtures/scenarios/hooks-terraform-scope/stacks/_defaults.yaml
  • tests/fixtures/scenarios/hooks-terraform-scope/stacks/test.yaml

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 5, 2026
@codecov

codecov Bot commented Jun 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.92%. Comparing base (87a85ad) to head (6204526).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2574      +/-   ##
==========================================
+ Coverage   78.88%   78.92%   +0.03%     
==========================================
  Files        1207     1207              
  Lines      116425   116441      +16     
==========================================
+ Hits        91845    91897      +52     
+ Misses      19498    19463      -35     
+ Partials     5082     5081       -1     
Flag Coverage Δ
unittests 78.92% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cmd/terraform/init.go 74.19% <100.00%> (+14.19%) ⬆️
pkg/hooks/event.go 100.00% <ø> (ø)
pkg/hooks/hooks.go 80.16% <100.00%> (+0.28%) ⬆️

... and 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Wire user-facing before-terraform-init and after-terraform-init hooks on
the `atmos terraform init` command. before-terraform-init was documented
but never dispatched to user hooks; after-terraform-init is new. They fire
via the same runHooks/RunAll path as plan/apply/deploy, so the --skip-hooks
fix applies to them automatically.

- Add AfterTerraformInit event constant (pkg/hooks/event.go).
- Wire PreRunE/PostRunE + error-path defer in cmd/terraform/init.go,
  mirroring plan.go (no output capture — init has nothing to summarize).
- Tests: MatchesEvent + RunAll event-filtering for before/after init,
  IsPostExecution and Normalize coverage for init events.
- Docs: list after-terraform-init and clarify init events fire on the
  explicit `atmos terraform init`, not the implicit init during plan/apply.
- Changelog blog post + roadmap milestone (extensibility initiative).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@osterman Erik Osterman (Cloud Posse) (osterman) added minor New features that do not break anything and removed patch A minor, backward compatible change labels Jun 5, 2026
@osterman Erik Osterman (Cloud Posse) (osterman) changed the title fix(hooks): honor --skip-hooks for before-* events (plan/apply/deploy) feat(hooks): terraform init lifecycle hooks + --skip-hooks before-* fix Jun 5, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@website/src/data/roadmap.js`:
- Line 297: The extensibility initiative's progress value was lowered to 83 but
a milestone was shipped; check the extensibility object in
website/src/data/roadmap.js (look for the entry with key/name "extensibility"
and its progress property) and either (a) restore/update progress to 85 if the
shipped milestone was not accounted for, or (b) if new milestones were added or
the calculation method changed, update the milestones array and/or the progress
calculation logic so the progress value correctly reflects shipped milestones;
ensure the progress numeric value matches the milestone state and add a brief
comment near the progress property explaining the rationale for the chosen
value.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d34189a6-cf98-42d1-aced-578645304062

📥 Commits

Reviewing files that changed from the base of the PR and between a16b448 and c75859c.

📒 Files selected for processing (8)
  • cmd/terraform/init.go
  • pkg/hooks/event.go
  • pkg/hooks/event_test.go
  • pkg/hooks/hook_test.go
  • pkg/hooks/hooks_test.go
  • website/blog/2026-06-05-terraform-init-hooks-and-skip-hooks-fix.mdx
  • website/docs/stacks/hooks.mdx
  • website/src/data/roadmap.js
✅ Files skipped from review due to trivial changes (1)
  • website/blog/2026-06-05-terraform-init-hooks-and-skip-hooks-fix.mdx

Comment thread website/src/data/roadmap.js Resolved
Add TestInitCmd_HookWiring exercising init's PreRunE and both PostRunE
branches (single- and multi-component) against the demo-stacks fixture,
mirroring the existing utils_hooks_test wrappers. Raises cmd/terraform/init.go
coverage of the new hook-wiring lines from ~66% to 85.7%, satisfying the
codecov patch threshold. Only the RunE error-path defer remains uncovered.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmd/terraform/init_hooks_test.go`:
- Around line 3-10: The import block is missing blank lines between the three
groups (stdlib, third-party, internal); update the import statement that
currently lists "testing", "github.com/stretchr/testify/assert",
"github.com/stretchr/testify/require", and
"github.com/cloudposse/atmos/pkg/hooks" so that "testing" stays in the first
group, the testify imports stay in the second group separated by a blank line
from "testing", and the "github.com/cloudposse/atmos/pkg/hooks" import is in a
third group separated by a blank line from the testify imports.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 90eec458-4f17-4e1a-aaef-63b4860ca5ea

📥 Commits

Reviewing files that changed from the base of the PR and between c75859c and 0f67df5.

📒 Files selected for processing (1)
  • cmd/terraform/init_hooks_test.go

Comment thread cmd/terraform/init_hooks_test.go Resolved
Add TestInitCmd_RunE_FiresAfterInitErrorHookOnFailure: invokes init's RunE
in an empty working dir (no stacks directory) so it fails fast in
ValidateAtmosConfig without needing a terraform binary, and stubs the
error-hook wrapper to assert the deferred after-terraform-init hook fires
with the run error. This covers the RunE reset + deferred error path that
the wiring test left uncovered, taking the new init hook code above the
80% patch-coverage threshold. The only remaining uncovered lines are
defensive BindFlagsToViper return-err branches and the init() panic.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 5, 2026
@mergify

mergify Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏

@mergify mergify Bot added the conflict This PR has conflicts label Jun 6, 2026
…form-hooks

# Conflicts:
#	website/src/data/roadmap.js

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@website/src/data/roadmap.js`:
- Line 324: The shipped roadmap entry for label 'Remote import source caching
(clone once + TTL)' is missing the required pr field; update the object (the
entry with label exactly matching that string and status: 'shipped') to include
a pr key pointing to the merge PR (e.g. the GitHub PR URL or numeric identifier)
alongside the existing changelog and docs fields so the roadmap metadata
contract (status: 'shipped' requires changelog + pr) is satisfied.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f4a1a8b1-0560-4bc5-83ec-e93f6fb6d831

📥 Commits

Reviewing files that changed from the base of the PR and between 6ab5367 and fab7ef9.

📒 Files selected for processing (2)
  • cmd/terraform/init.go
  • website/src/data/roadmap.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • cmd/terraform/init.go

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@website/src/data/roadmap.js`:
- Line 324: The shipped roadmap entry for label 'Remote import source caching
(clone once + TTL)' is missing the required pr field; update the object (the
entry with label exactly matching that string and status: 'shipped') to include
a pr key pointing to the merge PR (e.g. the GitHub PR URL or numeric identifier)
alongside the existing changelog and docs fields so the roadmap metadata
contract (status: 'shipped' requires changelog + pr) is satisfied.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f4a1a8b1-0560-4bc5-83ec-e93f6fb6d831

📥 Commits

Reviewing files that changed from the base of the PR and between 6ab5367 and fab7ef9.

📒 Files selected for processing (2)
  • cmd/terraform/init.go
  • website/src/data/roadmap.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • cmd/terraform/init.go
🛑 Comments failed to post (1)
website/src/data/roadmap.js (1)

324-324: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add missing pr link on shipped roadmap milestone.

This milestone is marked status: 'shipped' but is missing the required pr field, which breaks the roadmap metadata contract for shipped items.

Suggested minimal fix
-        { label: 'Remote import source caching (clone once + TTL)', status: 'shipped', quarter: 'q2-2026', changelog: 'faster-remote-stack-imports', docs: '/stacks/imports#caching-remote-imports', description: 'Each unique remote Git repository is cloned at most once per Atmos invocation; all subdir imports from the same repo are resolved from that shared clone. An opt-in per-import ttl: (or global imports.ttl default in atmos.yaml) reuses the cloned source across invocations until it expires, enabling a warm CI cache (e.g. actions/cache of ~/.cache/atmos/stack-imports) to skip re-cloning entirely. Mutable refs like ?ref=main stay fresh by default—re-cloned once per run unless a ttl is set. Builds on the existing source-provisioning TTL/duration mechanism.', benefits: 'Large stack catalogs with many remote imports see dramatically faster run times—one clone per repo instead of one per import. CI pipelines with a cache layer can skip the network entirely on warm runs. Mutable refs stay correct by default, and ttl is opt-in so there are no surprises.' },
+        { label: 'Remote import source caching (clone once + TTL)', status: 'shipped', quarter: 'q2-2026', pr: <PR_NUMBER>, changelog: 'faster-remote-stack-imports', docs: '/stacks/imports#caching-remote-imports', description: 'Each unique remote Git repository is cloned at most once per Atmos invocation; all subdir imports from the same repo are resolved from that shared clone. An opt-in per-import ttl: (or global imports.ttl default in atmos.yaml) reuses the cloned source across invocations until it expires, enabling a warm CI cache (e.g. actions/cache of ~/.cache/atmos/stack-imports) to skip re-cloning entirely. Mutable refs like ?ref=main stay fresh by default—re-cloned once per run unless a ttl is set. Builds on the existing source-provisioning TTL/duration mechanism.', benefits: 'Large stack catalogs with many remote imports see dramatically faster run times—one clone per repo instead of one per import. CI pipelines with a cache layer can skip the network entirely on warm runs. Mutable refs stay correct by default, and ttl is opt-in so there are no surprises.' },

As per coding guidelines, for website/src/data/roadmap.js, shipped milestones must include status: 'shipped', changelog, and pr.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@website/src/data/roadmap.js` at line 324, The shipped roadmap entry for label
'Remote import source caching (clone once + TTL)' is missing the required pr
field; update the object (the entry with label exactly matching that string and
status: 'shipped') to include a pr key pointing to the merge PR (e.g. the GitHub
PR URL or numeric identifier) alongside the existing changelog and docs fields
so the roadmap metadata contract (status: 'shipped' requires changelog + pr) is
satisfied.

Source: Coding guidelines

Shipped roadmap milestones require both changelog and pr; the merged
remote-import-caching entry (from #2571) was missing pr. Flagged by CodeRabbit.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
The Review Dependency Licenses check regenerates NOTICE and compares; it
expects the .../internal/endpoints/v2/LICENSE.txt path (matching main). An
autofix bot commit had rewritten it to the parent-dir path without /v2/,
causing the check to fail. Restore the /v2/ path so NOTICE matches the
generated output and origin/main.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
The codecov/codecov-action@v5 uploader verifies the GPG signature of the
Codecov CLI it downloads. Transient Codecov-side issues (empty public-key
import: "gpg: no valid OpenPGP data found" / "Can't check signature: No
public key") make verification exit 1, which hard-failed the whole
"Acceptance Tests (linux)" job even when every test passed.

Set fail_ci_if_error: false so a coverage-upload/infra flake no longer
fails a green test run. The 80% coverage gate is still enforced by
Codecov's own PR status check, independent of this step's exit code.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@mergify

mergify Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Important

Cloud Posse Engineering Team Review Required

This pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes.

To expedite this process, reach out to us on Slack in the #pr-reviews channel.

@aknysh
Andriy Knysh (aknysh) merged commit ad569a0 into main Jun 9, 2026
60 checks passed
@aknysh
Andriy Knysh (aknysh) deleted the osterman/global-terraform-hooks branch June 9, 2026 05:22
@atmos-pro

atmos-pro Bot commented Jun 9, 2026 •

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

@mergify mergify Bot removed the needs-cloudposse Needs Cloud Posse assistance label Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Warning

Release Documentation Required

This PR is labeled minor or major and requires documentation updates:

  • Changelog entry - Add a blog post in website/blog/YYYY-MM-DD-feature-name.mdx
  • Roadmap update - Update website/src/data/roadmap.js with the new milestone

Alternatively: If this change doesn't require release documentation, remove the minor or major label.

@github-actions

Copy link
Copy Markdown

These changes were released in v1.221.0-rc.7.

@github-actions

Copy link
Copy Markdown

These changes were released in v1.221.0.

This branch was successfully deployed

1 active deployment
preview — 62045268 Deployed Jun 9, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor New features that do not break anything size/m Medium size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants