[GH-ISSUE #773] [QUESTION] One commit deploys all stacks #8673

Closed
opened 2026-05-03 04:49:35 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @shadybraden on GitHub (Aug 27, 2025).
Original GitHub issue: https://github.com/moghtech/komodo/issues/773

I believe this is user error, not a bug, but let me explain.

When I make a commit to my git repo (e.g. update a version tag on a compose.yaml) Komodo runs a Deploy on all stacks. Now most are already running, but anything that was either stopped or destroyed gets started up.

I don't believe this is the intended behavior, but suspect I mis-configured something.

My repo (which is a mirror of a local Forgejo instance)

Komodo has the webhooks:
https://komodo.holmlab.org/listener/github/stack/factorio-holmie/deploy Etc, for each stack (see my stacks here

So when I edit the compose.yaml for Factorio, it updates every other stack on that server.
This is visually seen in a spamming of toast notification on the bottom right of Komodo.

I can submit screenshots/video of this if you'd like.

Originally created by @shadybraden on GitHub (Aug 27, 2025). Original GitHub issue: https://github.com/moghtech/komodo/issues/773 I believe this is user error, not a bug, but let me explain. When I make a commit to my git repo (e.g. update a version tag on a compose.yaml) Komodo runs a Deploy on **all** stacks. Now most are already running, but anything that was either stopped or destroyed gets started up. I don't believe this is the intended behavior, but suspect I mis-configured something. My [repo](https://github.com/shadybraden/compose) (which is a mirror of a local Forgejo instance) Komodo has the webhooks: `https://komodo.holmlab.org/listener/github/stack/factorio-holmie/deploy` Etc, for each stack (see my stacks [here](https://github.com/shadybraden/compose/blob/main/syncs/holmie.toml) So when I edit the compose.yaml for Factorio, it updates every other stack on that server. This is visually seen in a spamming of toast notification on the bottom right of Komodo. I can submit screenshots/video of this if you'd like.
Author
Owner

@mbecker20 commented on GitHub (Aug 27, 2025):

After adding config file tracking for first time, on first deploy after configuring files all stack see this diff and will deploy. Subsequent deploys compare states with this first one to actually smart decide. Any chance you did not allow the Stacks one deploy cycle to get started tracking files for deploy?

Also, don't trigger mono repo stacks directly. Trigger an action or procedure using single webhook and further automation in there.

<!-- gh-comment-id:3228590076 --> @mbecker20 commented on GitHub (Aug 27, 2025): After adding config file tracking for first time, on first deploy after configuring files all stack see this diff and will deploy. Subsequent deploys compare states with this first one to actually smart decide. Any chance you did not allow the Stacks one deploy cycle to get started tracking files for deploy? Also, don't trigger mono repo stacks directly. Trigger an action or procedure using single webhook and further automation in there.
Author
Owner

@shadybraden commented on GitHub (Aug 27, 2025):

Hmmm I don't seem to understand the intended usage of webhooks. Looking at https://komo.do/docs/resources/webhooks#when-does-it-trigger ...

So if I have a mono repo, with 2x folders, each with a compose.yaml in it.

If I want only folder1's compose to redeploy on a git push with edits to folder1/compose.yaml how would I do that? Do I need only 1 webhook? Are there examples of procedures that, on any webhook, will look at what changed and redeploy only that?
Thanks!!

<!-- gh-comment-id:3229652054 --> @shadybraden commented on GitHub (Aug 27, 2025): Hmmm I don't seem to understand the intended usage of webhooks. Looking at https://komo.do/docs/resources/webhooks#when-does-it-trigger ... So if I have a mono repo, with 2x folders, each with a compose.yaml in it. If I want only folder1's compose to redeploy on a `git push` with edits to `folder1/compose.yaml` how would I do that? Do I need only 1 webhook? Are there examples of procedures that, on any webhook, will look at what changed and redeploy only that? Thanks!!
Author
Owner

@shadybraden commented on GitHub (Aug 28, 2025):

I've been using Stacks to deploy a compose.yaml file.
Should I be using Deployments?

example stack:

stack
name = "forgejo"
[stack.config]
server = "server1"
project_name = "forgejo"
git_provider = "git.holmlab.org"
git_account = "komodo"
repo = "shady/compose"
branch = "main"
run_directory = "forgejo"
additional_env_files = ["/etc/komodo/domain.env"]

<!-- gh-comment-id:3233713136 --> @shadybraden commented on GitHub (Aug 28, 2025): I've been using Stacks to deploy a compose.yaml file. Should I be using Deployments? example stack: [[stack]] name = "forgejo" [stack.config] server = "server1" project_name = "forgejo" git_provider = "git.holmlab.org" git_account = "komodo" repo = "shady/compose" branch = "main" run_directory = "forgejo" additional_env_files = ["/etc/komodo/domain.env"]
Author
Owner

@shadybraden commented on GitHub (Aug 28, 2025):

I am now using a procedure like:
https://github.com/moghtech/komodo/issues/769

So one procedure, saying to BatchDeployStackIfChanged. Now the issue is that everytime that webhook is heard all containers get deployed always. Even just on a testing of the webhook.

I believe this can be fixed by using the linked_repo rather than a full repo clone per stack....This will take some time to transfer over.

<!-- gh-comment-id:3233817615 --> @shadybraden commented on GitHub (Aug 28, 2025): I am now using a procedure like: https://github.com/moghtech/komodo/issues/769 So one procedure, saying to BatchDeployStackIfChanged. Now the issue is that everytime that webhook is heard all containers get deployed always. Even just on a testing of the webhook. I believe this can be fixed by using the linked_repo rather than a full repo clone per stack....This will take some time to transfer over.
Author
Owner

@mbecker20 commented on GitHub (Aug 28, 2025):

It works the same using linked repo or otherwise. There's not really enough information for me to guess why it's behaving as you say, which is not expected.

<!-- gh-comment-id:3234027151 --> @mbecker20 commented on GitHub (Aug 28, 2025): It works the same using linked repo or otherwise. There's not really enough information for me to guess why it's behaving as you say, which is not expected.
Author
Owner

@shadybraden commented on GitHub (Aug 28, 2025):

Thank you for the help. You did point me in the right direction. I believe I figured it out - definitely user error.
For anyone in the future, look at my compose repo for my working setup.

<!-- gh-comment-id:3234154316 --> @shadybraden commented on GitHub (Aug 28, 2025): Thank you for the help. You did point me in the right direction. I believe I figured it out - definitely user error. For anyone in the future, look at my compose repo for my working setup.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/komodo#8673