FEATURE: Batch process topic bulk actions (PR #10980)

Topics are processed in chunks of 30 in order to prevent timeouts.

It shows a simple dialog while the topics are being processed.

image

GitHub

This pull request introduces 2 alerts when merging 516b3dcf440cb262e4de14a1cf2681afd0fbb32f into 516e7e392b6ec6fb023eafe79e3bf9ce1083a8c3 - view on LGTM.com

new alerts:

  • 2 for Superfluous trailing arguments

I’ve never seen this syntax before, is it a mistake? I would expect (topics) => {

Looks good! I got a little confused by the functional programming in _processChunks but it seems to check out.

This is a lot of untested code. Is there any way to add even a simple test here?

Making sure that the promises execute in sequential order gave me a headache as well. :exploding_head: I needed to do that, because otherwise the server would have to process all chunks in parallel and that’s not what we wanted.

I’ll see if I can add some kind of test.

I am happy with this change! let’s try it out, we may consider reducing chunk size if we discover issues!