devonfw / ide

Tool to automate setup and update of development environment (esp. for Java projects).
Apache License 2.0
35 stars 101 forks source link

ide-urls: DockerDesktop has the same download link for all versions but partially different checksums #1199

Closed hohwille closed 1 year ago

hohwille commented 1 year ago

@CREITZ25 figured out that for Rancher-Desktop all versions point to the same URL. Just to give a simple example:

The source of the problem is here: https://github.com/devonfw/ide/blob/3bf86547b1032b7f761049892cc9eed679bef47b/url-updater/src/main/java/com/devonfw/tools/ide/url/updater/docker/DockerDesktopUrlUpdater.java#L24-L51

As you can see the Updater tries to find the correct download links from the release-notes but:

I also discovered that the SHA256 checksums are also already present. So we do not have to download the entire release but can just download the ready to use hash. See "checksum" links in the release-notes after the download links. Example: https://desktop.docker.com/win/main/amd64/106363/checksums.txt?_gl=1*rcsye1*_ga*MTAxNDA0MTM4LjE2NDM5MDA0ODE.*_ga_XJWPQMJYHQ*MTY4NzE4NDUzMC4xNS4xLjE2ODcxODYyODkuNjAuMC4w

The problematic thing is that the download URLs and the Checksum URLs contain magic values that we cannot derive from the version itself.

My suggestion would be to entirely rewrite the DockerDesktopUrlUpdater so it determines the versions together with the download links and checksums just like @jan-vcapgemini has done for IntelliJ. Ideally there is a JSON API providing the release versions together with the links or the magic numbers to derive the links.

We should also address #1200 in the same go when we create a PR for this and only create MSI download links for windows (not exe).

hohwille commented 1 year ago

This issue is fixed with a pragmatic solution. I will therefore close it.