v1.222.0-rc.2
Pre-release
Pre-release
·
1 commit
to main
since this release
🚀 Enhancements
refactor(utils): drop dead helpers and hand-rolled SliceContainsString Erik Osterman (Cloud Posse) (@osterman) (#2608)
## what- Replace the hand-rolled
SliceContainsString/SliceContainsStringHasPrefix/SliceContainsStringStartsWithhelpers with stdlibslices.Contains/slices.ContainsFuncacross ~39 call sites, and remove the helpers frompkg/utils. - Delete nine dead exported functions that had zero callers anywhere:
ExtractAtmosConfig,GetGitHubRepoReleases,GetGitHubReleaseByTag,GetGitHubLatestRelease,PrintAsHcl,NewHighlightWriter(plus the now-orphanedHighlightWritertype/method),GetAtmosConfigJSON,PrintAsJSONToFileDescriptor, andPrintAsYAMLWithConfig— including the now-emptyconfig_utils.goand cascaded-unused imports/aliases. - Convert two
depends_ondynamic errors instack_utils.goto wrapped static errors (ErrDependencyResolution); their messages now carry adependency resolution failed:prefix.
why
- First step in dismantling
pkg/utils, one of the repo's historical "dumping grounds" —CLAUDE.mdalready forbids adding to it, so this begins draining it. slices.Containsis the identical O(n) scan as the deleted helper (the hot path inyaml_utils.goalready uses an O(1) map), so there is no behavior or performance change from the swap; it also drops a per-callperf.Trackdefer.- The static-error conversion satisfies the
err113lint gate after a flaggedif/elsechain was restructured into early returns, and aligns with the mandatory static-error policy.
references
- Internal cleanup; no issue. Follow-up PRs will relocate the remaining
pkg/utilsfiles into purpose-built packages (pkg/yaml,pkg/filesystem,pkg/data, etc.).
Summary by CodeRabbit
Release Notes
-
Refactor
- Updated internal string-slice membership checks to use Go’s standard library for consistency across Terraform and YAML/tag processing.
- Removed deprecated command wrapper entry points and other unused internal helpers to simplify the command surface area.
-
Bug Fixes
- Improved CI step-summary rendering to respect GitHub Actions output size limits, preventing overly large “Changed/Failed Components” sections.
-
Tests
- Added coverage for deploy/apply/plan auto-approve handling and vendor tag/component validation.
fix(terraform): restore init + workspace in terraform shell, add --skip-init Erik Osterman (Cloud Posse) (@osterman) (#2616)
## what- Restore
terraform initand Terraform workspaceselect/newtoatmos terraform shellso the interactive shell again starts in an initialized component and the correct workspace (notdefault). - Extract a provisioner-free
executeTerraformInitCommandfromexecuteTerraformInitPhaseso the shell can runinitwithout re-firing thebefore.terraform.initprovisioners it already runs (no double execution). MainExecuteTerraformpipeline behavior is unchanged. - The shell now resolves the terraform/tofu binary (and toolchain), generates backend/provider-override files, and assembles the full component environment before launching — matching the shared pipeline.
- Add a
--skip-initopt-out toatmos terraform shell(reuses the existing terraform flag; no new flag definition). Workspace selection stays governed byworkspaces_enabled. - Add regression tests for the init → workspace → shell ordering, the
--skip-initdecoupling, and the shell'sshouldRunTerraformInit/shouldSkipWorkspaceSetupcontract; document--skip-initin the command docs.
why
- This was an accidental regression introduced in v1.202.0 by #1813, which migrated
terraform shellto a standaloneExecuteTerraformShelland silently dropped theinit+ workspace steps that the sharedExecuteTerraformpipeline used to run. - The result contradicted the published docs (which promise the command generates a backend file and creates the component's workspace) and forced users to pin old versions.
--with-secretsbehavior is preserved: secrets are still kept out of the on-disk varfile and withheld from the shell unless explicitly requested.
references
- Regression introduced in #1813 (first released in v1.202.0).
Summary by CodeRabbit
- New Features
- Added
--skip-initflag toterraform shell, allowing you to start the interactive shell without runningterraform init. You can also set it viaATMOS_SKIP_INIT. Workspace selection behavior remains governed by existingworkspaces_enabledrules.
- Added
- Documentation
- Updated
terraform shellcommand docs to describe the new--skip-initoption, including how it interacts with workspace selection and how to useATMOS_SKIP_INIT.
- Updated
fix(templates): honor ignore_missing_template_values for stack name_template (#2345) Andriy Knysh (@aknysh) (#2619)
## what- Route the global
templates.settings.ignore_missing_template_valuesflag into every stackname_templaterendering site. Previously all 11 name-templateProcessTmpl(...)call sites passed a hardcodedfalse, so the flag was silently ignored for name-template rendering. - Sites updated: atlantis stack name, EKS cluster name, spacelift admin/stack name (describe affected),
describe localsname, spacelift utils, terraform workspace, terraform generate backends/varfiles, the shared name-template util, and validate stacks. - Add
TestBuildTerraformWorkspace_IgnoreMissingTemplateValuesasserting both directions (flag off → error; flag on →<no value>). - Incidental cleanup:
gofumptreformatting two adjacent pre-existingfmt.Errorfcalls instack_utils.go-err113debt undergolangci-lint --new-from-rev=origin/main. Converted them to the mandated static-wrapped-error pattern (new sentinelsErrInvalidDependsOn/ErrInvalidSettingsDependsOninerrors/errors.go) with tests covering both resolution branches and theerrors.Isbehavior.
why
- When a user sets
templates.settings.ignore_missing_template_values: true, they still hit hard errors likemap has no entry for key "..."whenever the error originated from rendering the stackname_template— because the name-templateProcessTmplsites bypassed the flag. - The fix is behavior-preserving: the flag defaults to
false, so existing configurations render exactly as before; behavior only changes for users who explicitly opt in. - The
err113conversion follows the repository's mandated static-error pattern and keeps the pre-commit/CI lint green; messages are unchanged.
references
- Closes #2345
- Fix doc:
docs/fixes/2026-06-15-name-template-ignore-missing-template-values.md
Summary by CodeRabbit
Summary by CodeRabbit
-
Bug Fixes
- Updated template rendering to consistently honor
ignore_missing_template_valuesacross stack- and dependency-related name derivations (including Terraform workspace and generated stack naming). - Added clearer error handling for invalid
depends_oninputs via dedicated sentinel errors.
- Updated template rendering to consistently honor
-
Tests
- Added regression tests covering enabled/disabled
ignore_missing_template_valuesbehavior and dependency resolution success/failure.
- Added regression tests covering enabled/disabled
-
Documentation
- Added a documentation page explaining the corrected
ignore_missing_template_valuesbehavior for stack name template rendering.
- Added a documentation page explaining the corrected