-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add support for MariaDB 10.5's new grants and grant aliases #59280
Add support for MariaDB 10.5's new grants and grant aliases #59280
Conversation
dd99fb1
to
5926f33
Compare
5926f33
to
b034a0b
Compare
LGTM, definitely needs integration :) |
@pprkut Thanks for the PR. Can you rebase to the latest master branch so we can see if these failing tests pass. Also, if you can add some tests for the changes that would be great. There are some newer tests that I added in a previous PR that use various versions of the MySQL variants running in Docker containers to test functionality. |
b034a0b
to
d48d049
Compare
@garethgreenaway Is |
Hello @pprkut, Thanks a lot, we were block by this issue until I saw your PR. Do you still work on this PR ? Because we're greatly interested in your fixes. Have a nice day, Jérémie |
@jsoligny Yes, still on my TODO list, just haven't had time yet to work on the tests :-/ |
54f751f
to
9884207
Compare
It's really difficult to test the tests because of all the "Slow tests are disabled!" 😞 |
@pprkut If you're running the tests locally you can pass the flat |
@garethgreenaway I'm afraid I'm not. I don't have the infrastructure for that locally, so I'm fully reliant on the CI 😞 |
9884207
to
f01b479
Compare
@pprkut Looks like there are some merge conflicts here. Unfortunately something, I suspect permissions, is preventing me from seeing what is conflicting. If you want to open that up I can look at adding some tests here for the new grants. |
f01b479
to
0dd9b04
Compare
@garethgreenaway I don't see the usual checkbox for allowing maintainer writes, so I tried something else. |
0dd9b04
to
22f726c
Compare
@pprkut Something is still preventing me from updating the branch or editing any files, which isn't necessary just sometimes helpful if unrelated tests are failing and a merge from master is necessary. Thanks for adding the tests, this is great! It does look like they're not skipping on variants where they shouldn't be running though. |
@garethgreenaway I sent you an invite to our repo. As far as I read, that's the only way to do it in this case 😕 Regarding the tests, that's where I got stuck, yes. The actual tests should be fine, just something in the logic that checks the mariadb version that's off |
@pprkut I'll look for the invite and check the tests. Thanks! |
@pprkut Looks like the invite to the ORG allows me additional permissions. Thanks! |
@pprkut Spinning up the tests locally I can see at least one of the tests is failing with the following error: |
@garethgreenaway Ah that might indeed be one thing, yes. I checked our pillar config and we do indeed specify those permissions on a global level there |
@pprkut Awesome. I updated the tests using globals and the tests are now passing, remaining tests failures are unrelated so I'll restart them. |
MariaDB has added some grants in 10.4.x and 10.5.x that are not present here, which results in an error when creating. This is an addition to saltstack#59280. Also improved exception handling in `grant_add` which did not log the original error message and replaced it with a generic error.
What does this PR do?
MariaDB 10.5 added alias for the REPLICATION SLAVE and REPLICATION CLIENT grants, and split up the SUPER grant into smaller pieces.
This adds the necessary code to support both the new aliases as well as the new grants resulting from the SUPER split (the SUPER grant itself is still supported).
Reference: https://mariadb.com/kb/en/grant/
What issues does this PR fix or reference?
Fixes: #58297
Previous Behavior
The mysql_grants.present state returns an error becomes it wants to add REPLICATION CLIENT but the db added BINLOG MONITOR
New Behavior
The state reports that the REPLICATION CLIENT grant was added successfully
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
No