Skip to content

Fix compute domain release after function and site deletion - #13691

Closed
HarshMN2345 wants to merge 18 commits into
claude/deletes-preserve-recreated-domainfrom
codex/fix-8068-domain-release
Closed

HarshMN2345 wants to merge 18 commits into
claude/deletes-preserve-recreated-domainfrom
codex/fix-8068-domain-release

Conversation

@HarshMN2345

@HarshMN2345 HarshMN2345 commented Sep 15, 2026

Copy link
Copy Markdown
Member

Deleting a function or site currently leaves its proxy rules until the deletion worker runs. That delays domain reassignment and can make old domains appear on a resource created with the same public ID.

Remove owned rules before returning from resource deletion, matching the project, resource type, and internal resource identity. Keep the resource cleanup job queued before immediate rule removal, and defer provider/certificate cleanup using the removed rule snapshot. Routing also rejects stale or missing deployment resource identity with the existing resource-not-found response.

Fixes #8068.

This draft depends on safe deferred cleanup that preserves routing and provider configuration for a reassigned domain, and preserves any certificate still referenced by a live rule. It should be retargeted to main once that behavior is available there.

Validation:

  • Deployment, certificate, and worker-job library tests: 39 passed, 48 assertions, including 16 new deployment ownership cases.
  • Pint and Rector passed for changed files. PHPStan passed for the eight changed library/action/test files; the router file has the same pre-existing constant-false execution-retention warning at line 794 as the exact base.
  • Added API regressions for immediate release, ID reuse, reassignment, unrelated resources, redirects, and branch/generated domains, plus delayed-worker regressions for reused rule IDs and cross-project reassignment.
  • At head 83c958a019, CI Checks passed; Unit passed (1,195 tests, 6,002 assertions); General passed (42 tests, 240 assertions, 10 unrelated skips), including all four new delayed cleanup cases; Proxy passed (62 tests, 1,222 assertions, plus 12 internal tests with 105 assertions). Functions, Sites, schedules, and the other affected API suites also passed.
  • Three unrelated CI failures remain: GraphQL AvatarsTest::testGetImageFromURL receives JSON instead of an image from its external-image request; Avatars testGetImage fails in all three scopes with HTTP 404 instead of 200 for https://appwrite.io/images/open-graph/website.avif; S3 setup fails before tests because the runner cannot pull minio/minio. The draft status is retained.
  • Local Docker remains unavailable; the full API and registered deletion-worker validation above ran in CI. The local unit run passed; full platform initialization locally requires native Swoole\Http\Response.

claude and others added 18 commits September 9, 2026 12:54
The worker test drives the queue and the database directly and never
builds an HTTP client, so the response-format override read by the e2e
Scope is meaningless to it. Dropping it also keeps the workflow_dispatch
input out of this step's shell command.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MeytoiisEusFMCU44PDYav
@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown

✨ Benchmark results

Comparing claude/deletes-preserve-recreated-domain (before) → codex/fix-8068-domain-release (after).

Metric Before After Change
🚀 Requests/sec 268.42 256.04 -4.6%
⏱️ Latency P50 65.23 ms 68.1 ms +4.4%
⏱️ Latency P95 149.81 ms 160.85 ms 🔴 +7.4%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 68.1 160.85 15,960 256.04 +11.04
Account 138.63 239.96 840 14.07 +15.57
TablesDB 65.56 118.91 8,680 141.2 +3.46
Storage 63.35 136.14 4,200 70.53 +11.28
Functions 103 197.61 2,240 38.29 +18.29

Top API waits (after)

API request Max wait (ms)
functions.variables.update 392.89
account.name.update 338.08
functions.delete 316.01
storage.files.create 301.78
tablesdb.rows.create 298.93

@HarshMN2345
HarshMN2345 force-pushed the claude/deletes-preserve-recreated-domain branch from 75b6731 to 193ce56 Compare September 18, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants