Better support comments in mysql files#54371
Conversation
|
Rebased on master |
|
@mchugh19 thank you for this work! It's awesome!
There's already a unit test for mysql module so it'd be pretty simple to extend this. |
|
Additional thanks for blacken your code! |
|
Never say nothing good came out of the test cases! Since getting back to this, I was not able to get the |
DmitryKuzmenko
left a comment
There was a problem hiding this comment.
Please understand me correctly I'm not trying to bore you. =) Thanks for understanding!
|
This PR is blackened and merge ready. |
What does this PR do?
Better handles comments in mysql files.
Also adds a no_parse flag to pass the entirety of the mysql file contents to mysql. This allows mysql to handle its own parsing, which might work better for some complex setups, but also prevents salt from returning specifics of what has changed.
What issues does this PR fix or reference?
#47488
Previous Behavior
A file like
would be interpreted as
New Behavior
Now that file is interpreted as
When no_parse is used, the execution module will return something like the following for files which contain many create, insert, and update statements.
Tests written?
Yes - existing test updated to support this functionality
Commits signed with GPG?
No