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

[PR #368/07a72865 backport][stable-2] mysql_role: fix and simplify role member detection #371

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented May 25, 2022

This is a backport of PR #368 as merged into main (07a7286).

bugfix for mysql_role

fixes #366 ("detaching too few members")

Instead of parsing the show grants statement output for each user, query the built-in tables to find out who is member of a role.
MySQL: mysql.role_edges
MariaDB: mysql.roles_mapping

* mysql_role: fix and simplify role membership detection

* add changelog fragment

* Update changelogs/fragments/368-mysql_role-fix-member-detection.yml

Co-authored-by: Andrew Klychkov <[email protected]>

Co-authored-by: Felix Hamme <[email protected]>
Co-authored-by: Andrew Klychkov <[email protected]>
(cherry picked from commit 07a7286)
@codecov
Copy link

codecov bot commented May 25, 2022

Codecov Report

Merging #371 (f141d31) into stable-2 (c02e46e) will decrease coverage by 0.24%.
The diff coverage is 50.00%.

@@             Coverage Diff              @@
##           stable-2     #371      +/-   ##
============================================
- Coverage     75.80%   75.55%   -0.25%     
============================================
  Files            26       26              
  Lines          2294     2283      -11     
  Branches        557      552       -5     
============================================
- Hits           1739     1725      -14     
- Misses          380      384       +4     
+ Partials        175      174       -1     
Impacted Files Coverage Δ
plugins/modules/mysql_role.py 78.37% <50.00%> (-1.76%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c02e46e...f141d31. Read the comment docs.

@Andersson007 Andersson007 merged commit e34cfba into stable-2 May 25, 2022
@Andersson007 Andersson007 deleted the patchback/backports/stable-2/07a72865f7ef67017e1acb3d0bf898f8273bcec0/pr-368 branch May 25, 2022 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants