Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clouds: Fix the clouds.yaml locations #3040

Merged
merged 1 commit into from
May 6, 2024

Conversation

pierreprinetti
Copy link
Contributor

Before this patch, all default locations were scanned for a clouds.yaml even when a match was found. The last found clouds.yaml replaced any previous finding, effectively reversing the order of priority for the locations.

Fixes #3038

@pierreprinetti pierreprinetti self-assigned this May 6, 2024
@github-actions github-actions bot added the semver:patch No API change label May 6, 2024
@pierreprinetti
Copy link
Contributor Author

pierreprinetti commented May 6, 2024

The fix is essentially adding that break statement on line 107.

I am also removing the check on *os.PathError because according to the docs, that's the only error that can ever come from os.Open(). Removing the check lets me write a simpler and more readable conditional.

@coveralls
Copy link

coveralls commented May 6, 2024

Coverage Status

coverage: 78.959% (+0.03%) from 78.934%
when pulling 5eb171e on shiftstack:parse_clouds
into f7893b8 on gophercloud:master.

@pierreprinetti pierreprinetti added semver:major Breaking change and removed semver:patch No API change labels May 6, 2024
@github-actions github-actions bot added semver:patch No API change and removed semver:major Breaking change labels May 6, 2024
@pierreprinetti pierreprinetti added semver:major Breaking change and removed semver:patch No API change labels May 6, 2024
@github-actions github-actions bot added semver:patch No API change and removed semver:major Breaking change labels May 6, 2024
@pierreprinetti pierreprinetti added semver:major Breaking change and removed semver:patch No API change labels May 6, 2024
@github-actions github-actions bot added semver:patch No API change and removed semver:major Breaking change labels May 6, 2024
@github-actions github-actions bot added semver:patch No API change and removed semver:patch No API change labels May 6, 2024
@pierreprinetti pierreprinetti added semver:major Breaking change and removed semver:patch No API change labels May 6, 2024
Before this patch, all default locations were scanned for a
`clouds.yaml` even when a match was found. The last found `clouds.yaml`
replaced any previous finding, effectively reversing the order of
priority for the locations.
@github-actions github-actions bot added semver:patch No API change and removed semver:major Breaking change labels May 6, 2024
Copy link
Contributor

@EmilienM EmilienM left a comment

Choose a reason for hiding this comment

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

LGTM

@EmilienM EmilienM merged commit 63fe2de into gophercloud:master May 6, 2024
12 of 13 checks passed
@EmilienM EmilienM deleted the parse_clouds branch May 6, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:patch No API change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

clouds.Parse() ignores the local clouds.yaml
3 participants