Repository navigation
fix: un-deprecate coder_agent dir - #549
Conversation
The coder_agent.dir plan/apply-time warning claimed that setting dir to a value other than $HOME breaks Coder Desktop file sync. That is no longer accurate now that the Mutagen fix (coder/mutagen#10) is released and bundled into the macOS and Windows Desktop clients, which resolve the agent's absolute home directory and use it for both the scp copy and the ssh exec. Remove the file-sync sentence from WarnDirNotHome and from the dir field description, and regenerate docs. The dir deprecation itself is unchanged and still steers users to $HOME, so no min-version/adoption gate is needed. Tracked in DESK-2. Opened by Coder Agents on behalf of @aqandrew.
|
Good catch — you're right that as written this only changes the wording and the provider still emits a deprecation warning. I dug into the history: Since the file-sync problem is now fixed (coder/mutagen#10, released and bundled into both Desktop clients), the original justification for the deprecation is gone. So the cleaner change is to fully un-deprecate Before I expand this PR to do that: was file sync the only reason we deprecated 🤖 Posted by Coder Agents on behalf of @aqandrew. |
IIRC yes. But lets confirm from @zenithwolf1000 and @ash |
|
File sync was the only reported issue (as far as I know), but it would be a problem with plain scp still and any other tool that uses scp. Whether any users will actually try that and run into the issue though...I have no idea. One would think though that someone somewhere will probably use scp at some point. 😆 |
|
@code-asher Agreed, that matches what we traced: modern OpenSSH I think it's a small problem, though, and not a reason to keep
Proposal: un-deprecate 🤖 Posted by Coder Agents on behalf of @aqandrew. |
The dir deprecation, its description warning, and the WarnDirNotHome plan-time validator were all added in #507 (DEVEX-227) solely because a non-$HOME dir broke Coder Desktop file sync. That is fixed in coder/mutagen#10, released and bundled into the macOS and Windows Desktop clients, so the deprecation no longer has a reason to exist. Atif, Asher, and Sushant confirmed on #549 that file sync was the only reason. Revert #507: drop the Deprecated field, the description warning, the ValidateFunc, WarnDirNotHome, and its test, and regenerate docs. Replace the warning with a short note that SFTP and scp resolve relative and ~/-prefixed paths against dir, so absolute paths should be used for file transfers (OpenSSH scp strips ~/ client-side). Opened by Coder Agents on behalf of @aqandrew.
|
@linear create an issue for both and set deadline of October 22. |
Summary
Un-deprecates
coder_agent.dirby reverting #507.#507 (DEVEX-227) added the
Deprecated:field, the~> Warningdescription block, and theWarnDirNotHomeplan-time validator together, solely because a non-$HOMEdirbroke Coder Desktop file sync. That is fixed in coder/mutagen#10, now released and bundled into the macOS and Windows Desktop clients. @matifali, @code-asher, and @zenithwolf1000 confirmed in this PR that file sync was the only reason for the deprecation.Tracked in DESK-2.
Changes
provider/agent.go: removeDeprecated:andValidateFuncfromdir. The description now notes that SFTP and scp resolve relative and~/-prefixed paths againstdir, so file transfers should use absolute paths. The rest of the file matches its state before chore: warn when coder_agent dir breaks Desktop file sync #507.provider/helpers/validation.go,validation_test.go: deleteWarnDirNotHomeandTestWarnDirNotHome.docs/resources/agent.md: regenerated withmake gen.diris listed as a plain(String)again.Why keep a note about scp
Modern OpenSSH
scpstrips~/on the client (prepare_remote_path()), soscp host:~/foolands indir. The server can't tell~/foofromfoo, and devcontainerworkspaceFolderbehaves the same way regardless ofdir, so this is documented instead of warned about.Testing
go test ./provider/...,go build ./...,go vet ./provider/..., and gofmt pass.make gendiff is limited to thedirentry.Follow-up
After this ships in a provider release, a small coder/coder PR will append an update to the
dirrow in the 2.29–2.34 ESR upgrade notes (keeping the original text) sayingdirwas un-deprecated in that release.Decision log
dirshould be un-deprecated instead. Git history showeddirwas not deprecated before chore: warn when coder_agent dir breaks Desktop file sync #507, and chore: warn when coder_agent dir breaks Desktop file sync #507's only stated reason was file sync (DEVEX-227). No separate tracking issue exists.scpstill resolves~/againstdir. @zenithwolf1000 (chore: warn when coder_agent dir breaks Desktop file sync #507 author): "let's clean up the deprecation warning altogether".dir, so removingdirwould not remove it. Decision: un-deprecate and document absolute paths.🤖 Opened by Coder Agents on behalf of @aqandrew.