woodpecker-ci / woodpecker

Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
4.3k stars 371 forks source link

Add migration to autofix corrupted users.org_id entrys in db #4307

Closed 6543 closed 2 weeks ago

6543 commented 2 weeks ago

No idea why the corrupt entrys did exist ... we might should dig into the reason.

anyway it only happens on very old accounts and I did the migrations mannually at codeberg and now at kithara.

so we clearly should run it to catch potential hick-ups ...

6543 commented 2 weeks ago

might be an regression of #2126

zc-devs commented 2 weeks ago

Perhaps, related #3328

6543 commented 2 weeks ago

symptoms: you get just weard behaviour and some functions 'randomly' dont work ..

deleting all of that ward user related stuff (in db) and recreate the user by log in newly do fix it.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 68.96552% with 9 lines in your changes missing coverage. Please review.

Project coverage is 26.54%. Comparing base (b0f52b9) to head (6cd6b54). Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
...re/datastore/migration/018_fix-orgs-users-match.go 68.96% 8 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #4307 +/- ## ========================================== + Coverage 26.52% 26.54% +0.01% ========================================== Files 377 379 +2 Lines 27448 27525 +77 ========================================== + Hits 7281 7306 +25 - Misses 19503 19553 +50 - Partials 664 666 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pat-s commented 2 weeks ago

it only happens on very old accounts

Define "very old" - if it happened on v1 -> v2, I'd not use that adjective here.

Also: #3319 -> can likely be closed then. Great that there is a fix now for this, a bit sad that it took almost a year. However I am not sure whether you discovered this "just recently" or were actually aware of it the whole time but it simply wasn't important enough (?).

anyway it only happens on very old accounts and I did the migrations mannually at codeberg and now at kithara.

Hmm, just for the protocol, I did 20-30 manual corrections at CB throughout this time and was also solely commenting to user requests. Not sure which one you're referring to specifically but unless you did some in the recent days, this sounds a bit unfortunate.

6543 commented 2 weeks ago

but unless you did some in the recent days,

On monday to be exact

6543 commented 2 weeks ago

-> #4327

woodpecker-bot commented 2 weeks ago

Tearing down https://woodpecker-ci-woodpecker-pr-4307.surge.sh