As you can see the Updater tries to find the correct download links from the release-notes but:
It downloads the entire HTML of the release-notes for every version. On the initial processing when the repo is empty, this will be done for EVERY version but will always lead to the same HTML result what is pure waste.
In the HTML it tries to find the current version in the id attribute. However, the id attribute seems to contain the version excluding the dots so the if condition never applies
As a result he goes to the else block where the static download links for the LATEST version are added. This is utterly wrong. We should instead log an ERROR instead of adding this versions to the LATEST link.
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).
@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:
id
attribute. However, theid
attribute seems to contain the version excluding the dots so theif
condition never applieselse
block where the static download links for the LATEST version are added. This is utterly wrong. We should instead log an ERROR instead of adding this versions to the LATEST link.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).