-
Notifications
You must be signed in to change notification settings - Fork 87
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
fix(members): ensure group and project users are case-insensitive #556
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #556 +/- ##
==========================================
+ Coverage 78.62% 78.69% +0.06%
==========================================
Files 70 70
Lines 2699 2703 +4
==========================================
+ Hits 2122 2127 +5
+ Misses 577 576 -1
|
3ea6d45
to
872ac5f
Compare
872ac5f
to
50fb846
Compare
50fb846
to
5f66358
Compare
Hey @J4Numbers, thank you for your contribution! And sorry for the CI problem, I noticed that there are HTTP 401 thrown. That's strange because it works for me locally. :/ I will try to troubleshoot it over the next few days. |
Ok, now it seems to be failing on something related to your code, @J4Numbers:
Can you check it out please? |
Thanks for kicking it off! Full error is below:
This might be a bit of trial and error since I can't test the premium items locally... |
This is fixed now.
|
Thanks for picking up the missed import!
Guessing something got cut off here. But it does look like there's a race condition or some test overlap in this somewhere (with the odd failure between different python versions). Want me to raise an issue for it? |
This may be caused by the fact that many tests depend on each other, see #561 (review) for more info. |
Fair enough. Let me know if you need me to do anything else! |
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.
Unsure why there's a gitlab premium related test case. I think it doesn't belong there.
e5c5be8
to
d0600a0
Compare
d0600a0
to
7eaaf3b
Compare
@J4Numbers - Pushed the latest update to your branch. Noticed a test failure from one of your test case. https://github.com/gitlabform/gitlabform/actions/runs/5767054764/job/15636113972?pr=556 Is this an intermittent test failure? If yes, would you be able to look into the test setup? It'd be good to have it fixed if possible as intermittent failures take away too much time in processing other PRs. Hopefully we can merge this PR soon. |
@J4Numbers - Did you get a chance to look at the test failure mentioned above? |
Ah, sorry. I started looking into it, but then real life got in the way slightly. From what I can tell, a lot of the code should be pretty segregated due to the random group creation that the tests are separated between (something similar to I can keep looking into it if required, but the base logic for generating random groups/projects/users/etc. seems sound (though the reliance on randomness is eh), which makes me suspect that it might be something to do with the fixtures holding state when they shouldn't... |
38f3af3
to
3568f24
Compare
3568f24
to
e27878f
Compare
e27878f
to
2bbd68f
Compare
So, as far as I can tell, separating the two project member tests into their own fixtures seems to have resolved my issue. And this run seems to have rolled a lucky six so far in terms of pipelines behaving... I did notice one other intermittent failure, which was regarding a branch protection test. (See: https://github.com/gitlabform/gitlabform/actions/runs/6031288955/job/16364708681) |
Hey @J4Numbers . Completely understandable. Hope all is well. Thanks for continuing with this PR. Really appreciate it 🙏 . |
First of all, thanks for making it more reliable. I'm not an expert at this but think you're on the right path. Looks like you've split your original tests into 2 separate test class (i.e. I believe what was happening before is that the tests were in the same class. Both tests were using the It would probably be nice if those tests were in the same class. Reduce some duplication and logically grouped; might be easier to maintain. @gdubicki - Would you be able to do another review, please? |
Yeah, I noticed it a few times too. It's annoying 😄 . |
2bbd68f
to
4d23416
Compare
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.
LGTM, thank you for the contribution @J4Numbers!
although they should not be, as in GitLab they are not. (You cannot have 2 users in a GitLab instances for which the username differs only in the case.) Reported in gitlabform#466
Meddle with group and project membership checks to ensure that usernames are case insensitive. This change ensures that users are not added again by mistake, causing an error where a given user already exists within the repository. Signed-off-by: Jayne Doe <jayne.doe@ibm.com>
Signed-off-by: Jayne Doe <jayne.doe@ibm.com>
4d23416
to
002bad8
Compare
Meddle with group and project membership checks to ensure that
usernames are case-insensitive. This change ensures that users
are not added again by mistake, causing an error where a given
user already exists within the repository.