fix: actually redeploy swarm stack when saving edits#2365
Open
GiulioSavini wants to merge 1 commit intogetarcaneapp:mainfrom
Open
fix: actually redeploy swarm stack when saving edits#2365GiulioSavini wants to merge 1 commit intogetarcaneapp:mainfrom
GiulioSavini wants to merge 1 commit intogetarcaneapp:mainfrom
Conversation
clicking save on a swarm stack in edit mode was only persisting the source files on disk — the running services were never updated with the new config. wire the save button to deployStack so changes actually land in swarm instead of silently getting ignored. fixes getarcaneapp#2361
Member
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Editing a Swarm stack and clicking Save only persisted the new compose source to disk — the running services were never updated. Docker was left running the original config, so any changes (new ports, volumes, env vars) were silently dropped.
Root cause
In edit mode, the form's submit handler called
updateStackSourcewhich is a storage-only endpoint. It writes files but doesn't touch Swarm.Fix
Wire the save button in edit mode to
deployStackinstead.deployStackdoes the actualdocker stack deployAND persists the source, so the stack ends up in the right state without needing a separate redeploy step.Fixes #2361
Disclaimer Greptiles Reviews use AI, make sure to check over its work.
To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike
To have Greptile Re-Review the changes, mention
greptileai.Greptile Summary
This PR fixes a bug where editing a Swarm stack and saving only persisted the compose source to disk but never redeployed the running services. The one-line fix replaces the
updateStackSource(storage-onlyPUT) call withdeployStack(which runsdocker stack deployand persists the source) insidehandleSaveStackSource.Confidence Score: 5/5
Safe to merge — minimal, targeted fix that correctly wires the save action to the deploy endpoint.
Single-line change with a clear root cause and well-understood fix. No new logic is introduced; the edit-mode save path now mirrors what
docker stack deploydoes (idempotent create-or-update). Error messages and redirect paths in the success callback remain appropriate for edit mode.No files require special attention.
Reviews (1): Last reviewed commit: "fix: redeploy swarm stack when saving ed..." | Re-trigger Greptile