check nightlies/pr features with etag avalibility #1347
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.
Users in China often don't have a stable connection to AWS S3, so mirror sites like https://mirrors.tuna.tsinghua.edu.cn exist; they are typically simple static-file HTTP servers and don't have advanced S3-like features such as etags.
Previously, we have provided the JULIAUP_SERVER feature to change the download baseurl, but at that time, I didn't realize that the server mirror should support ETag.
This commit introduces a server feature check operation for custom JULIAUP_SERVER:
If this feature flag is false, then the PR/nightlies download will be disabled. This doesn't affect the mirror sites because they don't support mirroring Julia nightlies deliberately; too few people use it, and it consumes too much unnecessary sync bandwidth.
Known JuliaUp mirror sites in China that can be used to test:
https://mirrors.ustc.edu.cn/juliaup-releases
https://mirrors.tuna.tsinghua.edu.cn/juliaup-releases https://mirrors.bfsu.edu.cn/juliaup-releases
This commit makes it work for the above mirror sites and thus fixes #917.
Disclaimer: This commit is primarily generated by AI (cursor + claude 4.5 opus). I've tested it locally on Windows and Linux, and it works as expected. MacOS is not tested.
Example: PR/nightlies features are disabled with a proper error message:
Example: normal release download just works
closes #917