fix: scope shellQuote and use --storage-deploy-mounts#2
Merged
Conversation
Two reconcile bugs causing dry-run to repeatedly fire commands whose target state already matches the server. shellQuote was wrapping every SSH arg in single quotes. dokku 0.36's SSH command wrapper handles literal-quoted args inconsistently across subcommands — git:report failed (so reads returned empty and every app looked unconfigured) while ports:report happened to pass through. Quote only args containing shell-significant characters; plain identifiers and flags reach the remote unmodified. Storage.read used --storage-mounts, which is not a valid dokku flag (real flags are --storage-build-mounts, --storage-deploy-mounts, --storage-run-mounts). Reads returned empty, so every mount looked missing on every run. Switched to --storage-deploy-mounts and added a parser for the "-v PATH:PATH -v PATH:PATH" line format dokku reports.
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.
Summary
shellQuotewas wrapping every SSH arg in single quotes. dokku 0.36's SSH command wrapper handles literal-quoted args inconsistently —git:reportfailed (so reads returned empty and every app looked unconfigured every run) whileports:reporthappened to pass through. Quote only args containing shell-significant characters; plain identifiers and flags reach the remote unmodified.Storage.readused--storage-mounts, which isn't a valid dokku flag (real flags are--storage-build-mounts,--storage-deploy-mounts,--storage-run-mounts). Reads returned empty, so every mount looked missing on every run. Switched to--storage-deploy-mountsand added a parser for the-v PATH:PATH -v PATH:PATHline format dokku reports.Test plan
bun test— 215 tests pass (added 2 dokku.ts tests covering the new shellQuote behavior; updated lists.test.ts for the new storage parser)DOKKU_HOST=localhost: prior to the fix every app reportedgit... doneandqultr-sandbox storage... done; after the fix both reportalready configuredand the corresponding commands no longer appear in the# Commands that would run:section