Skip to content

Regression: atmos list stacks became very slow since v1.214.0 #3068

Description

@mss

Describe the Bug

We currently use v1.214.0. I tried to verify that everything still works in v1.228.0 and a simple atmos list stacks became very slow:

v1.214.0

# time atmos list stacks | wc -l
25

real    0m0,434s
user    0m1,053s
sys     0m0,109s

v1.228.0

# time atmos list stacks | wc -l
25

real    0m35,679s
user    0m30,667s
sys     0m2,094s

I think something has changed with deferred template parsing because I had to comment out some code calling !terraform.output which otherwise caused an error

   Error: failed to execute describe stacks: failed to resolve deferred YAML functions in "vars": failed to process YAML function at subnets: failed to render template with datasources: failed to render deferred YAML function value:    
   template: deferred-yaml-function-value:1:89: executing "deferred-yaml-function-value" at <.settings.account.environment>: map has no entry for key "account"                                                                             ```

Expected Behavior

Listing a few stacks shouldn't take half a minute.

Steps to Reproduce

No response

Screenshots

No response

Environment

  • Version: v1.228.0

Additional Context

I should be able to do some bisecting to find the version where this was introduced.

This might be the same issue as #2344 even though we don't use locals.

Out atmos.yaml:

base_path: !repo-root '.'

components:
  terraform:
    base_path: 'components/terraform'
    deploy_run_init: true
    init_run_reconfigure: true
    auto_generate_backend_file: true
    workspaces_enabled: false

stacks:
  base_path: 'stacks'
  included_paths:
    - 'site/**/*.yaml'
  excluded_paths:
    - '**/_*.yaml'
  name_template: '{{ .settings.context.namespace }}-{{ .settings.context.tenant }}-{{ .settings.context.environment }}-{{ .settings.context.stage }}'

vendor:
  base_path: 'vendor'

templates:
  settings:
    enabled: true
    evaluations: 3
    sprig:
      enabled: true
    gomplate:
      enabled: true

version:
  check:
    enabled: false
settings:
  telemetry:
    enabled: false

commands: !include 'scripts/commands.yaml'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug🐛 An issue with the system

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions