-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 duplicated UUID migration issue #30981
Conversation
occ command looks good to me now, I tested simple cases where one uuid is wrong, or giving it a non-mapped dn to test the error. Should be tested some more. |
Testing the migration with duplicated UUIDs give me:
|
Added the checkup warning and did some basic testing with the occ command, which was working as expected. Minor annoyance: we have no means to clean up (i.e. remove) old gone groups. That's not a blocker and can be worked around with custom instructions if necessary. |
7bc9118
to
3e72b4e
Compare
Rebased and squashed the fixups. My testing was successful so far. |
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 flew over the code and didn't find anything notable apart from my minor comments.
I hope others can chime in to review the more complex code more in detail,
use Symfony\Component\Console\Output\OutputInterface; | ||
use function sprintf; | ||
|
||
class UuidUpdateReport { |
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.
two classes per file, is that still legal or not recommended ?
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.
Legal it is. I believe it is also not the sole case in our code bases, but given, I would not know for certain where to look at first. It is an internal helper class that just contains public properties, in order to not use an arbitrary array with with arbitrary keys.
last fixups were to fix unit tests |
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.
👍
there's a DCO error though
/backport to stable23 |
/backport to stable22 |
/backport to stable21 |
/backport to stable20 |
Since mails and notifications are only available for actions of other users it does not make sense to allow changing this. It also prevents the common misunderstanding with "file was changed inside a favorited folder" Signed-off-by: Joas Schilling <coding@schilljs.com>
down to 20 because the original fix was put there as well... |
Signed-off-by: Joas Schilling <coding@schilljs.com>
- in a proper setup there are no duplicated UUIDs - not all setups are proper - log warning to admin Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
- to heal incomplete states from broken upgrades Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Generators cannot be iterated with while or returned by an other generator, using foreach instead. And a few other problems. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
47c3da0
to
b28aa52
Compare
The backport to stable23 failed. Please do this backport manually. |
The backport to stable22 failed. Please do this backport manually. |
The backport to stable21 failed. Please do this backport manually. |
The backport to stable20 failed. Please do this backport manually. |
Command is not documented in admin manual 😿 |
solves #30936
strategy based on #30936 (comment)
¹ could be a manually triggerable repair step, but it would run once, be less flexible and this way it MAY be also easier for some LDAP server migration scenarios when an update was needed anyways (but only works of DN stays identical).