-
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
Update check_password function for newer RabbitMQ versions. #56193
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bring fork up to date
Newer versions of RabbitMQ have a differing output to older versions that breaks the search regex in the check_password function. This caused rabbitmq_user states to fail. This adds a check for the new status output as well, so the function will work for all versions of RabbitMQ.
ghost
requested a review
from xeacott
February 18, 2020 21:29
DmitryKuzmenko
previously approved these changes
Apr 6, 2020
DmitryKuzmenko
added
the
Needs-Testcase
PR needs test cases written, or the issue is about a bug/feature that needs test cases
label
Apr 6, 2020
@11chrisadams11 Could you please add a test case for it? |
Add unit tests to verify older and newer versions of RabbitMQ are both working.
@DmitryKuzmenko Added test cases for the different versions. |
DmitryKuzmenko
approved these changes
Apr 10, 2020
Perfect! Thank you for updating this with tests. I've blackened the code now tests should be green. Let's wait for ci. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Needs-Testcase
PR needs test cases written, or the issue is about a bug/feature that needs test cases
ZRelease-Sodium
retired label
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Newer versions of RabbitMQ have a differing output to older versions that breaks the search regex in the check_password function. This caused rabbitmq_user states to fail. This PR adds a check for the new status output as well, so the function will work for all versions of RabbitMQ.
What issues does this PR fix or reference?
Follow up to #33588
Fixes issues #56258 & #55376
Previous Behavior
The check_password function would only search the regex against the status output of older versions of RabbitMQ, which would cause errors on newer versions of RabbitMQ.
New Behavior
The check_password function will now search for the regex of the status output for both new and old versions of RabbitMQ.
Tests written?
Yes
Commits signed with GPG?
No