Skip to content
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

All packages with sources hosted by GitHub currently do not download due to changes in GitHub's archives #29288

Closed
bernhardmgruber opened this issue Jan 30, 2023 · 33 comments
Assignees
Labels
category:infrastructure Pertaining to the CI/Testing infrastrucutre

Comments

@bernhardmgruber
Copy link
Contributor

bernhardmgruber commented Jan 30, 2023

Host Environment

  • OS: Ubuntu 22.04 as used by GitHub actions
  • Compiler: GCC, clang, icpx

To Reproduce

I run this inside my GitHub action:
vcpkg install alpaka fmt tinyobjloader boost-mp11 boost-atomic boost-smart-ptr boost-functional boost-container boost-iostreams[core] catch2 xsimd

Failure logs

Excerpted from: https://github.com/alpaka-group/llama/actions/runs/4046805344/jobs/6961596764

Computing installation plan...
The following packages will be built and installed:
    alpaka[core]:x64-linux -> 0.9.0#1
  * boost-align[core]:x64-linux -> 1.81.0
  * boost-array[core]:x64-linux -> 1.81.0
  * boost-assert[core]:x64-linux -> 1.81.0
    boost-atomic[core]:x64-linux -> 1.81.0
  * boost-bind[core]:x64-linux -> 1.81.0
  * boost-build[core]:x64-linux -> 1.81.0
  * boost-concept-check[core]:x64-linux -> 1.81.0
  * boost-config[core]:x64-linux -> 1.81.0
    boost-container[core]:x64-linux -> 1.81.0
  * boost-container-hash[core]:x64-linux -> 1.81.0
  * boost-conversion[core]:x64-linux -> 1.81.0
  * boost-core[core]:x64-linux -> 1.81.0
  * boost-describe[core]:x64-linux -> 1.81.0
  * boost-detail[core]:x64-linux -> 1.81.0
  * boost-dynamic-bitset[core]:x64-linux -> 1.81.0
  * boost-function[core]:x64-linux -> 1.81.0
  * boost-function-types[core]:x64-linux -> 1.81.0
    boost-functional[core]:x64-linux -> 1.81.0
  * boost-fusion[core]:x64-linux -> 1.81.0
  * boost-integer[core]:x64-linux -> 1.81.0
  * boost-intrusive[core]:x64-linux -> 1.81.0
  * boost-io[core]:x64-linux -> 1.81.0
    boost-iostreams[core]:x64-linux -> 1.81.0
  * boost-iterator[core]:x64-linux -> 1.81.0
  * boost-modular-build-helper[core]:x64-linux -> 1.81.0
  * boost-move[core]:x64-linux -> 1.81.0
    boost-mp11[core]:x64-linux -> 1.81.0
  * boost-mpl[core]:x64-linux -> 1.81.0
  * boost-numeric-conversion[core]:x64-linux -> 1.81.0
  * boost-optional[core]:x64-linux -> 1.81.0
  * boost-predef[core]:x64-linux -> 1.81.0
  * boost-preprocessor[core]:x64-linux -> 1.81.0
  * boost-random[core]:x64-linux -> 1.81.0
  * boost-range[core]:x64-linux -> 1.81.0
  * boost-regex[core]:x64-linux -> 1.81.0
    boost-smart-ptr[core]:x64-linux -> 1.81.0
-- Performing post-build validation
Stored binary cache: "/home/runner/.cache/vcpkg/archives/14/14a7e106a0e9aee1d43b39d00c62a19db02aa62430357d6a214483e0610b9e70.zip"
Elapsed time to handle boost-config:x64-linux: 417.8 ms
Installing 4/56 boost-assert:x64-linux...
Building boost-assert[core]:x64-linux...
-- Downloading https://github.com/boostorg/assert/archive/boost-1.81.0.tar.gz -> boostorg-assert-boost-1.81.0.tar.gz...
[DEBUG] To include the environment variables in debug output, pass --debug-env
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
[DEBUG] Detected CI environment: GitHub_Actions
[DEBUG] 1000: popen( curl --fail -L https://github.com/boostorg/assert/archive/boost-1.81.0.tar.gz --create-dirs --output /usr/local/share/vcpkg/downloads/boostorg-assert-boost-1.81.0.tar.gz.1750.part 2>&1)
[DEBUG] 1000: cmd_execute_and_stream_data() returned 0 after   206285 us
error: Failed to download from mirror set
error: File does not have the expected hash:
url: https://github.com/boostorg/assert/archive/boost-1.81.0.tar.gz
File: /usr/local/share/vcpkg/downloads/boostorg-assert-boost-1.81.0.tar.gz.1750.part
Expected hash: c443b61a9ad29d4c9707aaaa997300a959fdef2d360aec9ee221abc[12](https://github.com/alpaka-group/llama/actions/runs/4046805344/jobs/6961596764#step:8:13)cd8446b3bc969e6c282ba778bee7d6fb54cc02655f15e01eacf1ad87262534dc4cc32bf
Actual hash: cb031c35d3f4342e862b46f309874bc28773cc95657841b772ff7b52dd8495c92eb496273e80ee50155b418e0[13](https://github.com/alpaka-group/llama/actions/runs/4046805344/jobs/6961596764#step:8:14)a3cc62b352bdd6d90274f49206c89089c1aa6
[DEBUG] /mnt/vss/_work/1/s/src/vcpkg/base/downloads.cpp(956): 
[DEBUG] Time in subprocesses: 206285 us
[DEBUG] Time in parsing JSON: 3 us
[DEBUG] Time in JSON reader: 0 us
[DEBUG] Time in filesystem: 100 us
[DEBUG] Time in loading ports: 0 us
[DEBUG] Exiting after 207.4 ms (207047 us)

CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:32 (message):
      
      Failed to download file with error: 1
      If you use a proxy, please check your proxy setting. Possible causes are:
      
      1. You are actually using an HTTP proxy, but setting HTTPS_PROXY variable
         to `https://address:port`. This is not correct, because `https://` prefix
         claims the proxy is an HTTPS proxy, while your proxy (v2ray, shadowsocksr
         , etc..) is an HTTP proxy. Try setting `http://address:port` to both
         HTTP_PROXY and HTTPS_PROXY instead.
      
      2. You are using Fiddler. Currently a bug (https://github.com/microsoft/vcpkg/issues/17752)
         will set HTTPS_PROXY to `https://fiddler_address:port` which lead to problem 1 above.
         Workaround is open Windows 10 Settings App, and search for Proxy Configuration page,
         Change `http=address:port;https=address:port` to `address`, and fill the port number.
      
      3. Your proxy's remote server is out of service.
      
      In future vcpkg releases, if you are using Windows, you no longer need to set
      HTTP(S)_PROXY environment variables. Vcpkg will simply apply Windows IE Proxy
      Settings set by your proxy software. See (https://github.com/microsoft/vcpkg-tool/pull/49)
      and (https://github.com/microsoft/vcpkg-tool/pull/77)
      
      Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues

Call Stack (most recent call first):
  scripts/cmake/vcpkg_download_distfile.cmake:273 (z_vcpkg_download_distfile_show_proxy_and_fail)
  scripts/cmake/vcpkg_from_github.cmake:106 (vcpkg_download_distfile)
  ports/boost-assert/portfile.cmake:3 (vcpkg_from_github)
  scripts/ports.cmake:[14](https://github.com/alpaka-group/llama/actions/runs/4046805344/jobs/6961596764#step:8:15)7 (include)


error: building boost-assert:x64-linux failed with: BUILD_FAILED
error: Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
    https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+boost-assert
You can submit a new issue at:
    https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[boost-assert]+Build+error
Include '[boost-assert] Build error' in your bug report title, the following version information in your bug description, and attach any relevant failure logs from above.
    vcpkg-tool version: [20](https://github.com/alpaka-group/llama/actions/runs/4046805344/jobs/6961596764#step:8:21)[22](https://github.com/alpaka-group/llama/actions/runs/4046805344/jobs/6961596764#step:8:23)-12-14-7ae0d8527fb488fde10a89c2813802dc9b03b6f9
    vcpkg-scripts version: e69dd972b 20[23](https://github.com/alpaka-group/llama/actions/runs/4046805344/jobs/6961596764#step:8:24)-01-20 (10 days ago)


Please use the prefilled template from /usr/local/share/vcpkg/installed/vcpkg/issue_body.md when reporting your issue.
Error: Process completed with exit code 1.

Unfortunately, my GitHub action does not expose the /usr/local/share/vcpkg/installed/vcpkg/issue_body.md, so I cannot attach it :/

Additional context

This just started failing about an hour ago. Earlier GitHub actions were completed successfully.

@bernhardmgruber bernhardmgruber added the category:port-bug The issue is with a library, which is something the port should already support label Jan 30, 2023
@JiK
Copy link

JiK commented Jan 30, 2023

I have a similar problem in my local computer with a different package, also just started today while everything was working 24 hours ago:

OS: Windows 10
vcpkg-tool version: 2023-01-24-8a88d63f241d391772fbde69af9cab96c3c64c75
vcpkg-scripts version: 91dd61b 2023-01-27 (3 days ago)

Just ran git pull and vcpkg update. Running vcpkg install glfw3 reports:

Downloading https://github.com/glfw/glfw/archive/7482de6071d21db77a7236155da44c172a7f6c9e.tar.gz
error: Failed to download from mirror set
error: File does not have the expected hash:
url: https://github.com/glfw/glfw/archive/7482de6071d21db77a7236155da44c172a7f6c9e.tar.gz
File: C:\dev\vcpkg\downloads\glfw-glfw-7482de6071d21db77a7236155da44c172a7f6c9e.tar.gz.20140.part
Expected hash: ec45b620338cf36a8dbdf7aaf54d7c3a49a1be4ae1a1ef95f1531094fec670870713969bbc23476769d374c7a71d93f6540ab64c46fb5f66f4402bb2d15c7d87
Actual hash: f2541cc801adb9a4d6ea6932c234953240d902212bd0a2d3a6f8d95c1dbff3adbd8e8e757ae991a544d979000c351c209d5e4054f71427d1a0490dbbfe0763fb

If I download the URL https://github.com/glfw/glfw/archive/7482de6071d21db77a7236155da44c172a7f6c9e.tar.gz with Chrome independently of vcpkg, the sha512sum of that file matches the "Actual hash" reported above.

Same thing also with vcpkg install openvr, but vcpkg install nlohmann-json seems to have worked.

@dkonik
Copy link

dkonik commented Jan 30, 2023

Having the same issue with multiple different packages.

@willeccles
Copy link

I am not using vcpkg, but I cannot find anywhere else on the internet that anyone else appears to be having this issue. CMake just spit out an error for a mismatched hash on nlohmann-json v3.10.4's archive using the same archive URL as the boost one in the OP. I have been using this URL with no issues until now (with this same hash). Perhaps GitHub has done something funny?

@firthm01
Copy link

Same issue with several boost packages - windows and ubuntu tested so far
Same commit was compiling fine on Friday (using Github Actions)

@willeccles
Copy link

I've just opened a support ticket with GitHub. I suspect this is an issue on their end.

@BillyONeal BillyONeal changed the title [boost-assert] Build error due to hash missmatch (Ubuntu 22.04 GHA) All packages with sources hosted by GitHub currently do not download due to changes in GitHub's archives Jan 30, 2023
@BillyONeal
Copy link
Member

I've just opened a support ticket with GitHub. I suspect this is an issue on their end.

They changed something about their gzipper

@BillyONeal BillyONeal pinned this issue Jan 30, 2023
@BillyONeal
Copy link
Member

I've just opened a support ticket with GitHub. I suspect this is an issue on their end.

Do you have a link for this? They have been a bit vocal in the past that "if you expect the hash to not change you need to get the bit from a download/artifact rather than from a source archive" so they may say "too bad" to us.

@willeccles
Copy link

I can't link to it as it's some sort of "personal ticket" or something associated with my account. Will let you know what they say, though.

Surprising that they are okay with that happening. I have been using the same hash for the same URL for a year and a half or so and not had any issues. Also, since the archive is listed as a release artifact, you'd think the same rules would apply there...

@SuperElectron
Copy link

our production builds are broken due to this issue

@akaddoura
Copy link

Same issue is happening here. Multiple packages are failing. Is it possible to forcibly change the hash keys as a temp fix?

@cmazakas
Copy link
Contributor

Same issue is happening here. Multiple packages are failing. Is it possible to forcibly change the hash keys as a temp fix?

Technically, you can always just hard-edit the portfiles themselves to have the proper matching hashes.

@mathstuf
Copy link

Note that the /archive/ API endpoint has always been git archive under the hood. I don't believe that git archive has ever had reproducible guarantees about its behavior. Proper release entities with source archives should always be preferred where possible (please prod projects to provide them as well). Though given how hard it is to even get tags sometimes…

@BillyONeal
Copy link
Member

bazel-contrib/SIG-rules-authors#11 (comment) GitHub folks commenting here

@prince-chrismc
Copy link
Contributor

@yanggaome
Copy link

Our pipeline (Microsoft internal repo) failed...

@BillyONeal
Copy link
Member

So when shall this be in effect?

We are waiting to see just as much as everyone else.

@mathstuf
Copy link

mathstuf commented Jan 31, 2023

It is impractical for vcpkg to host such an archive 'automatically' because that would implicate us in "distribution" rules of whatever license applies to that archive.

I wasn't saying for vcpkg to rehost. I was asking if vcpkg (ideally in coordination with other distros) could push for releases to contain actual archives (even if just re-uploads of the /archive/ API at the time) instead of relying on the automatic /archive/ links.

@BillyONeal
Copy link
Member

I wasn't saying for vcpkg to rehost. I was asking if vcpkg (ideally in coordination with other distros) could push for releases to contain actual archives (even if just re-uploads of the /archive/ API at the time) instead of relying on the automatic /archive/ links.

That only works if we are pointing to an actual release. In this case GitHub appears to be trying to revert the change so it should be automatically fixed.

@bernhardmgruber
Copy link
Contributor Author

My CI seems to work again and vcpkg seems to download all dependencies correctly. My original issue is thus resolved. However, since the title has changed to raise attention to a more general problem, I leave it up to one of the maintainers here to close the issue. Thanks for keeping everyone up-to-date!

@Neumann-A
Copy link
Contributor

@dg0yt dg0yt mentioned this issue Jan 31, 2023
11 tasks
@BillyONeal
Copy link
Member

GitHub appears to have completed the revert. Thanks for the bug report and sorry for the disruption everyone!

@BillyONeal BillyONeal added category:infrastructure Pertaining to the CI/Testing infrastrucutre and removed category:port-bug The issue is with a library, which is something the port should already support labels Jan 31, 2023
@BillyONeal BillyONeal unpinned this issue Jan 31, 2023
BillyONeal added a commit to BillyONeal/vcpkg that referenced this issue Jan 31, 2023
Added the ability for the 'default' port version to get a value in case they all change at once (as almost happened due to microsoft#29288)

microsoft#28356 did not apply post-source stubs for url and locale. I suspect they were just forgotten to be checked in?
microsoft#28617 did not record the port version change in generate-ports.ps1.

Also fixed all files to have LF line endings. (since changing boost-vcpkg-helper version also changed all the other ports anyway)

Also changed "When changing this file also update and run scripts/boost/generate-ports.ps1" to "Automatically generated by scripts/boost/generate-ports.ps1" because I think that better conveys the consequences (your changes will get nuked).
BillyONeal added a commit that referenced this issue Feb 1, 2023
Added the ability for the 'default' port version to get a value in case they all change at once (as almost happened due to #29288)

#28356 did not apply post-source stubs for url and locale. I suspect they were just forgotten to be checked in?
#28617 did not record the port version change in generate-ports.ps1.

Also fixed all files to have LF line endings. (since changing boost-vcpkg-helper version also changed all the other ports anyway)

Also changed "When changing this file also update and run scripts/boost/generate-ports.ps1" to "Automatically generated by scripts/boost/generate-ports.ps1" because I think that better conveys the consequences (your changes will get nuked).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:infrastructure Pertaining to the CI/Testing infrastrucutre
Projects
None yet
Development

No branches or pull requests