Skip to content

fix: remove "dir breaks Coder Desktop file sync" warning - #549

Open
aqandrew wants to merge 1 commit into
mainfrom
andrew/desk-2-remove-filesync-warning
Open

aqandrew wants to merge 1 commit into
mainfrom
andrew/desk-2-remove-filesync-warning

Conversation

@aqandrew

Copy link
Copy Markdown

Summary

Removes the coder_agent.dir plan/apply-time warning claim that setting dir to a value other than $HOME "will break Coder Desktop file sync." That claim is no longer accurate now that the Mutagen fix (coder/mutagen#10) is released and bundled into the macOS and Windows Coder Desktop clients. The fix resolves the agent's absolute remote home directory once and uses it for both the scp copy and the ssh exec, so agent installation no longer fails when the remote working directory differs from $HOME.

The dir deprecation is intentionally left in place — it still steers users to $HOME (or omitting dir), which is the safe configuration.

Tracked in DESK-2.

Changes

  • provider/helpers/validation.go — drop the file-sync sentence from WarnDirNotHome (and its doc comment). It now returns only the deprecation warning.
  • provider/agent.go — remove the file-sync warning + link from the dir field description.
  • provider/helpers/validation_test.go — TestWarnDirNotHome expected warning count 2 → 1.
  • docs/resources/agent.md — regenerated via make gen.

Why no min-version / adoption gate

The warning fires at terraform plan/apply time and cannot know which Coder Desktop / Mutagen version each end user runs. Removing it is safe anyway because the surviving dir deprecation warning already directs users to $HOME, so users on pre-fix clients are not newly exposed (the actionable guidance is unchanged), while users on fixed clients stop seeing a now-false claim.

Out of scope

  • The dir deprecation itself (separate deprecation-cleanup effort).
  • coder/coder docs/install/releases/esr-2.29-2.34-upgrade.md repeats the claim but is a version-scoped historical migration note for the 2.29–2.34 ESR window; intentionally left unchanged.

Testing

  • go test ./provider/helpers/... passes.
  • go build ./... passes.
  • make gen diff limited to the removed warning clause.
Implementation plan

DESK-2: Remove the "dir breaks Coder Desktop file sync" warning

Remove the now-inaccurate "breaks Coder Desktop file sync" claim from the coder_agent.dir warning, now that coder/mutagen#10 is merged, released, and bundled into both Desktop clients. Keep the dir deprecation itself intact.

Inventory of affected locations

terraform-provider-coder

  • provider/helpers/validation.go — WarnDirNotHome returned string + doc comment.
  • provider/agent.go — dir field Description warning + link.
  • provider/helpers/validation_test.go — TestWarnDirNotHome warn count 2 → 1.
  • docs/resources/agent.md — generated ~> **Warning:** block (regenerate via make gen).

coder/coder (docs)

  • docs/user-guides/desktop/desktop-connect-sync.md — only the link target; contains no "dir breaks file sync" wording, so no change.
  • docs/install/releases/esr-2.29-2.34-upgrade.md — repeats the claim in a version-scoped migration table for the 2.29–2.34 ESR window; left as historical.

Non-actionable

  • coder/tss/docs/dogfood/evidence/*.json — captured log output, not source.
  • No embedded copy of the warning exists in coder/coder core; the string originates only in the provider.

Design decision

After removing the file-sync sentence, WarnDirNotHome returns only the deprecation sentence (which overlaps the schema's SDK Deprecated: field). Kept minimal here; retiring the function/field belongs to the separate dir deprecation cleanup.

Version skew: no adoption gate needed

The warning fires at plan/apply time and cannot know the end user's client version. Remove now; the surviving deprecation warning already steers users to $HOME, so old-client users are not newly exposed and fixed-client users stop seeing a false claim.


🤖 Opened by Coder Agents on behalf of @aqandrew.

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.
@linear-code

linear-code Bot commented Sep 25, 2026

Copy link
Copy Markdown

DESK-2

Comment thread provider/agent.go
"\n\n~> **Warning:** This attribute is deprecated and will be removed in a future release. " +
"Setting `dir` to a value other than `$HOME` will break " +
"[Coder Desktop file sync](https://coder.com/docs/user-guides/desktop/desktop-connect-sync).",
"\n\n~> **Warning:** This attribute is deprecated and will be removed in a future release.",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we not deciding that this no undeprecated and will not be removed?

return nil, nil
}
return []string{
`"dir" is deprecated and will be removed in a future release.`,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here are we not undeprecating this?
With the current chnage it looks like we are only chnaging the wording but provider wll still show a warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants