Skip to content

Fix clouds.yaml search path to use XDG convention on all platforms - #3649

Merged
mandre merged 1 commit into
gophercloud:mainfrom
jlarriba:fix-clouds-xdg-path
Mar 20, 2026
Merged

mandre merged 1 commit into
gophercloud:mainfrom
jlarriba:fix-clouds-xdg-path

Conversation

@jlarriba

Copy link
Copy Markdown
Contributor

os.UserConfigDir() returns ~/Library/Application Support on macOS, which doesn't match the OpenStack standard. Use XDG_CONFIG_HOME with a ~/.config fallback instead.

Fixes #3496

@github-actions github-actions Bot added edit:config This PR updates config code semver:patch No API change backport-v2 This PR will be backported to v2 labels Mar 10, 2026
@coveralls

coveralls commented Mar 10, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 63.859% (+0.003%) from 63.856%
when pulling 74130d7 on jlarriba:fix-clouds-xdg-path
into 6e9ff80 on gophercloud:main.

mandre
mandre previously approved these changes Mar 10, 2026

@mandre mandre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, I believe this doesn't change the behavior on Linux but makes it more consistent across platforms.

@mandre mandre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it be possible to add a unit test for the fallback mechanism?

@jlarriba

Copy link
Copy Markdown
Contributor Author

Of course, ill work on it

os.UserConfigDir() returns ~/Library/Application Support on macOS,
which doesn't match the OpenStack standard. Use XDG_CONFIG_HOME
with a ~/.config fallback instead.
@jlarriba

Copy link
Copy Markdown
Contributor Author

Would it be possible to add a unit test for the fallback mechanism?

Added specific unit tests for the new mechanism

@mandre mandre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@mandre
mandre added this pull request to the merge queue Mar 20, 2026
Merged via the queue into gophercloud:main with commit b784b13 Mar 20, 2026
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-v2 This PR will be backported to v2 edit:config This PR updates config code semver:patch No API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect default clouds.yaml locations on Mac

3 participants