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

Use encoding when caching pillar data #52195

Merged
merged 4 commits into from
Jul 3, 2019

Conversation

waynew
Copy link
Contributor

@waynew waynew commented Mar 14, 2019

What does this PR do?

Fixes #51854 - sets the encoding when using the yaml dump

What issues does this PR fix or reference?

#51854

Previous Behavior

Caching just used the default encoding, which broke on Python3 where it expected to be writing bytes out to the file.

New Behavior

Now it specifies the encoding so dump expects the pillar in the form that it is.

Tests written?

Yes

Commits signed with GPG?

Yes

@waynew waynew requested a review from a team as a code owner March 14, 2019 22:10
Copy link
Contributor

@twangboy twangboy left a comment

Choose a reason for hiding this comment

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

This looks like a unit test with all the mocking

@waynew
Copy link
Contributor Author

waynew commented Mar 15, 2019

Those are just pieces that are irrelevant to the test. Opportunity to refactor maybe?

salt/minion.py Outdated Show resolved Hide resolved
@waynew waynew force-pushed the 51854-minion-pillar-cache-exception branch 3 times, most recently from 86df0e4 to d772631 Compare April 10, 2019 18:17
Copy link
Contributor

@dwoz dwoz left a comment

Choose a reason for hiding this comment

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

See my utf-8 comment and the linter.

@dwoz dwoz added the v2019.2.1 unsupported version label Apr 11, 2019
@waynew waynew force-pushed the 51854-minion-pillar-cache-exception branch 2 times, most recently from 4f832c9 to efbc8b7 Compare April 24, 2019 21:42
@waynew waynew requested a review from dwoz April 24, 2019 21:42
@Oloremo
Copy link
Contributor

Oloremo commented May 9, 2019

@waynew Sorry, I missed this. Just checked - it fixes my issue!

@waynew waynew force-pushed the 51854-minion-pillar-cache-exception branch from efbc8b7 to f99f986 Compare June 5, 2019 18:54
@waynew waynew force-pushed the 51854-minion-pillar-cache-exception branch from f99f986 to 0a89cfd Compare June 14, 2019 23:06
@waynew
Copy link
Contributor Author

waynew commented Jun 14, 2019

@dwoz lint issue is fixed, also it turns out there exists an SLS_ENCODING already, so I changed to using that.

@waynew
Copy link
Contributor Author

waynew commented Jul 2, 2019

re-run all

@waynew waynew force-pushed the 51854-minion-pillar-cache-exception branch from 63d2c2f to 50e8849 Compare July 3, 2019 15:43
@waynew waynew force-pushed the 51854-minion-pillar-cache-exception branch from 50e8849 to 79fb4de Compare July 3, 2019 21:01
@waynew waynew merged commit c42e1e6 into saltstack:2019.2 Jul 3, 2019
@waynew waynew deleted the 51854-minion-pillar-cache-exception branch July 24, 2019 20:10
waynew added a commit to waynew/salt that referenced this pull request Feb 12, 2020
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.

7 participants