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

[2018.3] Fix to utils/vault.py #50090

Merged
merged 2 commits into from Oct 17, 2018

Conversation

Projects
None yet
2 participants
@garethgreenaway
Copy link
Member

commented Oct 17, 2018

What does this PR do?

Due to a previous PR the test_sdb_runner in sdb.test_vault from the Fluorine branch was failing because of a exception that was being swallowed in the test run_run function.

The cause was that when vault related functions were being run, if they were being run on the master then they were being forced to run through the _get_token_and_url_from_master() function, which is pull the id element out of the grains dictionary.

When the call was taking place from a runner, the exception was popping up since there is no id when called from a runner. This fix checks to see if the id exists in the dictionary first, if it is there then _get_token_and_url_from_master() is called, otherwise _use_local_config is called.

What issues does this PR fix or reference?

N/A

Tests written?

No. Verified that sdb tests from Fluorine pass as well as manual tests from previous PRs work as expected.

Commits signed with GPG?

Yes/No

Please review Salt's Contributing Guide for best practices.

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

Due to a previous PR the test_sdb_runner in sdb.test_vault was failin…
…g because of a exception that was being swallowed in the test run_run function. The cause was that when vault related functions were being run, if they were being run on the master then they were being forced to run through the _get_token_and_url_from_master() function, which is pull the id element out of the grains dictionary. When the call was taking place from a runner, the exception was popping up since there is no id when called from a runner. This fix checks to see if the id exists in the dictionary first, if it is there then _get_token_and_url_from_master() is called, otherwise _use_local_config is called.

@garethgreenaway garethgreenaway requested a review from rallytime Oct 17, 2018

@rallytime rallytime merged commit 05bd2a0 into saltstack:2018.3 Oct 17, 2018

8 of 10 checks passed

jenkins/pr/py2-windows-2016 The py2-windows-2016 job has failed
Details
jenkins/pr/py3-windows-2016 The py3-windows-2016 job has failed
Details
WIP ready for review
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint The lint job has passed
Details
jenkins/pr/py2-centos-7 The py2-centos-7 job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.