Why is deploy and run actions running on consecuti...
# 🤖|ask-kapa
f
@microscopic-river-74022 Why is deploy and run actions running on consecutive `garden deploy`s even though according to logs the action version is identical on both times? Shouldn't
garden
skip the actions that haven't changed since the last run?
m
Please stand by @fresh-angle-76971 as I search the knowledge base. I normally take about 15 seconds or so. :wave:
---------------------- Based on the knowledge sources, Garden does have smart caching abilities and should skip actions that haven't changed. However, there are specific scenarios where actions might run even with identical versions: ## For Run Actions If you're seeing Run actions execute on consecutive
garden deploy
commands, this is likely due to caching behavior. According to the [FAQ](): > The Run result is likely cached. Garden won't run Runs with cached results unless
spec.cacheResult: false
is set on the Run definition. However, the knowledge sources also indicate that Run actions behave differently from Deploy actions: > Runs by nature don't really have a status check, unlike Deploys. If a Run has
spec.cacheResult: false
set in its definition, it will execute every time regardless of whether its version has changed. ## For Deploy Actions Deploy actions should be skipped if their version hasn't changed. Garden uses [versions]() to determine which actions need to be performed: > These versions are used by Garden and the action graph to work out which actions need to be performed whenever you want to build, deploy, or test your project. If Deploy actions are running despite identical versions, this would be unexpected behavior based on the documentation provided. ## Troubleshooting Steps 1. Check if your Run actions have
spec.cacheResult: false
set 2. Use the
--force
flag with
garden deploy
to see if you're inadvertently forcing re-execution 3. Verify that the versions are truly identical by checking the logs carefully
The knowledge sources don't explicitly mention Deploy actions running with identical versions as expected behavior, so if this is happening with Deploy actions specifically, it may warrant further investigation or support from the Garden team. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted