Allow Admin API delete room v2 actions to be run on worker #17904
+62
−30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As the title states - support shifting the admin api delete room v2 actions to a generic worker. Also adds support for testing this in complement. The hope is to move other admin actions to be available on a worker in follow-up PRs.
I'm new to working with workers, so there may be things that I have missed/done ineptly. Eagle eyes appreciated. In particular, one question I had was whether a worker handling these admin requests needs a replication listener - since the code requires invalidating the cache and streaming, I guessed that the answer is yes, but would like to know if that is correct.
Complement test for this is at matrix-org/complement@main...H-Shay:complement:shay/admin_tests. I didn't open a PR with this as it is unclear to me if this test belongs in the Complement repo - opinions welcome. FWIW since I have to push to a fork the test here isn't run against this PR anyway, although I can say it runs locally.
Should be reviewable commit-by-commit.