Repository navigation
fix: download open-source updates from the GitHub release they are listed in - #2218
Draft
Douglasymlai wants to merge 1 commit into
Draft
Douglasymlai wants to merge 1 commit into
Douglasymlai wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Problem
If you installed Eigent from a GitHub release, in-app updates never finish. The app shows that a new version is available and starts the download, but the download fails its checksum and the update is never installed.
Cause
The updater reads the new version and its sha512 checksum from the
latest*.ymlfiles on the GitHub release. It then downloads the installer from a different location,https://cdn.eigent.ai/releases/v<version>/…, which hosts a different build of the same version. The files differ in size and content, so the checksum from GitHub never matches the downloaded file. For example, the 1.0.8 macOS arm64 zip is 665,885,892 bytes on the GitHub release and 676,773,966 bytes at the other location. 1.0.6 and 1.0.7 show the same mismatch.Fix
EIGENT_UPDATER_CDN_BASE_URLstill works as an opt-in mirror (<mirror>/v<version>/<platform>/<file>) for a mirror that serves the same files as the GitHub release. A blank value means no mirror.latest*.ymlchannels.Note: installs already on 1.0.8 or earlier still have the old updater. They need a one-time manual download of the release that contains this fix. Updates after that work in-app.
Testing
npx vitest run test/unit/electron/githubReleaseCdnProvider.test.ts: 10/10 pass. New cases check the default GitHub download URLs (and that the release's checksums are kept), blank and trailing-slash mirror values, and the mirror path.npm run type-checkpasses.npx vitest run test/unit/electron: the only failures are 20 ininstall-deps.test.tsandenvUtil.test.ts. The same 20 fail on an unmodifiedmainin this environment, so they are not related to this change.~/Library/Logs/Eigent/main.logshould show the file downloading fromhttps://github.com/eigent-ai/eigent/releases/download/v<version>/…, with nosha512 checksum mismatch.Suggested release note