Repository navigation
feat: report self-hosted installs to cloud's installations endpoint - #13917
Merged
Merged
Conversation
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.
Contributor
|
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
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.
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.
TorstenDittmann
approved these changes
Sep 26, 2026
This was referenced Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 toINSTALLATIONS_URLwithContent-Type: application/jsonandX-Appwrite-Project: console. No auth is needed, and the endpoint returns204. 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(previouslyip),userAgent,os,arch,cpusandram.ramwas already in MB (MemTotalkB / 1024), so no conversion was needed. Null or empty values are left out because every param is optional andemailmust be a valid address when present. The old growth-only fields (action,account,url,category,label, JSON-encodeddata) and their constants are gone.Report::sendable()keeps growth's filtering on the client. It only sendsinstallactions, and only whenversion,domainanddatabaseare all set, which matches what cloud stores.Appwrite-Installer/<ver> (...)User-Agent header. The User-Agent is also sent as theuserAgentparam.VITE_GROWTH_ENDPOINTfrom the console service indocker-compose.yml. A separate PR is migrating the console (vibes) offVITE_GROWTH_ENDPOINT, so this env var is dead once that lands.VITE_APPWRITE_GROWTH_ENDPOINTbuild 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.ioreferences left in the repo.Upgrades
Growth only forwarded self-hosted
installactions, 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
vendor/bin/phpunit tests/unit/Platform/Modules/Installerpasses (175 tests), and Pint and PHPStan pass on the changed files.POST /v1/growth/installationswith this payload shape returns204.composer lint(Pint) passes, and PHPStan reports no errors on the changed files.Backport
This should be backported to
1.9.x.Checklist