-
Notifications
You must be signed in to change notification settings - Fork 88
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
login tracking [Temporarily frozen] #62
base: main
Are you sure you want to change the base?
login tracking [Temporarily frozen] #62
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #62 +/- ##
===========================================
- Coverage 75.07% 15.64% -59.43%
===========================================
Files 12 8 -4
Lines 1645 1016 -629
Branches 423 246 -177
===========================================
- Hits 1235 159 -1076
- Misses 267 854 +587
+ Partials 143 3 -140 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jorge-Rodriguez it looks very good! I'll try to make time to review ASAP. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jorge-Rodriguez in general LGTM, thanks very much for doing this!
@martinwalle could you please take a look? If you don't know python much, could you look, at least, at @bmildren @bmalynovytch could you also please take a look? |
Hello @Andersson007 , I read the tests and the arguments is good for me. Sincerely, |
Just need to add the conditional assertions for versions that do not support this feature |
Hey @martinwalle ! |
@Andersson007 @martinwalle only test fixes are missing, the functional code is ready for manual testing. |
@Jorge-Rodriguez thanks for the information! Would be happy to review once the tests are green |
@Jorge-Rodriguez @Andersson007
All is fine. It is working as expected. |
@martinwalle thanks for testing! Sorry for the delayed response, I've been waiting for Jorge's feedback. |
Sorry everyone. it's been truly hectic lately and I haven't found time to fix the tests. Cheers |
The rework needed for these tests is tangentially related to #91 so I'm looking that here as a reminder that however we decide to handle that will probably affect and require a refactor of this. |
Co-authored-by: Andrew Klychkov <[email protected]>
@Jorge-Rodriguez thanks for your effort! |
One branch won't be reached until we introduce MariaDB integration tests, other issues have me puzzled because I'd swear they should be covered. I'm thinking of tackling that major MySQL/MariaDB refactor next. It makes sense to me to handle that before introducing more bug fixes in the codebase, though I'd appreciate a thumbs up on that from @bmalynovytch as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jorge-Rodriguez thanks for the great work!
I found one typo in the fragment and there's the user_password_update_test.yml
file - I don't see where it's included, could you please point out if i missed it?
@@ -0,0 +1,2 @@ | |||
minor_changes: | |||
- mysql_user - add the ``account_locking`` option sot support login attempt tracking and account locking feature (https://github.com/ansible-collections/community.mysql/issues/49). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- mysql_user - add the ``account_locking`` option sot support login attempt tracking and account locking feature (https://github.com/ansible-collections/community.mysql/issues/49). | |
- mysql_user - add the ``account_locking`` option to support login attempt tracking and account locking feature (https://github.com/ansible-collections/community.mysql/issues/49). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the coverage looks very good
Thumbs up ! 👍 👍 👍 |
@Jorge-Rodriguez should I wait for this PR merged or I can release |
@Andersson007 if you give me a day or two, I'll get those two issues you spotted ready and we can merge. |
@Jorge-Rodriguez ok, no problem, take your time! I'd release it on Sanday |
@Jorge-Rodriguez thank you for the great and regular contribution! You did and are doing really a lot! As a gesture of trust, we're happy to give you I personally found the following rule essential: "Don't merge your PRs" and everything will be fine;) If you have any questions, feel free to ask me directly via aaklychkov at mail dot ru (and I'd be happy to have your email to contact you if really needed). If you don't like to have this priviledge, please, let me know. Thanks for the great contribution!:) |
@Andersson007 It's a privilege and proud moment for me to receive the I'll be sure to take the Guidelines to heart and use the privilege responsibly. Many thanks. |
@Andersson007 The password update tests show that I might have broken something in the Cheers! |
It's a pleasure to work with you, thanks!
Take your time, I'll release the collection on Sunday and then again once you complete the PR, thanks! |
@Jorge-Rodriguez I've just surprisingly found out that there's nothing new to release since 1.2.0:)) |
I just found out that the reason the tests fail is unrelated to this feature and it has to do with the As it turns out, if a user is granted
The current privilege check is an execution of the SQL statement:
As such, the set of all privileges and the set containing the This is an idempotence problem. @bmalynovytch @bmildren @Andersson007, I think this is related to #89, we're not currently working on this bug and I'd appreciate your input in prioritizing that bugfix, this PR and issue #101 which are all somewhat related. |
@Jorge-Rodriguez if CI fails again and it's unrelated, feel free to comment the problem spot in the tests. Please also put the link to the idempotency issue there and something like When CI is green, I'd be happy to make a final review. |
|
The assertion for this task fails
Maybe it already exists. Try to remove it before this invocation as well |
I just looked at one. Maybe there are other assertions fail including that one as you mentioned. |
<<: *mysql_params | ||
name: '{{ user_name_1 }}' | ||
password: '{{ user_password_1 }}' | ||
priv: '*.*:ALL' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't wait the responce too much, it's quite inefficient at least for the last 6 months.
I think Ben probably doesn't know the answer anyway (if you look at git blame and see Ben there- he moved the stuff from community.general to this repo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Ben probably doesn't know the answer anyway (if you look at git blame and see Ben there- he moved the stuff from community.general to this repo)
That already kind of gives me the answer I needed. My guess is this particular set of tests were moved here from community.general where they had already been forgotten. I re-added them on this PR as per your comment and they got hit by issue #77.
I do not think we need the privileges option for this particular battery of tests to verify what it's supposed to check so I'm going to go ahead and remove those lines. Then I'll see if there are any further failing tests and what can be done about them if so.
@Andersson007 I'll request your review again once the test dance is done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jorge-Rodriguez sounds good, thanks!
While I completely agree the need of this PR, I think it should be done after we handled MySQL / MariaDB differences (#103) , as this only introduces changes related to MySQL and it will require heavy rewrite after splitting MySQL / MariaDB code base. |
@Jorge-Rodriguez as your Handle differences PR was merged, will you be able to finish this one? |
@Andersson007 yeah, I'll take this. |
SUMMARY
Introduce support for MySQL >= 8.0.19 failed login tracking and account locking
Fixes #49
ISSUE TYPE
COMPONENT NAME
mysql_user