zonemaster / zonemaster-backend

The Zonemaster Backend - part of the Zonemaster project
Other
14 stars 23 forks source link

Remove multiple batch restriction #1118

Closed matsduf closed 1 year ago

matsduf commented 1 year ago

Purpose

There is an artificial restriction on multiple concurrent batches with the same user, i.e. the second batch cannot be created until the first has completed. It does not give any protection on overload since a batch user can create batch with a million zones, but not two concurrent batches with 1000 each. There can be good reasons to create multiple batches if the different batches should use profile or different settings.

This PR removes the restriction. It also adjusts the unit test.

The documentation is updated in https://github.com/zonemaster/zonemaster/pull/1178

How to test this PR

Before this PR try with the following two commands, and the second will be refused (assuming batch is accepted and USER is a batch user with API key KEY):

zmb add_batch_job --username USER --api-key KEY --domain iis.se --domain arpa --domain com --domain info --domain se

Then repeat after this PR has been applied.

marc-vanderwal commented 11 months ago

Release testing report – No issues found

Rocky Linux 9.3 + PostgreSQL 13.11

Running the same zmb add_batch_job command as in the testing procedure (modified to match the user and API key configured on my test VM) about 3 seconds apart causes two batches to be created without error.