Repository navigation
fix(certificates): retry every provider failure once DNS has passed - #14117
Conversation
The retry flag was only raised once the provider had returned an order, so the renew check that opens every requeued job, and every forced job, still failed the rule on a single transient provider error. Raise it for delayed providers as soon as DNS has passed. Instant providers and DNS failures stay terminal, as before. A manual retry now also resets the certificate's attempts, as enabling a webhook does, so it gets the full five attempts again.
🟢 Tier S · Ready to merge
The worker now marks delayed-provider failures as retryable immediately after DNS validation passes or is skipped, including renewal checks and forced issuance. Manual retries also reset the associated certificate’s attempt counter along with its logs.
📂 Walkthrough · 2
Reviewed |
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
63fe8a3 to
304cf08
Compare
|
Generated by Claude Code |
Merges main a2cca78 (#14009, #14106, #14117, #14115, #14119, #14114, #14101, #14125, #14129, #14127) so cloud#5410 can require a train head that contains main at or after 0ed7232. Conflicts: none. Database 8.0 port: none needed. Main's new code only uses Document getAttribute/setAttribute and Query::equal/lessThan/orderAsc/limit (Tasks/Interval.php), all unchanged in database 8.0; no removed Database::* constants, config collections, or model magic reads. composer.json and composer.lock are untouched by main, so the train's database and migration pins stay as they are. Co-Authored-By: Claude Opus 5.5 <[email protected]>
What does this PR do?
Follow-up to #14009. That PR keeps a delayed provider's failures retryable for up to five attempts, but the flag that makes them retryable was only raised once the provider had returned an order. Three paths still failed the rule on a single transient error:
isRenewRequired(), which for Fastly calls the API. One 5xx there moved the rule tounverifiedand mailed the security address, with no attempt kept.skipRenewCheck, used by thessltask and the main domain's automatic certificate). The flag was raised only afterissueCertificate(), so an error inside it was terminal.This PR raises the flag for delayed providers as soon as DNS has passed (or was skipped), before any provider call. Instant providers (Let's Encrypt, Cloudflare) and DNS failures stay terminal, as on
main. The retry endpoint now also resets the certificate'sattempts, the same way enabling a webhook resets its own (Webhooks/Http/Webhooks/Update.php).Test Plan
No new automated test. Workers are covered through e2e, and e2e only runs Let's Encrypt, which is instant, so it never takes this path. The existing
CertificatesDomainValidationTestcases keep their asserted outcomes; I traced each one through the new flow.Locally:
php -land Pint on both files. PHPStan and unit tests run in CI.To verify on an environment with a delayed provider:
attempts: 1, with no mail sent.Related PRs and Issues
Checklist
Generated by Claude Code