Creating an AcmeRenewal task through x:Task/set, or a DNS task with onSuccessRenewCertificate, now clears the domain's queued renewals first. Saving a domain already does this (#290); the task API didn't. Each renewal queues the next, so a second task meant a second chain of renewals for good.
A second renewal for the same domain in one request is refused (invalidProperties), since the first one isn't written yet when the second is checked.
Part of inbuxa/inbuxa-admin#167. The console's Order again doesn't depend on this: it tells the existing task to run now (status Pending, due now) and only creates one when nothing is queued.
Tests (automation::automation_tests with Pebble, passing):
a renewal created over the API leaves one queued renewal;
two in one request: the second is refused;
a queued renewal patched to Pending now runs, finds the certificate still valid, and reschedules for when it falls due. createdAt is server-set, so the patch sends only @type and due.
Fork checks, cargo fmt --check, and clippy on the changed file are clean.
Creating an `AcmeRenewal` task through `x:Task/set`, or a DNS task with `onSuccessRenewCertificate`, now clears the domain's queued renewals first. Saving a domain already does this (#290); the task API didn't. Each renewal queues the next, so a second task meant a second chain of renewals for good.
A second renewal for the same domain in one request is refused (`invalidProperties`), since the first one isn't written yet when the second is checked.
Part of inbuxa/inbuxa-admin#167. The console's Order again doesn't depend on this: it tells the existing task to run now (status `Pending`, `due` now) and only creates one when nothing is queued.
**Tests** (`automation::automation_tests` with Pebble, passing):
- a renewal created over the API leaves one queued renewal;
- two in one request: the second is refused;
- a queued renewal patched to `Pending` now runs, finds the certificate still valid, and reschedules for when it falls due. `createdAt` is server-set, so the patch sends only `@type` and `due`.
Fork checks, `cargo fmt --check`, and clippy on the changed file are clean.
Saving a domain already clears its queued certificate renewals before
queuing a new one (#290), because each renewal queues the next and two
would keep renewing for good. Creating an AcmeRenewal task, or a DNS task
that renews the certificate after, through x:Task/set skipped that, so a
client could start a second chain. It now clears them the same way, and
refuses a second renewal for the same domain in one request.
The test also covers telling a queued renewal to run now by setting its
status to Pending, which the console's Order again uses (inbuxa-admin#167).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Creating an
AcmeRenewaltask throughx:Task/set, or a DNS task withonSuccessRenewCertificate, now clears the domain's queued renewals first. Saving a domain already does this (#290); the task API didn't. Each renewal queues the next, so a second task meant a second chain of renewals for good.A second renewal for the same domain in one request is refused (
invalidProperties), since the first one isn't written yet when the second is checked.Part of inbuxa/inbuxa-admin#167. The console's Order again doesn't depend on this: it tells the existing task to run now (status
Pending,duenow) and only creates one when nothing is queued.Tests (
automation::automation_testswith Pebble, passing):Pendingnow runs, finds the certificate still valid, and reschedules for when it falls due.createdAtis server-set, so the patch sends only@typeanddue.Fork checks,
cargo fmt --check, and clippy on the changed file are clean.