Rank 1: Thread
Environment: Appwrite Cloud (Region: sfo / Edge Network *.appwrite.network)
Component: Functions (Git / VCS deployment)
Description
When connecting a Git repository to a Function, if the very first deployment fails during build/compilation, the auto-generated branch domain (e.g. <hash>.appwrite.network, Type: Deployed from main) remains permanently broken on 404 router_rule_not_found, even after subsequent deployments succeed and are marked Active.
Steps to Reproduce:
- Create an Appwrite function connected to a Git repository.
- Push a commit that fails to build (e.g. missing dependency or build error).
- Notice that Appwrite creates an initial domain in the Domains tab (e.g.
<hash>.appwrite.networkmarked asVerified). - Fix the code and push a new commit. The build succeeds and the deployment becomes Active.
- Test the function internally via the Executions tab ("Execute now") -> Returns
200 OK. - Visit the original auto-generated domain -> Still returns
404 router_rule_not_foundwith headerx-edge-rule-cache: miss. - Add a new domain via + Add domain -> Immediately returns
200 OKwithx-edge-rule-cache: hit.
Expected Behavior:
When a new Git deployment succeeds and is marked Active, any existing auto-generated Git branch domain (Deployed from main) should automatically rebind to the active deployment and provision the edge routing rule, rather than remaining orphaned to the initial failed build.
Headers Comparison:
-
Original domain (stuck):
HTTP/2 404
x-edge-rule-cache: miss
{"type":"router_rule_not_found","message":"This page is empty, but you can make it yours.","code":404} -
Newly created domain (working):
HTTP/2 200 OK
x-edge-rule-cache: hit
x-edge-runtime-cache: hit
x-appwrite-deployment-id: <active-id>