Hey guys! I have a question about `atmos describe ...
# atmos
m
Hey guys! I have a question about
atmos describe dependents <component> -s <stack>
cmd. It takes 4m when I run it to find 1 dependency is this normal? Maybe I'm doing something wrong?
e
We recently fixed something related to this - are you on the latest release?
These changes were released in v1.212.0.
What release are you on?
m
Hmmm I'm on latest
1.213.0
but let me check that pr maybe I did something wrong
e
@Andriy Knysh (Cloud Posse) ☝️
a
https://atmos.tools/cli/commands/describe/dependents @Miguel Zablah it feels like maybe you have many
!terraform.output
and/or
!terraform.state
functions (or
atmos.Component
template functions) in your stacks. If you do, all of them will be evaluated when executing
atmos describe dependents
-
!terraform.output
is slow (it executes
terraform init
) try
Copy code
--process-templates (optional)
Enable/disable processing of Go templates in Atmos stacks manifests when executing the command. If the flag is not provided, it's set to true by default.

atmos describe dependents <component> -s <stack> --process-templates=false

--process-functions (optional)
Enable/disable processing of Atmos YAML functions in Atmos stacks manifests when executing the command. If the flag is not provided, it's set to true by default.

atmos describe dependents <component> -s <stack> --process-functions=false
m
I see let me try that, I only use
!terraform.state
but I do have a lot of them in the project but in the component that I was running this for I only have 2. Will it evaluate all of the components to find the dependency or will it use the
depemds_on
setting?
a
all components in all stacks - it needs it b/c the dependents can be from any stack.
(it's not smart enough to understand what it needs in advance, so it evaluates everything. We can prob make it smarter)
m
I can't run the cmd with this flag
--process-templates=false
it fails the
!terraform.state
bc of invalid arguments bc I have it with
{{ printf "%s-gbl-%s" .vars.tenant .vars.stage }}
😢
a
try to use —process-functions=false as well
it's just to confirm that the 4 minutes are from templates and functions processing
m
yeah with that it takes like 2s hahaha so I definitely have to many
!terraform.state
for this cmd
a
how many do you have in all stacks? we want to optimize it
m
idk the total but I have 1 file that I use it around 30 times? (yes it has 30 dependencies to different components) hahha
although this is 1 component the other components are way normal and will have less than 10 uses of this haha
I guess that still sounds like a loot hahahaha but I guess I can also work on reducing that hahaha
e
In the short term, that's going to be the best bet. Longer term, we absolutely do want to be able to optimize this so that it doesn't unnecessarily resolve functions based on the current operation.
👍 2