What happened?
Running devpod up <workspace> --recreate fails with a symlink conflict error:
info symlink .gitignore /root/.devpod/agent/contexts/default/workspaces/<workspace>/content/.dockerignore: file exists
fatal Process exited with status 1
run agent command
github.com/loft-sh/devpod/pkg/devcontainer/sshtunnel.ExecuteCommand.func2
.../pkg/devcontainer/sshtunnel/sshtunnel.go:129
The workspace content directory on the remote is not cleaned up before re-syncing, so stale files cause the symlink creation to fail.
What did you expect to happen instead?
--recreate should rebuild the dev container from scratch. Stale files (including .dockerignore) in the remote content/ directory should be removed before re-syncing.
How can we reproduce the bug? (as minimally and precisely as possible)
- Create a workspace from a local folder source:
devpod up <local-path>
- Run
devpod up <workspace> --recreate --debug
- The command fails immediately after the folder upload step
My devcontainer.json:
Local Environment:
- DevPod Version: v0.6.15
- Operating System: mac
- ARCH of the OS: ARM64
DevPod Provider:
- Local/remote provider: ssh
Anything else we need to know?
The fix likely belongs in up.go: prepareWorkspace or downloadLocalFolder — stale files/symlinks in content/ should be removed before extract.Extract runs.
What happened?
Running
devpod up <workspace> --recreatefails with a symlink conflict error:The workspace content directory on the remote is not cleaned up before re-syncing, so stale files cause the symlink creation to fail.
What did you expect to happen instead?
--recreateshould rebuild the dev container from scratch. Stale files (including.dockerignore) in the remotecontent/directory should be removed before re-syncing.How can we reproduce the bug? (as minimally and precisely as possible)
devpod up <local-path>devpod up <workspace> --recreate --debugMy
devcontainer.json:{ "name": "..." }Local Environment:
DevPod Provider:
Anything else we need to know?
The fix likely belongs in
up.go: prepareWorkspaceordownloadLocalFolder— stale files/symlinks incontent/should be removed beforeextract.Extractruns.