Deleting a domain removes its DKIM management, DNS management and certificate renewal tasks, instead of leaving them to fail.
Automatic to manual (DKIM, DNS or certificate management) removes the matching queued task in the same save.
Queuing a DKIM task removes the domain's queued one first, so manual then automatic leaves one, not two. This is the same rule a new renewal already follows (#290).
A task whose domain is gone, or no longer manages that part itself, now ends quietly (TaskResult::Ignored) instead of as Failed. Installs that already have stale tasks clear them on their next run.
clear_queued_renewals is now one case of clear_queued_domain_tasks (domain_check.rs). A task running at that moment is left alone, as before.
Tests: a new domain_tasks_follow_settings_test in tests/src/automation/dkim.rs checks manual (0 tasks), automatic again (1), a changed second save (1) and a deleted domain (0, and no DNS task).
Checked locally: cargo check -p jmap -p services -p tests --tests, cargo fmt --check, and the automation suite's DKIM part, which all passes. The ACME part can't run on this workstation yet: its firewall doesn't let the Pebble container reach the test listener. Unchanged main fails at the same line, and so does the DNS part, which needs ACME's certificates for its TLSA records. I'll rerun the whole suite once the rule is in.
Fixes #327.
- **Deleting a domain** removes its DKIM management, DNS management and certificate renewal tasks, instead of leaving them to fail.
- **Automatic to manual** (DKIM, DNS or certificate management) removes the matching queued task in the same save.
- **Queuing a DKIM task** removes the domain's queued one first, so manual then automatic leaves one, not two. This is the same rule a new renewal already follows (#290).
- **A task whose domain is gone, or no longer manages that part itself**, now ends quietly (`TaskResult::Ignored`) instead of as Failed. Installs that already have stale tasks clear them on their next run.
`clear_queued_renewals` is now one case of `clear_queued_domain_tasks` (`domain_check.rs`). A task running at that moment is left alone, as before.
Tests: a new `domain_tasks_follow_settings_test` in `tests/src/automation/dkim.rs` checks manual (0 tasks), automatic again (1), a changed second save (1) and a deleted domain (0, and no DNS task).
Checked locally: `cargo check -p jmap -p services -p tests --tests`, `cargo fmt --check`, and the automation suite's DKIM part, which all passes. The ACME part can't run on this workstation yet: its firewall doesn't let the Pebble container reach the test listener. Unchanged main fails at the same line, and so does the DNS part, which needs ACME's certificates for its TLSA records. I'll rerun the whole suite once the rule is in.
A domain's DKIM, DNS and certificate renewal tasks were left behind:
- Deleting the domain left them queued. When they ran they ended as
Failed ("Domain not found"), and stayed in the task list.
- Setting DKIM key management to manual left the rotation task, which
later failed with "not set to automatic".
- Setting it back to automatic queued a new DKIM task beside the old
one, so the domain had two.
Now:
- Deleting a domain removes its DKIM management, DNS management and
certificate renewal tasks.
- A save that turns DKIM, DNS or certificate management from automatic
to manual removes the matching task.
- A save that queues a DKIM task removes the domain's queued one first,
the way a new renewal already replaces the queued one (#290).
- A task whose domain is gone, or no longer manages that part itself,
ends quietly instead of as Failed, so installs that already have
stale tasks clear them on their next run.
clear_queued_renewals is now one case of clear_queued_domain_tasks. A
task that's running at that moment is left alone, as before.
The DKIM automation test checks that manual removes the task, automatic
again leaves one, a second save still leaves one, and deleting the
domain leaves none. Reported on the forum (t/232, posts 8 and 9).
With the workstation firewall rule now in place, the whole automation suite passes locally on RocksDB (automation::automation_tests: ACME, DKIM including the new task lifecycle test, DNS and RFC 2136; 1 passed, 104 s).
With the workstation firewall rule now in place, the whole automation suite passes locally on RocksDB (`automation::automation_tests`: ACME, DKIM including the new task lifecycle test, DNS and RFC 2136; 1 passed, 104 s).
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.
Fixes #327.
TaskResult::Ignored) instead of as Failed. Installs that already have stale tasks clear them on their next run.clear_queued_renewalsis now one case ofclear_queued_domain_tasks(domain_check.rs). A task running at that moment is left alone, as before.Tests: a new
domain_tasks_follow_settings_testintests/src/automation/dkim.rschecks manual (0 tasks), automatic again (1), a changed second save (1) and a deleted domain (0, and no DNS task).Checked locally:
cargo check -p jmap -p services -p tests --tests,cargo fmt --check, and the automation suite's DKIM part, which all passes. The ACME part can't run on this workstation yet: its firewall doesn't let the Pebble container reach the test listener. Unchanged main fails at the same line, and so does the DNS part, which needs ACME's certificates for its TLSA records. I'll rerun the whole suite once the rule is in.A domain's DKIM, DNS and certificate renewal tasks were left behind: - Deleting the domain left them queued. When they ran they ended as Failed ("Domain not found"), and stayed in the task list. - Setting DKIM key management to manual left the rotation task, which later failed with "not set to automatic". - Setting it back to automatic queued a new DKIM task beside the old one, so the domain had two. Now: - Deleting a domain removes its DKIM management, DNS management and certificate renewal tasks. - A save that turns DKIM, DNS or certificate management from automatic to manual removes the matching task. - A save that queues a DKIM task removes the domain's queued one first, the way a new renewal already replaces the queued one (#290). - A task whose domain is gone, or no longer manages that part itself, ends quietly instead of as Failed, so installs that already have stale tasks clear them on their next run. clear_queued_renewals is now one case of clear_queued_domain_tasks. A task that's running at that moment is left alone, as before. The DKIM automation test checks that manual removes the task, automatic again leaves one, a second save still leaves one, and deleting the domain leaves none. Reported on the forum (t/232, posts 8 and 9).With the workstation firewall rule now in place, the whole automation suite passes locally on RocksDB (
automation::automation_tests: ACME, DKIM including the new task lifecycle test, DNS and RFC 2136; 1 passed, 104 s).