Repository navigation
Track DAG concurrent execution rollout - #2460
Mikhail Shirkov (shirkevich) wants to merge 2 commits into
Conversation
|
Tip Atmos Pro
No affected stacks workflow was detected for this pull request. |
|
PR3 current-state draft is open: #2462 What is in the branch:
Validation performed:
Temporary concurrency timing experiment using ATMOS_EXPERIMENTAL_DAG_MAX_CONCURRENCY:
Finding:
Draft caveat:
|
|
Update for PR3 / #2462: The auth credential-store race discovered during the concurrency-4 timing experiment has now been fixed in #2462. The branch removes per-component global Viper env binding from pkg/auth/credentials.NewCredentialStoreWithConfig and resolves keyring type directly with precedence ATMOS_KEYRING_TYPE > auth.keyring.type > system. Validation after the fix:
Result: concurrency 4 now succeeds, real 110.59s. Captured log has no fatal error, no concurrent map writes, and no viper.(*Viper).BindEnv stack. Output is still interleaved at concurrency >1, so output orchestration remains separate before user-visible concurrency can ship. |
|
Update for PR3 / #2462: Investigated the concurrency-8 failure. It was not the auth/Viper race. It was OpenTofu local working-directory contention:
Implemented the short-term fix in #2462:
Validation:
Longer-term discussion item for repo owners: |
|
Superseded by same-repo tracking draft PR #2467, which uses cloudposse/atmos as the head repository and points at the replacement stacked PRs. |
Summary
Expands the DAG concurrent execution rollout tracker into a broader implementation plan for splitting the work across separate PRs.
The tracker now documents:
dependencies.components, ready-queue scheduling, no newinternal/execfiles, finalize semantics, and sequential parity for--max-concurrency 1ExecuteTerraformQuery()pathActive PRs
maincodex/dag-process-io-foundationrunTerraformShowstdout capture fixcodex/dag-process-io-foundationcodex/dag-scheduler-corepkg/schedulercore with ready-queue scheduling and isolated testscodex/dag-scheduler-corecodex/dag-terraform-graph-bulk-path--all,--components, and--querygraph-backed routing; includes temporary concurrency validation hooks and discovered safety prerequisitescodex/dag-concurrent-execution-trackerThe stack branches now also exist on
cloudposse/atmos, and PR bases are chained directly. GitHub's official stacked-PR feature is not currently enabled for this repository, so the stack is represented through normal chained PR base branches rather thangh stackmetadata.Planned PRs
codex/dag-terraform-plan-concurrencyplanon the graph-backed path. Wire--max-concurrencyfor plan-only execution and add output orchestration sufficient for readable CLI behavior.--max-concurrency 1parity.codex/dag-terraform-apply-destroy-concurrencyapply/destroywith explicit safety rules, failure handling, cancellation, and finalize semantics.codex/dag-affected-scheduler-route--affectedonto the scheduler/orchestrator path after non-affected Terraform bulk execution is stable.codex/dag-mixed-type-adapterscodex/dag-scheduling-diagnosticsTF_DATA_DIR, and retained debug artifacts.atmos terraform shellexpectations.Rollout Shape
maincodex/dag-process-io-foundationcodex/dag-scheduler-core; currently includes validation-only concurrency override that must be removed or fixed back to sequential before review-ready state--affectedonto the scheduler path - plannedCurrent Findings
PR 3 local validation used a temporary
ATMOS_EXPERIMENTAL_DAG_MAX_CONCURRENCYoverride to exercise the scheduler path before exposing any user-visible concurrency. Findings so far:cloudposse/atmos: PR 1 -> PR 2 -> PR 3. The officialgh-stackCLI extension is installed locally, butgh stack linkreported that stacked PRs are not enabled for this repository.viper.BindEnv, causingfatal error: concurrent map writes. PR 3 now fixes this narrowly inpkg/auth/credentialsby resolving keyring type directly with precedenceATMOS_KEYRING_TYPE > auth.keyring.type > system..terraform/terraform.tfstate. PR 3 now adds Terraform-adapter resource locking keyed by physical component path, preserving parallelism across distinct folders while serializing aliases sharing one folder.TF_DATA_DIRand generated files. That needs repo-owner discussion because it changes the debugging/operator model, including retained execution copies and howatmos terraform shellshould map to them.Validation
Tracker update only. Implementation validation is tracked in the linked PRs, especially PR 3.
Next Step
Bring PR 3 back to its intended review shape: keep Terraform
--all,--components, and--queryon the graph-backed scheduler path, preserve auth/store/YAML-function behavior, retain the narrow safety prerequisites discovered during validation, and force effective execution back to sequential for review.Before PR 4 starts, discuss the longer-term isolated-workdir model with repo owners and decide how debugging artifacts, cleanup, and
atmos terraform shellshould behave if true same-folder alias parallelism is introduced. If the repository later enables GitHub stacked PRs, the existing chained-base branches can be linked into official stack metadata.