Harden cert provisioning failure and write-back
Rate limits no longer inflate ssl_retry_count into an instant FAILED path. Centralize outcomes in decideProvisioningOutcome, keep ACME order state on transient and rate-limit errors, bound each Process tick with a timeout, and block on FOR UPDATE when persisting a freshly issued certificate. Signed-off-by: Ludovic Vielle <ludovic@probo.com> Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
// SOFTWARE.
|
||||
|
||||
import {
|
||||
getCertificateProvisioningErrorMessage,
|
||||
getCustomDomainStatusBadgeLabel,
|
||||
getCustomDomainStatusBadgeVariant,
|
||||
} from "@probo/helpers";
|
||||
@@ -55,7 +56,10 @@ export function CompliancePageDomainCard(props: {
|
||||
|
||||
const domain = useFragment<CompliancePageDomainCardFragment$key>(fragment, fKey);
|
||||
const sslStatus = domain.certificate?.status ?? "PENDING";
|
||||
const provisioningError = domain.certificate?.provisioningError;
|
||||
const provisioningErrorMessage = getCertificateProvisioningErrorMessage(
|
||||
domain.certificate?.provisioningError,
|
||||
__,
|
||||
);
|
||||
|
||||
return (
|
||||
<Card padded>
|
||||
@@ -73,8 +77,8 @@ export function CompliancePageDomainCard(props: {
|
||||
<p className="text-sm text-txt-secondary">
|
||||
{sslStatus === "ACTIVE"
|
||||
? __("Verified and serving traffic")
|
||||
: provisioningError
|
||||
? provisioningError
|
||||
: provisioningErrorMessage
|
||||
? provisioningErrorMessage
|
||||
: __("Pending DNS verification")}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
// SOFTWARE.
|
||||
|
||||
import {
|
||||
getCertificateProvisioningErrorMessage,
|
||||
getCustomDomainStatusBadgeLabel,
|
||||
getCustomDomainStatusBadgeVariant,
|
||||
} from "@probo/helpers";
|
||||
@@ -76,7 +77,10 @@ export function CompliancePageDomainDialog(props: CompliancePageDomainDialogProp
|
||||
const domain = useFragment<CompliancePageDomainDialogFragment$key>(fragment, fKey);
|
||||
const sslStatus = domain.certificate?.status ?? "PENDING";
|
||||
const expiresAt = domain.certificate?.expiresAt;
|
||||
const provisioningError = domain.certificate?.provisioningError;
|
||||
const provisioningErrorMessage = getCertificateProvisioningErrorMessage(
|
||||
domain.certificate?.provisioningError,
|
||||
__,
|
||||
);
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
@@ -127,10 +131,10 @@ export function CompliancePageDomainDialog(props: CompliancePageDomainDialogProp
|
||||
)
|
||||
: (
|
||||
<div>
|
||||
{provisioningError && (
|
||||
{provisioningErrorMessage && (
|
||||
<div className="bg-danger-subtle text-danger rounded-lg p-4 mb-4">
|
||||
<p className="text-sm font-medium mb-1">{__("Provisioning error")}</p>
|
||||
<p className="text-sm">{provisioningError}</p>
|
||||
<p className="text-sm">{provisioningErrorMessage}</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user