-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#692 : UrlUpdater fetches every defined version for Docker and latest version is now accepted as well #1117
base: main
Are you sure you want to change the base?
#692 : UrlUpdater fetches every defined version for Docker and latest version is now accepted as well #1117
Conversation
- deleted the new line patterns out of the regex in DockerDesktopUrlUpdater because Pattern.DOTALL already handles this
Pull Request Test Coverage Report for Build 13903549158Details
💛 - Coveralls |
- Added a fallback for "*" (Latest) - Version to be found in the filesystem - Added a fallback to name the downloadcache file to latest if version is "*" (latest)
- Changed order to prevent nullpointer - changed structure to if-else
- Changed order to prevent nullpointer
- Added test for only latest version
- Refactored UrlUpdaterMockSingle to modify the verion which should be tested - deleted temporary test case
- Updated CHANGELOG.adoc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbilda thank you very much for your PR. You did a great job and very well analysed the problem. Even you tested the URL Updater via GHA in your fork. Excellent 🚀
However, I checked the logs of your test run and found e.g. this line:
12:28:42.793 [com.devonfw.tools.ide.url.UpdateInitiator.main()] - WARN - c.d.t.i.u.updater.AbstractUrlUpdater - For tool docker and version 4.33.2 the download verification failed with status code 403 for URL https://desktop.docker.com/win/main/amd64/179689/Docker%20Desktop%20Installer.exe.
It seems that there are a lot of such errors and I can also reproduce this in my browser:
My assumption is that after merging this we get dedicated versions of docker desktop but no URL for Windows and therefore we will entirely break it for Windows users.
Could you confirm my observations and maybe find a solution to improve your PR?
See also this final summary:
|
@hohwille good point. Why do we even try to download this version?
The crucial part of this is the following: TODO:
Furthermore, if the download of the non-existing windows version fails, we return out of the addVersions()-function and skipping the "maybe existing" other versions for mac. Questions:
|
- Refactored DockerDesktopUrlUpdater to verify each version before downloading
The new implementation resolves the problem @hohwille mentioned. Lot of 403 errors appeared in our logs because there were no download links from docker at all for specific versions.
Yes. We have other tools with the same behavior. Sometimes there are only versions for some operating systems. The admin needs to know that and handle this situation accordingly. |
Fix: #692
With this implementation i was able to create versionzed folders in my custom repository for the defined docker versions:

This still needs to be tested with workflow because test <-> workflow isn't the same environment and so on.
In addition to the fix above i also added the fix for the actual latest problem.
Even tho the first fix should resolve the problem, because we do not have only latest-version in the url folder anymore, but in case there are other tools with only latest version it would be good to prevent the same error again.
We were also able to test the "real" UrlUpdater via github actions. We created a custom github action for testing the url updater. We checked out the url respository to fetch all existing versions and were able to upload/download the temporarly produced new repo.

The results can be seen here:
https://github.com/mbilda/IDEasy/actions/runs/13834518742