Tim Möhlmann e670b9126c
fix(permissions): chunked synchronization of role permission events (#9403)
# Which Problems Are Solved

Setup fails to push all role permission events when running Zitadel with
CockroachDB. `TransactionRetryError`s were visible in logs which finally
times out the setup job with `timeout: context deadline exceeded`

# How the Problems Are Solved

As suggested in the [Cockroach documentation](timeout: context deadline
exceeded), _"break down larger transactions"_. The commands to be pushed
for the role permissions are chunked in 50 events per push. This
chunking is only done with CockroachDB.

# Additional Changes

- gci run fixed some unrelated imports
- access to `command.Commands` for the setup job, so we can reuse the
sync logic.

# Additional Context

Closes #9293

---------

Co-authored-by: Silvan <27845747+adlerhurst@users.noreply.github.com>
2025-02-26 16:06:50 +00:00
..
2024-11-04 10:44:51 +00:00
2024-09-11 10:53:55 +00:00
2024-04-11 09:16:10 +02:00
2024-01-17 10:16:48 +00:00
2024-01-17 10:16:48 +00:00
2022-11-30 17:01:17 +01:00
2022-04-26 23:01:45 +00:00
2025-02-11 18:09:50 +00:00
2024-09-11 10:53:55 +00:00