theia-blueprint
theia-blueprint copied to clipboard
Investigate publishing Releases to Github and run Updates via Github Releases
Feature Description:
At the the moment we are publishing the built installers/packages to download.eclipse.org Moreover we are using the main eclipse download server for updating older clients.
The downloads from the main eclipse download server may be slow depending on load of the server and location of the updater. As far as I could see there is no way to use the mirrors for fetching the updates.
One solution to this would be to also publish the releases on Github and configure the updater to fetch them from Github rather than download.eclipse.org This does not mean that we have to stop uploading to download.eclipse.org, just that updates will be fetched via Github.
Github also collects download stats, which may be curled, e.g.:
curl \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/eclipse-theia/theia-blueprint/releases
curl \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/eclipse-theia/theia-blueprint/releases/<release-id>
Then check download_count
of asset
If there are no mirrors, some of your content could be excluded from mirrors by exclusion patterns. Using mirrors also provides download stats (via a somewhat primitive, but functional interface). What is the path to one of your releases?
If you want, I can help improve your experience on download.e.o.
Thanks, so for the regular download page we are using the mirrors: https://theia-ide.org/docs/blueprint_download
The problem comes with electron-builders auto-update. Basically the affected files all lie under https://download.eclipse.org/theia/latest/
Let's take linux as an example (https://download.eclipse.org/theia/latest/linux/):
The publishing is configured like this:
publish:
provider: generic
url: "https://download.eclipse.org/theia/latest/linux"
When the application is checking for an update it take above url and looks for latest-linux.yml (-> https://download.eclipse.org/theia/latest/linux/latest-linux.yml) The auto generated latest-linux.yml contains a relative path on where to fetch an updated version, e.g. TheiaBlueprint.AppImage (-> https://download.eclipse.org/theia/latest/linux/TheiaBlueprint.AppImage)
Since we have specified https://download.eclipse.org/theia/latest/linux I think this will then always use the main server, mich may be slow and increases load there. Is there a different URL we could use as specified above that works with the mirrors?
One other thing that could work is to modify the auto-generated latest-linux.yml and set the path to https://www.eclipse.org/downloads/download.php?file=/theia/latest/linux/TheiaBlueprint.AppImage&r=1 This needs to be tested however as I am not sure if this redirect will work with the updater
Since we have specified https://download.eclipse.org/theia/latest/linux I think this will then always use the main server, mich may be slow and increases load there. Is there a different URL we could use as specified above that works with the mirrors?
The URL you've mentioned (with &r=1) would automatically redirect to a mirror, it is geographically aware, and will record a download stat. If the Theia updater supports 302 redirects, we should be good to go. If the ? and & characters are a problem (they may need to be escaped in your .yml file), we can craft a more modern URL for automatic redirects. Something like:
https://download.eclipse.org/theia/latest/linux/rrecdn
You can also follow this: https://bugs.eclipse.org/bugs/show_bug.cgi?id=577590
tl;dr: I'm planning on making download.e.o much faster moving forward.
Please let me know how we can help. Many thanks to @brianking for pointing us here.