garden
garden copied to clipboard
Setting dev mode up to sync a non-existent local directory fails silently
Bug
Current Behavior
If you choose a local directory that does not exist (maybe it's a relative directory that has the wrong root relative to the config it is defined within or maybe it's just a typo) then mutagen will end up "connected" with a status of "Halted due to root deletion" but as far as the logs given by Garden show there is no indication that anything went wrong.
I had to find the mutagen temp directory to even find the root cause of this because this manifested as a successful sync that just wasn't syncing any files.
Expected behavior
Garden should forward the mutagen status if not interpret the situation as an error and print out the full source directory to expose the real underlying problem.
Reproducible example
You can set up a sync and just refer to a source directory that does not exist.
Workaround
N/A
Suggested solution(s)
See expected behavior.
Additional context
N/A
Your environment
- OS: macOS Big Sur 11.6
- How I'm running Kubernetes: Microsoft Azure
garden version
: 0.12.32
Thanks @mattpolzin! We'll be making several enhancements relating to sync error reporting/logging, leaving this open to make sure this is captured.
Now, in 0.13.18, Garden does not fail silently. Instead, it starts a ghost one-way sync from a non-existing local directory to the target one and reports it as active in the output of sync status
command.
In the case of two-way sync, the non-existing local dir is created, but that seems to be expected.
Keeping this open as a valid issue. It should still be fixed in 0.13.