Files
appwrite/app/init/resources
loks0nandClaude Fable 5 e7ff4f6b13 feat: build sites on the orchestrator (jobs-service) backend
Teaches the deployment Backend abstraction's orchestrator path about sites
and removes the transitional /v1/sites gate, so _APP_BUILDS_BACKEND covers
both resource types:

- Orchestrator::payload() branches on resource collection: buildRuntime/v5,
  site memory minimums, APPWRITE_SITE_* variables, collection-based presigned
  source URL and meta.resourceType, and a normalized subdir (./x tarball
  paths previously extracted nothing).
- Site builds emit a JSON build manifest (build.sh, open-runtimes 0.13.6+),
  read back post-job as an artifact callback; the Jobs worker joins readiness
  on exit + complete + manifest and runs SSR/static adapter detection over
  the file listing, replacing the executor's log-separator hack.
- Jobs worker finalization generalized by resourceType: activation, branch
  preview rules (shared with the Builds worker via Compute\Base), screenshots,
  latest-deployment pointer, events, and commit-status URLs.
- Sites entrypoints route through the deployments Backend: VCS redeploys use
  presigned tarballs, templates resolve wildcard tags to createFromRef,
  duplicates re-fetch remote sources, cancel goes through Backend::cancel(),
  and the sites download endpoint accepts presigned source tokens.
- Duplicate endpoints (sites + functions) set activate explicitly: the
  source deployment's flag is unset by deactivateOthers() once anything
  newer builds, so inheriting it skipped activation on repeat duplicates.
- Fixes Sites/Http/Sites/Update.php stamping resourceType 'functions' on
  site deployments via redeployVcsFunction.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 14:14:42 +01:00
..