Skip to content

[codex] enable terraform plan scheduler concurrency - #2468

Merged
Andriy Knysh (aknysh) merged 20 commits into
codex/dag-terraform-graph-bulk-pathfrom
codex/dag-terraform-plan-concurrency
Jun 1, 2026
Merged

Andriy Knysh (aknysh) merged 20 commits into
codex/dag-terraform-graph-bulk-pathfrom
codex/dag-terraform-plan-concurrency

Conversation

@shirkevich

@shirkevich Mikhail Shirkov (shirkevich) commented May 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • add plan-only --max-concurrency wiring for graph-backed Terraform bulk execution
  • keep default execution sequential with --max-concurrency 1
  • honor concurrency only for Terraform plan; non-plan subcommands remain behaviorally sequential in PR4
  • preserve Terraform plan exit semantics: 0 clean, 2 changes, non-zero failure
  • add concurrent output modes:
    • --log-order=stream for line-buffered, labeled live output
    • --log-order=grouped for per-component grouped replay
    • --hide-no-changes to suppress grouped replay for no-op plans
  • write per-node stdout/stderr logs under .atmos/logs/terraform/plan
  • add --execution-summary-file for deterministic JSON execution summaries with per-node started_at, finished_at, and duration_ms fields
  • use workdir-aware Terraform adapter locking:
    • workdir-enabled logical aliases use isolated stack/component execution resources
    • aliases without workdir remain serialized by physical Terraform source path
    • unrelated physical paths can still run concurrently without workdir
  • keep Terraform workdir sync from copying/deleting runtime cache/state directories such as .terraform and terraform.tfstate.d

Stacking

This PR is stacked on #2466 and targets codex/dag-terraform-graph-bulk-path.

Scope

  • atmos terraform plan --all --max-concurrency N
  • atmos terraform plan --components ... --max-concurrency N
  • atmos terraform plan --query ... --max-concurrency N

Out of scope:

  • --affected
  • concurrent apply, deploy, or destroy
  • mixed-type DAGs

Notes

Concurrency remains opt-in. The default value is 1, which preserves the sequential behavior established in PR 3.

provision.workdir.enabled=true is not required to run plan, apply, or destroy. In PR4, concurrent execution is enabled only for plan; non-plan subcommands continue to resolve through the same graph-backed path with effective sequential execution.

Concurrent plan mode still requires a non-interactive identity value when --max-concurrency > 1, but it no longer rejects components that do not enable workdir provisioning. Instead, the adapter locks by execution resource:

  • if workdir provisioning is enabled, each selected stack/component gets its own execution resource and aliases can run concurrently
  • if workdir provisioning is not enabled, aliases that share one Terraform source directory share one lock and are serialized
  • components with different Terraform source directories can run concurrently even without workdir provisioning

This keeps the default/non-workdir Terraform behavior debuggable while allowing safe parallelism across independent component directories.

--hide-no-changes implies grouped output because live stream output cannot be hidden after it has already been written. The no-change detector strips ANSI before matching Terraform/OpenTofu no-change messages.

Validation

GOCACHE=/private/tmp/atmos-go-cache go test ./pkg/io ./pkg/scheduler/adapters ./cmd/terraform
GOCACHE=/private/tmp/atmos-go-cache GOMODCACHE=/private/tmp/atmos-go-mod-cache go test ./pkg/provisioner/workdir ./pkg/scheduler ./pkg/scheduler/adapters ./cmd/terraform
GOCACHE=/private/tmp/atmos-go-cache go test ./internal/exec -run 'TestExecuteTerraformQuery|TestProcessComponentConfig_PropagatesAuthManager|TestProcessComponentConfig_AuthManagerGuardBranches|TestExecuteShellCommandUsesInjectedStreamsAndCapture'
GOCACHE=/private/tmp/atmos-go-cache go build -o build/atmos .
build/atmos terraform plan --help

Additional local validation after the no-workdir locking update:

GOCACHE=/private/tmp/atmos-go-cache GOMODCACHE=/private/tmp/atmos-go-mod-cache go test ./pkg/scheduler/adapters -run 'TestExecuteTerraformAllowsParallelPlanForDifferentPhysicalComponentPaths|TestExecuteTerraformSerializesAliasesForSharedPhysicalComponentPathWithoutWorkdir|TestExecuteTerraformAllowsParallelPlanForSharedPhysicalComponentPathWhenWorkdirEnabled|TestExecuteTerraformDoesNotRequireWorkdirForPlanApplyDestroy|TestValidateTerraformConcurrentPlan'
GOCACHE=/private/tmp/atmos-go-cache GOMODCACHE=/private/tmp/atmos-go-mod-cache go test ./pkg/io ./pkg/scheduler ./pkg/scheduler/adapters ./cmd/terraform
GOCACHE=/private/tmp/atmos-go-cache GOMODCACHE=/private/tmp/atmos-go-mod-cache go test ./internal/exec -run 'TestExecuteTerraformQuery|TestCreateQueryAuthManager|TestExecuteTerraformQueryComponent|TestProcessComponentConfig_PropagatesAuthManager|TestProcessComponentConfig_AuthManagerGuardBranches|TestExecuteShellCommandUsesInjectedStreamsAndCapture|TestCheckTTYRequirement|TestHandleDeploySubcommand'
GOCACHE=/private/tmp/atmos-go-cache GOMODCACHE=/private/tmp/atmos-go-mod-cache go test -coverprofile=/private/tmp/adapters-full.out ./pkg/scheduler/adapters
GOCACHE=/private/tmp/atmos-go-cache GOMODCACHE=/private/tmp/atmos-go-mod-cache go build -o build/atmos .

Adapter package coverage after the update: 80.7%.

Downstream smoke test

Built build/atmos from this branch and ran anonymized private downstream smoke tests with an explicit identity.

Workdir-enabled full terraform plan --all matrix, rerun after confirming no competing Terraform process was active:

--max-concurrency Result Wall time
1 success 192.53s
2 success 131.22s
4 success 108.16s
8 success 89.37s
16 success 89.16s

Notes:

  • each run reported 17 succeeded scheduler results
  • no fatal error: concurrent map writes
  • no viper.(*Viper).BindEnv auth panic
  • no source .terraform provider cache copy failure after the workdir sync fix
  • no remote backend state-lock failure in the clean matrix; earlier lock failures were caused by another Terraform process running concurrently outside this test
  • concurrency 16 was effectively flat versus concurrency 8 on this stack, suggesting the practical limit for this run is around 8 workers
  • a timed concurrency-16 rerun completed successfully in 94.92s; the longest node took 38.8s, the next longest took 15.7s, and the final dependent tail was about 10.4s
  • grouped output plus --hide-no-changes was manually validated downstream and correctly suppresses no-op plan groups

Additional workdir-enabled alias smoke, using three logical aliases that share one physical Terraform component directory:

--max-concurrency Result Wall time
1 success 58.19s
8 success 44.68s

Additional workdir-disabled validation, after removing the downstream default workdir setting and rebuilding this branch:

Scenario Result Wall time
full terraform plan --all, c8, grouped + hide no changes success 91.96s
full terraform plan --all, c8, grouped + execution summary success 99.08s
focused selector with two aliases sharing one physical source path plus one unrelated component, c8 grouped success 52.69s
same focused selector, c8 stream success 53.39s

No-workdir findings:

  • no provision.workdir.enabled=true preflight error
  • no state-lock failure
  • no auth panic or concurrent map writes
  • full c8 summary reported 17/17 succeeded nodes
  • stream-mode focused selector showed the unrelated component interleaving with one shared-path alias, while the second shared-path alias started only after the first shared-path alias finished streaming
  • this confirms the intended behavior: unrelated source paths can run concurrently without workdir, but aliases sharing one physical Terraform source path are serialized

Summary by CodeRabbit

  • New Features

    • New Terraform flags: --max-concurrency, --log-order, --hide (supports "no-changes"), --execution-summary-file, and --failure-mode (fail-fast|keep-going).
  • Improvements

    • Better concurrent plan/apply control and enforcement, grouped vs streamed logging, optional hiding of "no changes", deterministic per-node plan summaries/timings, signal-aware cancellation, workdir sync that skips Terraform/OpenTofu runtime dirs, and serialized prefixed log output.
  • Tests

    • Expanded unit, integration, and snapshot coverage, plus a Terraform DAG integration fixture.

@atmos-pro

atmos-pro Bot commented May 21, 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.

@github-actions github-actions Bot added the size/m Medium size PR label May 21, 2026
@mergify mergify Bot added the stacked Stacked label May 21, 2026
@github-actions

github-actions Bot commented May 21, 2026 •

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@codecov

codecov Bot commented May 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.92771% with 135 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.68%. Comparing base (1ad352d) to head (28d08be).

Files with missing lines Patch % Lines
pkg/scheduler/adapters/terraform.go 85.14% 35 Missing and 28 partials ⚠️
pkg/git/git.go 65.21% 17 Missing and 15 partials ⚠️
cmd/terraform/utils.go 41.93% 18 Missing ⚠️
internal/exec/terraform_affected.go 76.92% 7 Missing and 5 partials ⚠️
cmd/terraform/destroy.go 71.42% 3 Missing and 3 partials ⚠️
pkg/io/line_prefix_writer.go 96.66% 1 Missing and 1 partial ⚠️
pkg/provisioner/workdir/fs.go 84.61% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@                           Coverage Diff                           @@
##           codex/dag-terraform-graph-bulk-path    #2468      +/-   ##
=======================================================================
+ Coverage                                78.61%   78.68%   +0.07%     
=======================================================================
  Files                                     1185     1186       +1     
  Lines                                   113476   114106     +630     
=======================================================================
+ Hits                                     89210    89787     +577     
- Misses                                   19337    19355      +18     
- Partials                                  4929     4964      +35     
Flag Coverage Δ
unittests 78.68% <81.92%> (+0.07%) ⬆️

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

Files with missing lines Coverage Δ
cmd/terraform/apply.go 78.94% <100.00%> (+0.76%) ⬆️
cmd/terraform/options.go 100.00% <100.00%> (ø)
cmd/terraform/plan.go 81.25% <100.00%> (+3.47%) ⬆️
errors/errors.go 100.00% <ø> (ø)
internal/exec/terraform_all.go 78.06% <100.00%> (+1.03%) ⬆️
internal/exec/terraform_query.go 100.00% <100.00%> (+33.89%) ⬆️
pkg/schema/schema.go 87.70% <ø> (ø)
pkg/io/line_prefix_writer.go 96.66% <96.66%> (ø)
pkg/provisioner/workdir/fs.go 83.81% <84.61%> (-0.14%) ⬇️
cmd/terraform/destroy.go 76.92% <71.42%> (-23.08%) ⬇️
... and 4 more

... 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.

@shirkevich
Mikhail Shirkov (shirkevich) force-pushed the codex/dag-terraform-plan-concurrency branch from 58d9f1f to 71df0d8 Compare May 22, 2026 10:21
@shirkevich
Mikhail Shirkov (shirkevich) force-pushed the codex/dag-terraform-graph-bulk-path branch from 1f0197e to 3d1c53c Compare May 25, 2026 07:53
@mergify

mergify Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

💥 This pull request now has conflicts. Could you fix it Mikhail Shirkov (@shirkevich)? 🙏

@mergify mergify Bot added the conflict This PR has conflicts label May 25, 2026
@shirkevich
Mikhail Shirkov (shirkevich) force-pushed the codex/dag-terraform-plan-concurrency branch from c4ec7b7 to 524307c Compare May 25, 2026 07:56
@mergify mergify Bot removed the conflict This PR has conflicts label May 25, 2026
@shirkevich
Mikhail Shirkov (shirkevich) marked this pull request as ready for review May 26, 2026 18:07
@shirkevich
Mikhail Shirkov (shirkevich) requested a review from a team as a code owner May 26, 2026 18:07
Comment thread pkg/scheduler/adapters/terraform.go Outdated
Comment thread pkg/scheduler/adapters/terraform.go
@shirkevich
Mikhail Shirkov (shirkevich) force-pushed the codex/dag-terraform-graph-bulk-path branch from 3d1c53c to 713f3ff Compare May 27, 2026 18:13
@shirkevich
Mikhail Shirkov (shirkevich) force-pushed the codex/dag-terraform-plan-concurrency branch from 524307c to e004395 Compare May 27, 2026 18:13
@shirkevich

Copy link
Copy Markdown
Collaborator Author

CodeRabbit (@coderabbitai) review

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented May 27, 2026 •

Copy link
Copy Markdown
Contributor

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
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6add2cf9-f202-4356-873d-8ed2b689419b

📥 Commits

Reviewing files that changed from the base of the PR and between 3f1f254 and 28d08be.

📒 Files selected for processing (6)
  • cmd/terraform/apply.go
  • internal/exec/terraform_utils_test.go
  • pkg/git/git.go
  • pkg/git/git_test.go
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden
💤 Files with no reviewable changes (3)
  • cmd/terraform/apply.go
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden
🚧 Files skipped from review as they are similar to previous changes (3)
  • pkg/git/git_test.go
  • pkg/git/git.go
  • internal/exec/terraform_utils_test.go

📝 Walkthrough

Walkthrough

Adds plan/apply/destroy CLI flags and schema fields; introduces TerraformExecution/TerraformExecutionResult and context-aware per-component execution with streaming/capture and hooks; implements LinePrefixWriter; refactors scheduler adapter for concurrency, grouped/streamed output, change detection, and deterministic plan-summary JSON; skips Terraform runtime dirs in sync/hash; updates/extends tests, fixtures, and snapshots.

Changes

Terraform concurrent plan execution with output control

Layer / File(s) Summary
CLI flags, parsing, and schema propagation
cmd/terraform/options.go, cmd/terraform/plan.go, cmd/terraform/utils.go, cmd/terraform/options_test.go, cmd/terraform/apply.go, cmd/terraform/destroy.go, pkg/schema/schema.go, tests/snapshots/*
New plan/apply/destroy flags (--max-concurrency, --log-order, --hide, --execution-summary-file, --failure-mode) are parsed into TerraformRunOptions; PlanHideNoChanges is computed case/whitespace-insensitively and propagated into ConfigAndStacksInfo; help snapshots and parser bindings updated.
Executor contract and context-aware execution
internal/exec/terraform_query.go, internal/exec/terraform_all.go, internal/exec/terraform_affected.go, internal/exec/terraform_utils_test.go
Introduce TerraformExecution and TerraformExecutionResult; add context-aware entrypoints (ExecuteTerraformAllWithContext, ExecuteTerraformQueryWithContext, ExecuteTerraformAffectedWithContext); refactor per-component execution to attach stdin/stdout/stderr, optionally capture output, call ExecuteTerraform with the new contract, and invoke PerComponentHook with combined output. Tests verify routing, error propagation, and capture/streaming.
Scheduler adapter orchestration
pkg/scheduler/adapters/terraform.go, pkg/scheduler/adapters/terraform_test.go
Refactor adapter to accept selection, compute effective concurrency, validate concurrent execution constraints and failure modes, orchestrate grouped vs stream output and grouped replay, normalize exit codes (treat plan exit code 2 as changed), write deterministic per-node JSON plan summaries (with timings), extend resource-locking keys for workdir, and update processed counting. Tests expanded for the new executor contract and behaviors.
Line prefix writer for output formatting
pkg/io/line_prefix_writer.go, pkg/io/line_prefix_writer_test.go
Add LinePrefixWriter to buffer and prefix complete lines, handle CR-separated segments and shared mutex serialization, and provide Flush semantics; tests cover buffering, concurrency, error retention, nil-target behavior, and prefixing logic.
Skip Terraform runtime dirs in sync/hash
pkg/provisioner/workdir/fs.go, pkg/provisioner/workdir/fs_test.go
Ignore .terraform, terraform.tfstate.d, and Atmos metadata during SyncDir, delete detection, and DefaultHasher.HashDir so runtime artifacts are excluded; tests added to validate sync and hash stability.
Tests, fixtures, and test harness refactors
tests/*, tests/fixtures/scenarios/terraform-floci-dag/*, tests/terraform_floci_dag_test.go, pkg/git/*
Consolidate Atmos runner init via ensureAtmosRunner, update many CLI tests to use it, add Terraform Floci DAG fixtures and integration tests for DAG apply/destroy and affected workflows, add git worktree-tolerant repo handling and tests, and update snapshots for new flags.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

minor

Suggested reviewers

  • aknysh
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/dag-terraform-plan-concurrency

@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

🧹 Nitpick comments (1)
cmd/terraform/options_test.go (1)

36-55: ⚡ Quick win

Cover the other new plan option fields in these tests.

You added checks for MaxConcurrency, but PlanLogOrder, PlanHideNoChanges, and PlanSummaryFile are also new parse/propagation paths and currently unasserted.

Proposed test additions
@@
 			setup: func(v *viper.Viper) {
@@
 				v.Set("max-concurrency", 4)
+				v.Set("log-order", "grouped")
+				v.Set("hide-no-changes", true)
+				v.Set("execution-summary-file", "/tmp/summary.json")
 			},
 			expected: &TerraformRunOptions{
@@
 				MaxConcurrency:          4,
+				PlanLogOrder:            "grouped",
+				PlanHideNoChanges:       true,
+				PlanSummaryFile:         "/tmp/summary.json",
 			},
@@
 			assert.Equal(t, tt.expected.MaxConcurrency, result.MaxConcurrency, "MaxConcurrency should match")
+			assert.Equal(t, tt.expected.PlanLogOrder, result.PlanLogOrder, "PlanLogOrder should match")
+			assert.Equal(t, tt.expected.PlanHideNoChanges, result.PlanHideNoChanges, "PlanHideNoChanges should match")
+			assert.Equal(t, tt.expected.PlanSummaryFile, result.PlanSummaryFile, "PlanSummaryFile should match")
@@
 			opts: &TerraformRunOptions{
@@
 				MaxConcurrency:          4,
+				PlanLogOrder:            "grouped",
+				PlanHideNoChanges:       true,
+				PlanSummaryFile:         "/tmp/summary.json",
 			},
 			checkInfo: func(t *testing.T, info *schema.ConfigAndStacksInfo) {
@@
 				assert.Equal(t, 4, info.MaxConcurrency)
+				assert.Equal(t, "grouped", info.TerraformPlanLogOrder)
+				assert.True(t, info.TerraformPlanHideNoChanges)
+				assert.Equal(t, "/tmp/summary.json", info.TerraformPlanSummaryFile)
 			},

As per coding guidelines "**/*_test.go: Every new feature must include comprehensive unit tests targeting >80% code coverage for all packages."

Also applies to: 95-102, 257-257, 390-400

🤖 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 `@cmd/terraform/options_test.go` around lines 36 - 55, Update the unit test in
options_test.go to assert the newly-parsed plan options on TerraformRunOptions:
set the input flags in the test's v.Set calls for "plan-log-order",
"plan-hide-no-changes", and "plan-summary-file" and add the corresponding
expected fields PlanLogOrder, PlanHideNoChanges, and PlanSummaryFile to the
expected TerraformRunOptions struct (alongside the already-added
MaxConcurrency). Ensure you cover both positive and any alternate test cases
referenced (lines around 95-102, 257, and 390-400) so the parser and propagation
of PlanLogOrder, PlanHideNoChanges, and PlanSummaryFile are exercised and
validated.
🤖 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 `@pkg/io/line_prefix_writer.go`:
- Around line 58-60: Flush()/flushCompleteLinesLocked() currently clear w.buffer
before calling writeLine, which loses buffered data on write failure; change the
flow so you only remove bytes from w.buffer after writeLine returns success (or
restore the buffer on error). Specifically, in flushCompleteLinesLocked() and
the similar block around lines 69-72, build the line to write without truncating
w.buffer, call writeLine(line), and only on nil error advance/truncate w.buffer
(or reassign the remaining slice) so failed writes leave w.buffer intact for
retry.

---

Nitpick comments:
In `@cmd/terraform/options_test.go`:
- Around line 36-55: Update the unit test in options_test.go to assert the
newly-parsed plan options on TerraformRunOptions: set the input flags in the
test's v.Set calls for "plan-log-order", "plan-hide-no-changes", and
"plan-summary-file" and add the corresponding expected fields PlanLogOrder,
PlanHideNoChanges, and PlanSummaryFile to the expected TerraformRunOptions
struct (alongside the already-added MaxConcurrency). Ensure you cover both
positive and any alternate test cases referenced (lines around 95-102, 257, and
390-400) so the parser and propagation of PlanLogOrder, PlanHideNoChanges, and
PlanSummaryFile are exercised and validated.
🪄 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: 713f88ad-040b-418e-8a89-e2187359761d

📥 Commits

Reviewing files that changed from the base of the PR and between 713f3ff and e004395.

📒 Files selected for processing (15)
  • cmd/terraform/options.go
  • cmd/terraform/options_test.go
  • cmd/terraform/plan.go
  • cmd/terraform/utils.go
  • internal/exec/terraform_query.go
  • internal/exec/terraform_utils_test.go
  • pkg/io/line_prefix_writer.go
  • pkg/io/line_prefix_writer_test.go
  • pkg/provisioner/workdir/fs.go
  • pkg/provisioner/workdir/fs_test.go
  • pkg/scheduler/adapters/terraform.go
  • pkg/scheduler/adapters/terraform_test.go
  • pkg/schema/schema.go
  • tests/snapshots/TestCLICommands_config_alias_tp_--help_shows_terraform_plan_help.stdout.golden
  • tests/snapshots/TestCLICommands_tf_plan_help_shows_inherited_stack_flag.stdout.golden

Comment thread pkg/io/line_prefix_writer.go Outdated
@shirkevich
Mikhail Shirkov (shirkevich) force-pushed the codex/dag-terraform-graph-bulk-path branch from 713f3ff to aeb50f6 Compare May 27, 2026 19:08
@mergify

mergify Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

💥 This pull request now has conflicts. Could you fix it Mikhail Shirkov (@shirkevich)? 🙏

@mergify mergify Bot added the conflict This PR has conflicts label May 27, 2026
@shirkevich
Mikhail Shirkov (shirkevich) force-pushed the codex/dag-terraform-plan-concurrency branch from e004395 to 6914f4d Compare May 27, 2026 19:20
@shirkevich

Copy link
Copy Markdown
Collaborator Author

CodeRabbit (@coderabbitai) review

@aknysh
Andriy Knysh (aknysh) requested a review from a team as a code owner May 29, 2026 23:32
@shirkevich

Copy link
Copy Markdown
Collaborator Author

CodeRabbit (@coderabbitai) review

@coderabbitai

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pkg/scheduler/adapters/terraform.go (1)

1-1244: 🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift

File exceeds length limit.

This file is 1244 lines, more than double the 600-line guideline. Consider splitting into focused modules (e.g., separate files for graph building, output handling, execution, and summary generation).

As per coding guidelines: "Keep files small and focused (<600 lines); use one cmd/impl per file; co-locate tests; never use //revive:disable:file-length-limit"

🤖 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/scheduler/adapters/terraform.go` around lines 1 - 1244, The file is too
large; split it into focused modules: extract graph-building logic
(functions/types: BuildTerraformGraph, addTerraformDependencies,
terraformDependencies, parseLegacyDependsOn*, walkTerraformComponents,
sortedStackNames, sortedComponentNames, sortedGraphNodeIDs, sortedCopy,
containsString, terraformNodeID, cloneTerraformNodeMetadata) into a graph.go;
move scheduling/dispatch logic (TerraformDispatcher type and methods Dispatch,
lockTerraformResource, shouldSkipByQuery, selectedTerraformNodeIDs,
matchesTerraformSelection, evaluateTerraformQuery, processedCount,
terraformNodeLabel) into dispatcher.go; move output/logging concerns (type
terraformOutput and methods newTerraformOutput, captureOutput, nodeWriters,
openNodeLogFiles, combineWriters, closeTerraformLogFiles, finishNode,
replayGroupedOutput, writeGroupedOutputMarker, safeTerraformLogName,
terraformOutputCommand, terraformLogDir, terraformPlanHideNoChangesEnabled,
terraformPlanHideNoChanges constants) into output.go; move summary/timing
(terraformSummary types, terraformNodeTiming/timings and methods
Start/Complete/Get, writeTerraformSummary) into summary.go; and leave small
shared utilities and locks (terraformResourceLocks, newTerraformResourceLocks,
Lock, terraformResourceKey, componentInfoPath, componentField,
metadataComponent, terraformPlanHasNoChanges, terraformPlanChangedError,
terraformExitCode, terraformPlanChanged, effectiveTerraformMaxConcurrency,
supportsTerraformConcurrency, containsTerraformFlag, hasTerraformAutoApprove*,
requiresTerraformAutoApprove) in utils.go; ensure package remains adapters,
adjust file-level imports to compile, keep function signatures unchanged and
test/build after moving.
🧹 Nitpick comments (2)
pkg/scheduler/adapters/terraform.go (2)

358-420: ⚡ Quick win

Consider extracting node execution setup into a helper.

The Dispatch function is ~63 lines. To maintain the funlen limit, consider extracting the execution preparation block (lines 377-398) into a prepareNodeExecution helper.

As per coding guidelines: "Golangci-lint enforces funlen: lines: 60, statements: 40"

🤖 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/scheduler/adapters/terraform.go` around lines 358 - 420, The Dispatch
method in TerraformDispatcher is too long; extract the node execution
preparation block that builds nodeInfo, acquires the unlock via
lockTerraformResource, constructs TerraformExecution (including setting Context,
Info, Stdout, Stderr, Flush, CaptureOutput) and returns the execution and unlock
function into a new helper prepareNodeExecution (or prepareTerraformExecution)
that returns (TerraformExecution, func(), map[string]string, error) or similar;
update Dispatch to call prepareNodeExecution before calling d.executor and keep
subsequent logic (execResult handling, Flush, d.output.finishNode, outcome
computation) unchanged, ensuring you preserve setting
nodeInfo.Component/ComponentFromArg/Stack/StackFromArg and usage of
d.output.nodeWriters and d.lockTerraformResource.

96-166: ⚡ Quick win

Consider extracting validation logic into a helper function.

The ExecuteTerraform function is ~70 lines and may exceed the funlen limit. Consider extracting the validation block (lines 99-107) into a validateTerraformOptions helper to keep this orchestrator flat.

As per coding guidelines: "Golangci-lint enforces funlen: lines: 60, statements: 40; when refactoring high-complexity functions, extract blocks into named helper functions and keep orchestrator as flat linear pipeline"

🤖 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/scheduler/adapters/terraform.go` around lines 96 - 166, Extract the
initial validation block in ExecuteTerraform into a new helper function
validateTerraformOptions(opts TerraformOptions) error that checks
opts.AtmosConfig, opts.Info, and opts.Executor and returns the same formatted
errors (using errUtils.ErrInvalidConfig) so ExecuteTerraform becomes a flat
orchestrator; replace the inline checks (currently lines checking
opts.AtmosConfig, opts.Info, opts.Executor) with a single call to
validateTerraformOptions at the top of ExecuteTerraform and update any
callers/tests if needed.
🤖 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/plan.go`:
- Line 130: PlanCompatFlags() registers compat flags for the terraform plan
command but there is no mapping for the legacy --hide-no-changes, causing
unknown-flag errors; update the compat mapping in cmd/terraform/compat_flags.go
to translate the old flag into the new flags.WithStringSliceFlag("hide", ...)
form (e.g., map "--hide-no-changes" => "--hide no-changes") or alternatively
register an alias flag that forwards to the "hide" slice, and update the command
help/docs to mention the alias; locate symbols PlanCompatFlags,
flags.WithStringSliceFlag("hide", ...), and the compat mapping in
compat_flags.go to implement the translation/alias.

---

Outside diff comments:
In `@pkg/scheduler/adapters/terraform.go`:
- Around line 1-1244: The file is too large; split it into focused modules:
extract graph-building logic (functions/types: BuildTerraformGraph,
addTerraformDependencies, terraformDependencies, parseLegacyDependsOn*,
walkTerraformComponents, sortedStackNames, sortedComponentNames,
sortedGraphNodeIDs, sortedCopy, containsString, terraformNodeID,
cloneTerraformNodeMetadata) into a graph.go; move scheduling/dispatch logic
(TerraformDispatcher type and methods Dispatch, lockTerraformResource,
shouldSkipByQuery, selectedTerraformNodeIDs, matchesTerraformSelection,
evaluateTerraformQuery, processedCount, terraformNodeLabel) into dispatcher.go;
move output/logging concerns (type terraformOutput and methods
newTerraformOutput, captureOutput, nodeWriters, openNodeLogFiles,
combineWriters, closeTerraformLogFiles, finishNode, replayGroupedOutput,
writeGroupedOutputMarker, safeTerraformLogName, terraformOutputCommand,
terraformLogDir, terraformPlanHideNoChangesEnabled, terraformPlanHideNoChanges
constants) into output.go; move summary/timing (terraformSummary types,
terraformNodeTiming/timings and methods Start/Complete/Get,
writeTerraformSummary) into summary.go; and leave small shared utilities and
locks (terraformResourceLocks, newTerraformResourceLocks, Lock,
terraformResourceKey, componentInfoPath, componentField, metadataComponent,
terraformPlanHasNoChanges, terraformPlanChangedError, terraformExitCode,
terraformPlanChanged, effectiveTerraformMaxConcurrency,
supportsTerraformConcurrency, containsTerraformFlag, hasTerraformAutoApprove*,
requiresTerraformAutoApprove) in utils.go; ensure package remains adapters,
adjust file-level imports to compile, keep function signatures unchanged and
test/build after moving.

---

Nitpick comments:
In `@pkg/scheduler/adapters/terraform.go`:
- Around line 358-420: The Dispatch method in TerraformDispatcher is too long;
extract the node execution preparation block that builds nodeInfo, acquires the
unlock via lockTerraformResource, constructs TerraformExecution (including
setting Context, Info, Stdout, Stderr, Flush, CaptureOutput) and returns the
execution and unlock function into a new helper prepareNodeExecution (or
prepareTerraformExecution) that returns (TerraformExecution, func(),
map[string]string, error) or similar; update Dispatch to call
prepareNodeExecution before calling d.executor and keep subsequent logic
(execResult handling, Flush, d.output.finishNode, outcome computation)
unchanged, ensuring you preserve setting
nodeInfo.Component/ComponentFromArg/Stack/StackFromArg and usage of
d.output.nodeWriters and d.lockTerraformResource.
- Around line 96-166: Extract the initial validation block in ExecuteTerraform
into a new helper function validateTerraformOptions(opts TerraformOptions) error
that checks opts.AtmosConfig, opts.Info, and opts.Executor and returns the same
formatted errors (using errUtils.ErrInvalidConfig) so ExecuteTerraform becomes a
flat orchestrator; replace the inline checks (currently lines checking
opts.AtmosConfig, opts.Info, opts.Executor) with a single call to
validateTerraformOptions at the top of ExecuteTerraform and update any
callers/tests if needed.
🪄 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: 87eeada7-80d4-43c6-bca4-1e21a9d0ef67

📥 Commits

Reviewing files that changed from the base of the PR and between 850b567 and 9051b69.

📒 Files selected for processing (36)
  • cmd/terraform/apply.go
  • cmd/terraform/destroy.go
  • cmd/terraform/options.go
  • cmd/terraform/options_test.go
  • cmd/terraform/plan.go
  • cmd/terraform/utils.go
  • internal/exec/terraform_all.go
  • internal/exec/terraform_query.go
  • pkg/scheduler/adapters/terraform.go
  • pkg/scheduler/adapters/terraform_test.go
  • pkg/schema/schema.go
  • tests/cli_auth_console_test.go
  • tests/cli_auth_login_provider_test.go
  • tests/cli_describe_identity_test.go
  • tests/cli_double_hyphen_test.go
  • tests/cli_identity_flag_test.go
  • tests/cli_interactive_test.go
  • tests/cli_plugin_cache_test.go
  • tests/cli_profile_test.go
  • tests/cli_skip_init_test.go
  • tests/cli_terraform_test.go
  • tests/cli_test.go
  • tests/cli_workdir_test.go
  • tests/fixtures/scenarios/terraform-floci-dag/atmos.yaml
  • tests/fixtures/scenarios/terraform-floci-dag/components/terraform/alias-shared/main.tf
  • tests/fixtures/scenarios/terraform-floci-dag/components/terraform/bucket-marker/main.tf
  • tests/fixtures/scenarios/terraform-floci-dag/components/terraform/final-marker/main.tf
  • tests/fixtures/scenarios/terraform-floci-dag/components/terraform/queue-marker/main.tf
  • tests/fixtures/scenarios/terraform-floci-dag/components/terraform/seed/main.tf
  • tests/fixtures/scenarios/terraform-floci-dag/components/terraform/topic-marker/main.tf
  • tests/fixtures/scenarios/terraform-floci-dag/stacks/deploy/local.yaml
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden
  • tests/snapshots/TestCLICommands_config_alias_tp_--help_shows_terraform_plan_help.stdout.golden
  • tests/snapshots/TestCLICommands_tf_plan_help_shows_inherited_stack_flag.stdout.golden
  • tests/terraform_floci_dag_test.go
✅ Files skipped from review due to trivial changes (4)
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden
  • tests/snapshots/TestCLICommands_config_alias_tp_--help_shows_terraform_plan_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden
  • tests/snapshots/TestCLICommands_tf_plan_help_shows_inherited_stack_flag.stdout.golden
🚧 Files skipped from review as they are similar to previous changes (4)
  • pkg/schema/schema.go
  • cmd/terraform/options.go
  • internal/exec/terraform_query.go
  • pkg/scheduler/adapters/terraform_test.go

Comment thread cmd/terraform/plan.go
* Route terraform affected through scheduler

* test(terraform): add floci affected scheduler validation

* Add Terraform scheduler failure mode flags

* Support Git worktreeConfig repositories

* [autocommit] formatting fixes

* Address CodeRabbit affected scheduler feedback

* Use a single Terraform failure mode flag

* Format Floci affected DAG test calls

* Document affected scheduler helpers

* Fix worktreeConfig test cleanup on Windows

* Increase affected scheduler test coverage

---------

Co-authored-by: atmos-pro[bot] <173522224+atmos-pro[bot]@users.noreply.github.com>
@github-actions github-actions Bot added size/xl Extra large size PR and removed size/l Large size PR labels May 30, 2026
@aknysh

Copy link
Copy Markdown
Member

Mikhail Shirkov (@shirkevich) please resolve the conflicts

@mergify

mergify Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

💥 This pull request now has conflicts. Could you fix it Mikhail Shirkov (@shirkevich)? 🙏

@mergify mergify Bot added the conflict This PR has conflicts label May 30, 2026
…ath' into codex/fix-pr2468-conflict

# Conflicts:
#	errors/errors.go
#	pkg/git/git.go
#	pkg/scheduler/adapters/terraform.go

Copy link
Copy Markdown
Collaborator Author

CodeRabbit (@coderabbitai) review

@coderabbitai

coderabbitai Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mergify mergify Bot removed the conflict This PR has conflicts label May 31, 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: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
internal/exec/terraform_utils_test.go (1)

244-319: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Guard the new gomonkey tests on darwin/arm64.

These tests use gomonkey but don't carry the Apple Silicon skip that this file already applies later. On macOS ARM64 that can SIGBUS the test binary instead of producing a clean skip.

Suggested guard.
+	if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" {
+		t.Skip("gomonkey binary patching is not supported on macOS ARM64")
+	}

Also applies to: 321-435, 437-542

🤖 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 `@internal/exec/terraform_utils_test.go` around lines 244 - 319, Add a runtime
guard at the top of each gomonkey-based test in this file (including
TestExecuteTerraformQueryRoutesThroughSchedulerAdapter and the two other tests
that use gomonkey) to skip on Apple Silicon macOS: check if runtime.GOOS ==
"darwin" && runtime.GOARCH == "arm64" and call t.Skip with a short message; this
prevents SIGBUS on macOS/arm64 while leaving the rest of the test logic
(patches.ApplyFunc, ExecuteTerraformQuery, scheduleradapters.ExecuteTerraform,
etc.) unchanged.
🤖 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/apply.go`:
- Around line 124-130: The apply command is exposing an apply-specific
concurrency flag that should be omitted for this PR; remove the
flags.WithIntFlag("max-concurrency", "", 1, ...) entry and the corresponding
flags.WithEnvVars("max-concurrency", "ATMOS_TERRAFORM_APPLY_MAX_CONCURRENCY")
line from the flags list in cmd/terraform/apply.go (where the apply command
flags are registered) so that --max-concurrency and its env var are not wired
into terraform apply until apply concurrency is implemented end-to-end.

In `@pkg/git/git.go`:
- Around line 247-260: The current worktreeConfigTolerantStorer.Config mutates
and returns the real repository config after calling
removeWorktreeConfigExtension, which causes callers (e.g., GetRepoConfig ->
repo.Storer.SetConfig) to persist the stripped extension back to the repo. Fix
by returning a copy instead of the original: in
worktreeConfigTolerantStorer.Config() clone or deep-copy the config.Config
returned by s.Storer.Config(), call removeWorktreeConfigExtension on that copy,
and return the modified copy; alternatively implement a corresponding SetConfig
wrapper that preserves/reapplies extensions if cloning is not feasible. Ensure
you reference worktreeConfigTolerantStorer.Config, s.Storer.Config,
removeWorktreeConfigExtension and repo.Storer.SetConfig when making the change.
- Around line 264-272: In openWorktreeConfigTolerantRepo, do not discard the
native-git failure from gitRepositoryPaths when it returns an error; instead
return a wrapped error combining the gitRepositoryPaths error with the original
go-git error (use errors.Join or wrap with the static errors from
errors/errors.go per project guidelines) so callers can see both contexts;
update the return in the gitRepositoryPaths error branch to return nil and
errors.Join(err, originalErr) (and apply the same change to the similar call
site around lines 313-320 that also discards the gitRepositoryPaths error).

---

Outside diff comments:
In `@internal/exec/terraform_utils_test.go`:
- Around line 244-319: Add a runtime guard at the top of each gomonkey-based
test in this file (including
TestExecuteTerraformQueryRoutesThroughSchedulerAdapter and the two other tests
that use gomonkey) to skip on Apple Silicon macOS: check if runtime.GOOS ==
"darwin" && runtime.GOARCH == "arm64" and call t.Skip with a short message; this
prevents SIGBUS on macOS/arm64 while leaving the rest of the test logic
(patches.ApplyFunc, ExecuteTerraformQuery, scheduleradapters.ExecuteTerraform,
etc.) unchanged.
🪄 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: 92471425-e1a1-4c89-a30f-1d78a9997757

📥 Commits

Reviewing files that changed from the base of the PR and between 9051b69 and 3f1f254.

📒 Files selected for processing (20)
  • cmd/terraform/apply.go
  • cmd/terraform/destroy.go
  • cmd/terraform/options.go
  • cmd/terraform/options_test.go
  • cmd/terraform/plan.go
  • cmd/terraform/utils.go
  • errors/errors.go
  • go.mod
  • internal/exec/terraform_affected.go
  • internal/exec/terraform_utils_test.go
  • pkg/git/git.go
  • pkg/git/git_test.go
  • pkg/scheduler/adapters/terraform.go
  • pkg/scheduler/adapters/terraform_test.go
  • pkg/schema/schema.go
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden
  • tests/snapshots/TestCLICommands_config_alias_tp_--help_shows_terraform_plan_help.stdout.golden
  • tests/snapshots/TestCLICommands_tf_plan_help_shows_inherited_stack_flag.stdout.golden
  • tests/terraform_floci_dag_test.go
💤 Files with no reviewable changes (8)
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden
  • tests/snapshots/TestCLICommands_tf_plan_help_shows_inherited_stack_flag.stdout.golden
  • tests/snapshots/TestCLICommands_config_alias_tp_--help_shows_terraform_plan_help.stdout.golden
  • tests/terraform_floci_dag_test.go
  • pkg/schema/schema.go
  • pkg/scheduler/adapters/terraform_test.go
  • pkg/scheduler/adapters/terraform.go
🚧 Files skipped from review as they are similar to previous changes (5)
  • cmd/terraform/plan.go
  • cmd/terraform/destroy.go
  • cmd/terraform/options.go
  • cmd/terraform/options_test.go
  • cmd/terraform/utils.go

Comment thread cmd/terraform/apply.go Outdated
Comment thread pkg/git/git.go Outdated
Comment thread pkg/git/git.go
@aknysh

Copy link
Copy Markdown
Member

Mikhail Shirkov (@shirkevich) thanks, please address the comments

Copy link
Copy Markdown
Collaborator Author

CodeRabbit (@coderabbitai) review

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@aknysh
Andriy Knysh (aknysh) merged commit 45c562f into codex/dag-terraform-graph-bulk-path Jun 1, 2026
53 checks passed
@aknysh
Andriy Knysh (aknysh) deleted the codex/dag-terraform-plan-concurrency branch June 1, 2026 14:21
@atmos-pro

atmos-pro Bot commented Jun 1, 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.

Andriy Knysh (aknysh) added a commit that referenced this pull request Jun 6, 2026
* Add process and I/O execution foundation

* Address process I/O review feedback

* Address CodeRabbit rereview feedback

* Rename output pipeline API

* add dag scheduler core

* Address CodeRabbit scheduler feedback

* Ensure scheduler aggregates non-success statuses

* route terraform bulk execution through scheduler

* fix credential store concurrent initialization

* serialize terraform aliases sharing component paths

* remove temporary terraform concurrency override

* route terraform all through graph scheduler

* Address CodeRabbit Terraform adapter feedback

* Address CodeRabbit graph adapter feedback

* [autocommit] formatting fixes

* Preserve dependency-order log in scheduler path

* Apply gofumpt wrapping to scheduler tests

* [codex] enable terraform plan scheduler concurrency (#2468)

* enable terraform plan scheduler concurrency

* complete terraform plan concurrency output semantics

* fix pre-commit formatting

* update terraform plan help snapshots

* allow workdir aliases to run concurrently

* Skip Terraform runtime dirs in workdir sync

* Add Terraform summary node timings

* Add coverage for Terraform plan concurrency paths

* Allow Terraform aliases without workdir

* Address CodeRabbit plan concurrency feedback

* Test concurrent line prefix writes

* Clarify OpenTofu workdir runtime dirs

* Document Terraform scheduler helpers

* Restore Terraform all dependency order message

* Normalize Terraform resource key test expectation

* PR5: Concurrent Terraform apply and destroy (#2474)

* enable terraform apply destroy concurrency

* test(terraform): add floci apply destroy validation

* Address CodeRabbit apply destroy feedback

* Use portable Floci fixture logging

* Apply Floci test formatting

* Format terraform run helper

* Respect false auto-approve flag values

* Address Terraform adapter review nits

* Format Floci DAG test calls

* Address Floci test review nitpicks

* Fix test comment punctuation

* Use extensible plan hide flag

* Route Terraform affected through scheduler (#2519)

* Route terraform affected through scheduler

* test(terraform): add floci affected scheduler validation

* Add Terraform scheduler failure mode flags

* Support Git worktreeConfig repositories

* [autocommit] formatting fixes

* Address CodeRabbit affected scheduler feedback

* Use a single Terraform failure mode flag

* Format Floci affected DAG test calls

* Document affected scheduler helpers

* Fix worktreeConfig test cleanup on Windows

* Increase affected scheduler test coverage

---------

Co-authored-by: atmos-pro[bot] <173522224+atmos-pro[bot]@users.noreply.github.com>

* Address CodeRabbit follow-ups for plan concurrency

---------

Co-authored-by: atmos-pro[bot] <173522224+atmos-pro[bot]@users.noreply.github.com>

* docs: add terraform dag release notes

* docs: polish terraform dag changelog

* style: gofumpt terraform environment setup

* fix(terraform): include captured output in scheduler errors

* fix(terraform): address review feedback

* chore(terraform): address coderabbit nitpicks

---------

Co-authored-by: Erik Osterman (Cloud Posse) <erik@cloudposse.com>
Co-authored-by: atmos-pro[bot] <173522224+atmos-pro[bot]@users.noreply.github.com>
Co-authored-by: Andriy Knysh <aknysh@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xl Extra large size PR stacked Stacked

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants