Skip to content

revert(config): restore unix ConfigDir to ~/.devsy#598

Merged
skevetter merged 1 commit into
mainfrom
revert/config-dir-move
Jul 5, 2026
Merged

revert(config): restore unix ConfigDir to ~/.devsy#598
skevetter merged 1 commit into
mainfrom
revert/config-dir-move

Conversation

@skevetter

@skevetter skevetter commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Alternative to #596. Instead of migrating config.yaml forward, this reverts the unix ConfigDir move introduced in #580.

#580 moved ConfigDir from ~/.devsy to ~/.config/devsy on darwin/linux, but left DataDir/StateDir/CacheDir in place. config.yaml holds each provider's Initialized flag, while the state it references (contexts, providers, workspaces) stayed under DataDir at ~/.devsy. After upgrading to v1.4.0-beta.1, devsy read an empty config from the new (empty) directory and every workspace failed with provider "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 ConfigDir to ~/.devsy so the two sit together again. This is a true no-op for existing users (their config.yaml never moved).

Notes

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

  • Bug Fixes
    • Updated default configuration file locations on Linux and macOS to use a hidden folder in the user’s home directory.
    • Aligned related path checks so config and data locations now follow the same home-based root on macOS.
    • Adjusted expected config file paths in tests to match the new defaults.

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).
@netlify

netlify Bot commented Jul 5, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit c6fef4a
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a4a8bf79c709c0008cd1d5d

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR changes how ConfigDir() computes its path on Darwin and Linux, switching from ~/.config/<RepoName> to ~/.<RepoName>. Corresponding Darwin and Linux tests are updated to assert the new path, and one Darwin test is renamed.

Changes

ConfigDir path relocation

Layer / File(s) Summary
Darwin ConfigDir path and tests
pkg/config/pathmanager_darwin.go, pkg/config/pathmanager_darwin_test.go
ConfigDir() now joins home with . + RepoName instead of .config/RepoName; test renamed to TestDarwinConfigDir_SharesDataRoot and now checks that ConfigDir() and DataDir() share a root, with ConfigFilePath() expectations updated accordingly.
Linux ConfigDir path and tests
pkg/config/pathmanager_linux.go, pkg/config/pathmanager_linux_test.go
ConfigDir() now builds ~/.<RepoName> instead of ~/.config/<RepoName>; TestLinuxDefaults and TestConfigFilePathDefault expectations updated to match the new path.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • devsy-org/devsy#74: Both PRs modify the same ConfigDir() implementations and tests in pathmanager_darwin.go/pathmanager_linux.go.
  • devsy-org/devsy#580: Both PRs modify the same ConfigDir()/ConfigFilePath() path construction and associated Darwin/Linux test expectations, with opposite path direction changes.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: reverting Unix ConfigDir back to ~/.devsy.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@netlify

netlify Bot commented Jul 5, 2026

Copy link
Copy Markdown

Deploy Preview for images-devsy-sh ready!

Name Link
🔨 Latest commit c6fef4a
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6a4a8bf7cb7e7500085f4016
😎 Deploy Preview https://deploy-preview-598--images-devsy-sh.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the size/s label Jul 5, 2026
@skevetter
skevetter marked this pull request as ready for review July 5, 2026 18:51

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
pkg/config/pathmanager_linux_test.go (1)

48-49: 🧹 Nitpick | 🔵 Trivial

Consider a migration note for users on the intermediate buggy release.

Users who ran the version with the ~/.config/<RepoName> path (from #580) may have a config.yaml with Initialized flags 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 by provider "docker" is not initialized again.

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

📥 Commits

Reviewing files that changed from the base of the PR and between d6c8752 and c6fef4a.

📒 Files selected for processing (4)
  • pkg/config/pathmanager_darwin.go
  • pkg/config/pathmanager_darwin_test.go
  • pkg/config/pathmanager_linux.go
  • pkg/config/pathmanager_linux_test.go

@skevetter
skevetter merged commit a997c06 into main Jul 5, 2026
60 checks passed
@skevetter
skevetter deleted the revert/config-dir-move branch July 5, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant