revert(config): restore unix ConfigDir to ~/.devsy#598
Conversation
PR #580 moved unix ConfigDir from ~/.devsy to ~/.config/devsy, but config.yaml holds each provider's Initialized flag and the state it references (contexts, providers) stayed under DataDir at ~/.devsy. After upgrade devsy read an empty config from the new dir and every workspace failed with "provider is not initialized". Restore ConfigDir to ~/.devsy on darwin and linux so config.yaml sits with the data it configures again. Keeps the pm.pm self-reference cleanup from #580. Windows is unaffected (ConfigDir already differs from DataDir there).
✅ Deploy Preview for devsydev canceled.
|
📝 WalkthroughWalkthroughThe PR changes how ChangesConfigDir path relocation
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Deploy Preview for images-devsy-sh ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pkg/config/pathmanager_linux_test.go (1)
48-49: 🧹 Nitpick | 🔵 TrivialConsider a migration note for users on the intermediate buggy release.
Users who ran the version with the
~/.config/<RepoName>path (from#580) may have aconfig.yamlwithInitializedflags written there. After this revert, that location is no longer read, and they'll need to re-run provider initialization (or manually move the file back to~/.devsy). Worth a changelog/release note callout so affected users aren't surprised byprovider "docker" is not initializedagain.Also applies to: 82-82
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/config/pathmanager_linux_test.go` around lines 48 - 49, Add a migration/changelog note for the intermediate release that wrote config to the buggy ~/.config/<RepoName> location, since path handling is now reverted in PathManager tests and config loading no longer reads that directory. Call out that users with an Initialized flag in that old config.yaml will need to rerun provider initialization or move the file back to ~/.devsy so they don’t hit provider not initialized again.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@pkg/config/pathmanager_linux_test.go`:
- Around line 48-49: Add a migration/changelog note for the intermediate release
that wrote config to the buggy ~/.config/<RepoName> location, since path
handling is now reverted in PathManager tests and config loading no longer reads
that directory. Call out that users with an Initialized flag in that old
config.yaml will need to rerun provider initialization or move the file back to
~/.devsy so they don’t hit provider not initialized again.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e7812de2-abc6-40c3-ba29-6b11c27e6fdb
📒 Files selected for processing (4)
pkg/config/pathmanager_darwin.gopkg/config/pathmanager_darwin_test.gopkg/config/pathmanager_linux.gopkg/config/pathmanager_linux_test.go
Summary
Alternative to #596. Instead of migrating config.yaml forward, this reverts the unix
ConfigDirmove introduced in #580.#580 moved
ConfigDirfrom~/.devsyto~/.config/devsyon darwin/linux, but leftDataDir/StateDir/CacheDirin place. config.yaml holds each provider'sInitializedflag, while the state it references (contexts, providers, workspaces) stayed underDataDirat~/.devsy. After upgrading to v1.4.0-beta.1, devsy read an empty config from the new (empty) directory and every workspace failed withprovider "docker" is not initialized.Since the split was only half-done — config.yaml separated from the data it configures, with no XDG payoff — this restores
ConfigDirto~/.devsyso the two sit together again. This is a true no-op for existing users (their config.yaml never moved).Notes
pm.pm = pmstaticcheck cleanup that refactor(config): separate config dir from data dir on unix #580 also bundled in.ConfigDir(APPDATA) already differs fromDataDir(LOCALAPPDATA) there.ConfigDir == DataDiron unix.If the XDG split is a deliberate direction (moving all dirs under
~/.config/~/.local/share), prefer the migration approach in #596 instead.Summary by CodeRabbit