Skip to content

feat: report self-hosted installs to cloud's installations endpoint - #13917

Merged
ChiragAgg5k merged 4 commits into
mainfrom
feat/installer-cloud-installations
Sep 26, 2026
Merged

ChiragAgg5k merged 4 commits into
mainfrom
feat/installer-cloud-installations

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Moves the self-hosted installer's usage report off the growth server (https://growth.appwrite.io/v1/analytics) and onto cloud's installations endpoint, POST https://cloud.appwrite.io/v1/growth/installations, which is already live in production.

  • Install::track() posts to INSTALLATIONS_URL with Content-Type: application/json and X-Appwrite-Project: console. No auth is needed, and the endpoint returns 204. It is rate limited to 10/hour per domain and per IP.
  • Report::payload() now returns the endpoint's flat params: name, email, version, domain, database, hostIp (previously ip), userAgent, os, arch, cpus and ram. ram was already in MB (MemTotal kB / 1024), so no conversion was needed. Null or empty values are left out because every param is optional and email must be a valid address when present. The old growth-only fields (action, account, url, category, label, JSON-encoded data) and their constants are gone.
  • The new Report::sendable() keeps growth's filtering on the client. It only sends install actions, and only when version, domain and database are all set, which matches what cloud stores.
  • Nothing else changes: DO_NOT_TRACK, production and local-checkout gating, the 5s connect and request timeouts, swallowed errors, and the Appwrite-Installer/<ver> (...) User-Agent header. The User-Agent is also sent as the userAgent param.
  • Removed VITE_GROWTH_ENDPOINT from the console service in docker-compose.yml. A separate PR is migrating the console (vibes) off VITE_GROWTH_ENDPOINT, so this env var is dead once that lands.
  • Removed the VITE_APPWRITE_GROWTH_ENDPOINT build arg from .github/workflows/publish.yml. The Dockerfile never declares it, so it was already a no-op.

After this PR there are no growth.appwrite.io references left in the repo.

Upgrades

Growth only forwarded self-hosted install actions, and this PR keeps that. Upgrades would be worth sending too, as a signal for which versions self-hosters actually run. That needs the cloud endpoint to record an action (or to upsert on domain) so that an upgrade doesn't look like a new install, so I've left it for a follow-up.

Test Plan

  • No new unit tests. vendor/bin/phpunit tests/unit/Platform/Modules/Installer passes (175 tests), and Pint and PHPStan pass on the changed files.
  • The endpoint was verified on staging (cloud 1.50.101 code): an unauthenticated POST /v1/growth/installations with this payload shape returns 204.
  • composer lint (Pint) passes, and PHPStan reports no errors on the changed files.

Backport

This should be backported to 1.9.x.

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs? (N/A)

The growth server is being retired, so the installer now posts to POST https://cloud.appwrite.io/v1/growth/installations with the flat params that endpoint takes (hostIp, userAgent, ram in MB, and so on) and omits unknown values instead of sending them empty.

Growth only kept self-hosted install actions that had a version, domain and database, and cloud only stores rows with all three, so Report::sendable() keeps that filter on the client and upgrades are not sent. DO_NOT_TRACK/production gating, the 5s timeout, the User-Agent and swallowed errors are unchanged.

The console no longer reads VITE_GROWTH_ENDPOINT, and the Dockerfile never declared VITE_APPWRITE_GROWTH_ENDPOINT, so both references are dropped.
@greptile-apps

greptile-apps Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Changes how self-hosted installs report telemetry to the cloud.

The PR appears safe to merge, although restoring observable reporting coverage would reduce the risk of an unnoticed telemetry regression.

Fix All in Claude CodeFindings

  1. P2 Reporting tests removed ▶
Fix with agent prompt
### Issue 1
src/Appwrite/Platform/Tasks/Install.php:1075
The installer now posts the report directly, but the tests that checked the outbound request and opt-out behavior were removed without replacement. A wrong endpoint, header, or payload could go unnoticed. Please restore tests of the observable reporting behavior without mirroring configuration constants.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

The PR moves self-hosted installation reports from the growth analytics endpoint to cloud’s installations endpoint, reshapes the payload, and removes obsolete growth configuration. The subsequent merge moved sending back into the installer task and removed the reporting tests.

Reviews (4) · Last reviewed commit: "chore: merge main and drop the installer..."

Comment thread tests/unit/Installer/ReportTest.php Resolved
@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → feat/installer-cloud-installations (after).

Metric Before After Change
🚀 Requests/sec 190.46 191.06 ⚪ +0.3%
⏱️ Latency P50 91.32 ms 90.45 ms ⚪ -1%
⏱️ Latency P95 211.93 ms 212.19 ms ⚪ +0.1%
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 90.45 212.19 12,084 191.06 +0.25
Account 177.01 330.28 636 10.52 +15.1
TablesDB 87.74 163.17 6,572 106.04 -2.74
Storage 82.87 173.53 3,180 53.01 -10.66
Functions 132.36 256.75 1,696 28.97 -4.6

Top API waits (after)

API request Max wait (ms)
tablesdb.rows.delete 479.72
account.prefs.update 426.04
account.name.update 425.24
tablesdb.rows.update 405.46
functions.variables.update 385.62

The report tests mirrored Report::payload() as an exact array, so they would still pass if the installer posted to the wrong endpoint, dropped the X-Appwrite-Project header or changed the timeout.

Sending now lives in Appwrite\Installer\Reporter, which takes an optional fetch adapter. ReporterTest records the request the fetch client actually builds and checks the endpoint, method, headers, 5s timeouts, the JSON body the endpoint takes, that upgrades and incomplete installs are not sent, and that a failed request never reaches the installer.
Comment thread tests/unit/Installer/ReporterTest.php Resolved
Main moved Install.php to the PSR-18 client, so the installation report is sent from track() with it again and the Reporter wrapper, which only existed to swap the HTTP layer in tests, is removed along with the unit tests.
Comment thread src/Appwrite/Platform/Tasks/Install.php Resolved
@ChiragAgg5k
ChiragAgg5k merged commit e6f7d03 into main Sep 26, 2026
52 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the feat/installer-cloud-installations branch September 26, 2026 16:09
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