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

Load Salt Cloud Hetzner Module Config from Usual Sources #61400

Merged
merged 4 commits into from
Mar 8, 2022

Conversation

HerHde
Copy link
Contributor

@HerHde HerHde commented Dec 26, 2021

What does this PR do?

Fix config loading behaviour

What issues does this PR fix or reference?

Fixes: #61399

Previous Behavior

Config values were only taken from the current context, as available in vm_

New Behavior

Search and return a setting in a known order:

  1. In the virtual machine's configuration
  2. In the virtual machine's profile configuration
  3. In the virtual machine's provider configuration
  4. In the salt cloud configuration if global searching is enabled
  5. Return the provided default

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@welcome
Copy link

welcome bot commented Dec 26, 2021

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@HerHde HerHde changed the title Hetzner load cloud config Load Salt Cloud Hetzner Module Config from Usual Sources Dec 27, 2021
@HerHde
Copy link
Contributor Author

HerHde commented Jan 3, 2022

I don't understand why the bot still mentions missing docstrings, did I not fix them?

@HerHde HerHde marked this pull request as ready for review January 10, 2022 20:41
@HerHde HerHde requested a review from a team as a code owner January 10, 2022 20:41
@HerHde HerHde requested review from dwoz and removed request for a team January 10, 2022 20:41
@HerHde
Copy link
Contributor Author

HerHde commented Feb 23, 2022

Hey @dwoz, this is ready for review.

As mentioned, I don't quite understand why the PR Bot is complaining. Some pipelines seem to fail while trying to check out the code, so I assume it shouldn't concern me.

If there is anything, please let me know!

@HerHde
Copy link
Contributor Author

HerHde commented Feb 28, 2022

Maybe @Ch3LL could help me with this one?

@HerHde HerHde force-pushed the hetzner-load-cloud-config branch 2 times, most recently from c3d22fc to dece711 Compare March 3, 2022 10:00
salt/cloud/clouds/hetzner.py Outdated Show resolved Hide resolved
@HerHde HerHde force-pushed the hetzner-load-cloud-config branch from 966757a to b7b56a0 Compare March 7, 2022 11:58
@HerHde HerHde force-pushed the hetzner-load-cloud-config branch from b7b56a0 to 16b48ec Compare March 7, 2022 11:58
@github-actions
Copy link

github-actions bot commented Mar 7, 2022

Hi! I'm your friendly PR bot!

You might be wondering what I'm doing commenting here on your PR.

Yes, as a matter of fact, I am...

I'm just here to help us improve the documentation. I can't respond to
questions or anything, but what I can do, I do well!

Okay... so what do you do?

I detect modules that are missing docstrings or "CLI Example" on existing docstrings!
When I was created we had a lot of these. The documentation for these
modules need some love and attention to make Salt better for our users.

So what does that have to do with my PR?

I noticed that in this PR there are some files changed that have some of these
issues. So I'm leaving this comment to let you know your options.

Okay, what are they?

Well, my favorite, is that since you were making changes here I'm hoping that
you would be the most familiar with this module and be able to add some other
examples or fix any of the reported issues.

If I can, then what?

Well, you can either add them to this PR or add them to another PR. Either way is fine!

Well... what if I can't, or don't want to?

That's also fine! We appreciate all contributions to the Salt Project. If you
can't add those other examples, either because you're too busy, or unfamiliar,
or you just aren't interested, we still appreciate the contributions that
you've made already.

Whatever approach you decide to take, just drop a comment here letting us know!

Detected Issues (click me)
Check Known Missing Docstrings...........................................Failed
- hook id: invoke
- duration: 1.72s
- exit code: 1

The function 'avail_locations' on 'salt/cloud/clouds/hetzner.py' does not have a docstring
The function 'avail_images' on 'salt/cloud/clouds/hetzner.py' does not have a docstring
The function 'avail_sizes' on 'salt/cloud/clouds/hetzner.py' does not have a docstring
The function 'list_ssh_keys' on 'salt/cloud/clouds/hetzner.py' does not have a docstring
The function 'list_nodes_full' on 'salt/cloud/clouds/hetzner.py' does not have a docstring
The function 'list_nodes' on 'salt/cloud/clouds/hetzner.py' does not have a docstring
The function 'show_instance' on 'salt/cloud/clouds/hetzner.py' does not have a docstring
Found 7 errors


Thanks again!

@Ch3LL Ch3LL added the Phosphorus v3005.0 Release code name and version label Mar 7, 2022
@Ch3LL Ch3LL merged commit 2772b00 into saltstack:master Mar 8, 2022
@welcome
Copy link

welcome bot commented Mar 8, 2022

Congratulations on your first PR being merged! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Phosphorus v3005.0 Release code name and version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Hetzner Cloud state ignores config values
2 participants