Support multiple users with same login name but different forges#5612
Conversation
|
Shutting down https://woodpecker-ci-woodpecker-pr-5612.surge.sh |
|
PS: we have a simmilar problem if a organisation is renamed ... |
|
PS: PS: I'll address the test errors tomorow ... but the constrain should be here now ... as we use it as key for users now |
|
code lgtm |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5612 +/- ##
==========================================
- Coverage 21.31% 21.30% -0.01%
==========================================
Files 420 420
Lines 38080 38163 +83
==========================================
+ Hits 8116 8130 +14
- Misses 29211 29280 +69
Partials 753 753 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@anbraten I fixed more multi-user forge stuff you might review again :) |
|
@anbraten could you write lgtm or deny again :) I know review dont work on own pulls 😓 |
|
I dont like to introduce new cli flags using id's. Thats weird to use not human friendly and should be avoided. |
|
then I'll remove that cli change part for now |
|
@xoxys did remove the cli patch |
|
See my comments in the chat. |
xoxys
left a comment
There was a problem hiding this comment.
Code LGMT, but hard to test locally. My personal preference would be an rc-release first, or release 3.11 without this change, and merge it after the release to get it battle-tested using the next tag.
anbraten
left a comment
There was a problem hiding this comment.
would keep the changes to the actual fix and a minimum as those areas apis are quite part of the core and therefore critical
|
ugh ... I can strip it out 😓 |
|
well thanks 😅 I still was going to split it out but that makes it way easyer for me :) |
|
As we have done the release without this PR, need to overcomplicate things IMO. Just keep in mind if we have to revert partially this needs to be done manually. If I misunderstood out discussion in the chat and overruled you @anbraten, sorry for that, this was not on purpose. |
|
no problem :) just ping me if there is an issue with this exact patch |
|
created snapshot and deployed on our own ci ... |
Currently we just lookup the user by it's login name.
If you have the same name on multible forges connected to Woodpecker, on login the repos randomly change the user of one forge to another witch then potentially sets the user of a different forge as the repo as repo owner ...
... other strange things can happen too ...
this changes it to have the forgeRemoteID be the primary way to lookup users inside the database...