Skip to content

Commit

Permalink
fix: delete proxy records immediately if in the waiting or erroring s…
Browse files Browse the repository at this point in the history
…tates (#22325)

* delete proxy records immediately if in the waiting or erroring states

* show "Live" instead of "Valid" as final status

* Update UI snapshots for `chromium` (1)

* fix syntax

* Update UI snapshots for `chromium` (1)

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
frankh and github-actions[bot] committed May 16, 2024
1 parent 7e65fd9 commit 4ddae62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/scenes/settings/project/Proxy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function Proxy(): JSX.Element {
)}
>
{status === 'issuing' && <Spinner />}
<span className="capitalize">{status}</span>
<span className="capitalize">{status === 'valid' ? 'live' : status}</span>
{status === 'waiting' && (
<Tooltip title="Waiting for DNS records to be created">
<IconInfo className="cursor-pointer" />
Expand Down
4 changes: 3 additions & 1 deletion posthog/api/proxy_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ def destroy(self, request, *args, pk=None, **kwargs):
queryset = self.organization.proxy_records.order_by("-created_at")
record = queryset.get(id=pk)

if record:
if record and record.status in (ProxyRecord.Status.WAITING, ProxyRecord.Status.ERRORING):
record.delete()
elif record:
record.status = ProxyRecord.Status.DELETING
record.save()

Expand Down

0 comments on commit 4ddae62

Please sign in to comment.