Repository navigation
fix(doctor): check for updates against the latest GitHub release - #14162
Merged
Merged
Conversation
The doctor now reads tag_name from GitHub's releases/latest instead of the _APP_HOME /version page, which returns 404. It reports a new version only when that release is newer than the running _APP_VERSION.
🟢 Tier S · Ready to merge
Doctor now checks GitHub’s latest stable release instead of the unavailable website version endpoint. The request uses the Utopia curl client with five-second timeouts and a User-Agent, and update notices appear only when the release version is newer than the running version. Existing failure output is preserved for unsuccessful checks.
📂 Walkthrough · 1
Reviewed |
ChiragAgg5k
approved these changes
Oct 6, 2026
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
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.
Fixes #7717
The doctor checked for updates by fetching
_APP_HOME . '/version'(https://appwrite.io/version). That URL returns a 404 HTML page, so every production run printed "Failed to check for a newer version". The comparison was also wrong: any version that wasn't equal counted as "a new version is available", including an RC running ahead of the latest release.The doctor now reads
tag_namefrom GitHub'sreleases/latest, which excludes pre-releases. It usesUtopia\Clientwith the curl adapter, the same clientInstall.phpuses, with a 5s connect and total timeout and aUser-Agentheader (GitHub returns 403 without one). The running version is still_APP_VERSION, which release images get from the git tag. A new version is reported only whenversion_compare(latest, running, '>'); an equal or newer running version counts as the latest. Network failures still print the existing failure line.I ran the real doctor in a throwaway container with
_APP_ENV=production:_APP_VERSION=dev_APP_VERSION=2.3.0_APP_VERSION=2.2.0_APP_VERSION=2.4.0-rc.1--network none)No PHP warnings, and Pint passes. These runs used the dev image with
_APP_VERSIONoverridden, not a release image. Unauthenticated GitHub API calls are limited to 60 per hour per IP; a rate-limited response has notag_name, so it falls into the existing failure line (I didn't hit this in testing). Nightly images from a line that already has a release, like2.3-nightly.<date>, compare lower than2.3.0and will be told 2.3.0 is available.