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

(Bugfix) Grant privileges idempotency Fix #1466

Merged
merged 4 commits into from
Apr 13, 2022
Merged

Conversation

LukasAud
Copy link
Contributor

@LukasAud LukasAud commented Apr 12, 2022

Prior to this commit, the Ubuntu 20.04 spec testing was failing two
test cases at mysql_grant_spec. One of them was a simple mismatch
between the expected stdout and actual stdout of the test case, and the
other had to do with a misbehaviour from the module at the time of
retrieving privileges from users. In the last MySQL version, the module,
upon retrieving privileges from an user, creates and array that contains
both 'ALL' and all dynamic privileges which is later used to check for
idempotency in certain test cases, causing an error in idempotency.

This commit aims to the previously mentioned errors. The first error is
a simple 'expected message' adjust whereas for the second issue, a
temporary workaround that removes the additional dynamic privileges
so that testing does not fail.

In the future, the issue should be assessed and a fix that actually
modifies the behaviour of the module to account for such processing of
privileges should be implemented.

Prior to this commit, the Ubuntu 20.04 spec testing was failing two
test cases at mysql_grant_spec. One of them was a simple mismatch
between the expected stdout and actual stdout of the test case, and the
other had to do with a misbehaviour from the module at the time of
granting privileges to users. The module, upon instructed to grant 'ALL'
pivileges to the user, creates and array that contains both 'ALL' and
all dynamic privileges and passes that array as the parameter for
privilege granting, causing an error in idempotency.

This commit aims to the previously mentioned errors. The first error is
a simple 'expected message' adjust whereas for the second issue, a
temporary workaround that removes the duplicated dynamic privileges
reference has been implemented.

In the future, the issue should be assessed and a fix that actually
modifies the behaviour of the module to avoid such duplication should be
implemented.
@LukasAud LukasAud requested a review from a team as a code owner April 12, 2022 16:38
@LukasAud LukasAud added bugfix and removed community labels Apr 12, 2022
@LukasAud LukasAud changed the title (MAINT) Fix failing Ubuntu test cases (Bugfix) Fix failing Ubuntu test cases Apr 12, 2022
Edited a comment to describe better the issue present in the module.
Edited a comment to describe better the issue present in the module.
@LukasAud LukasAud self-assigned this Apr 13, 2022
Small modification to the comment describing the issue.
@david22swan david22swan changed the title (Bugfix) Fix failing Ubuntu test cases (Bugfix) Grant privileges idempotency Fix Apr 13, 2022
Copy link
Member

@david22swan david22swan left a comment

Choose a reason for hiding this comment

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

LGTM

@david22swan david22swan merged commit a2379f7 into main Apr 13, 2022
@david22swan david22swan deleted the maint-fix_ubuntu_testing branch April 13, 2022 13:03
@LukasAud LukasAud mentioned this pull request May 24, 2022
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.

3 participants