-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Curl returns 000
http status codes on successful download
#10009
Comments
This is also affecting https://github.com/anchore/sbom-action |
Quick update: the reason for the 000 status code seems to be the fact that the file is downloaded to a temporary file created with # this prints 000
tmp=$(mktemp)
curl -w '%{http_code}' -sL -H 'Accept:application/json' -o "$tmp" https://github.com/golangci/golangci-lint/releases/v1.57.0
# this prints 200
curl -w '%{http_code}' -sL -H 'Accept:application/json' -o test.json https://github.com/golangci/golangci-lint/releases/v1.57.0 I'm not fully understanding why id did work on the previous version and not this one though 🤷 |
Hey @fasmat, There seems to be a bug in curl |
Thanks for the response @shamil-mubarakshin I hope that's the issue that we are experiencing. The curl version on the runner seems to be a different version:
But the observed issue seems to be the same 🤔 |
Its 8.4.0 when run from |
@fasmat - Issue is with curl , lets wait and get the curl issue curl/curl#13845 gets fixed . Hence I am closing this issue. |
Is there any way to roll back the git that is installed on the runners? not only does it break https://github.com/spacemeshos/go-spacemesh/actions/runs/9577708148/job/26406459251?pr=6049 These are recent issues that we didn't have a few weeks ago. |
Temporarily disable the installation workflow on Windows. The workflow is currently broken due to actions/runner-images#10009 with no clear workaround at the moment. Updates #151
See actions/runner-images#10009 Signed-off-by: Will Murphy <will.murphy@anchore.com>
Out of curiosity, why was this issue closed? The issue is in curl, but it's in a version of curl that is currently in the windows runners. Here is a workflow exhibiting the issue with curl 8.8.0 and showing that the older version, 8.7.1 does not have the problem: https://github.com/kzantow-anchore/sbom-action-test/actions/runs/9860639787/job/27227290279 runs-on: windows-latest
steps:
- run: sh -c 'curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh > $(pwd)/install.sh'
- run: |
md curl
curl https://curl.se/windows/dl-8.7.1_3/curl-8.7.1_3-win64-mingw.zip > curl/curl.zip
cd curl
unzip curl.zip
- run: sh -c 'PATH="$(pwd)/curl/curl-8.7.1_3-win64-mingw/bin:$PATH" curl --version'
- run: sh -c 'PATH="$(pwd)/curl/curl-8.7.1_3-win64-mingw/bin:$PATH" sh $(pwd)/install.sh -b curl-8.7.1'
- run: sh -c 'curl-8.7.1/syft version'
- run: sh -c 'curl --version'
- run: sh -c 'sh $(pwd)/install.sh -b curl-8.8.0'
- run: sh -c 'curl-8.8.0/syft version' |
|
Description
Our CI involves installing
golangci-lint
using the officialinstall.sh
script. Up until version20240514.3.0
it worked perfectly fine on thewindows-2022
runner, but starting with20240603.1.0
we see failures during that step:I added debug logging and investigated a bit. The download on ubuntu-22.04 produces this output:
on
windows-2022
however it produces this:The reason for the installation failures seem to be caused by the script checking the returned http header and although the http request was successful and produces the same json as on other runners on
windows-2022
for some reason the http response returns the status code000
instead of200
causing theinstall.sh
script to fail and the workflow to abort with an error.Platforms affected
Runner images affected
Image version and build link
20240603.1.0
latest CI run with debugging enabled and some extra steps showing the problem: https://github.com/spacemeshos/go-spacemesh/actions/runs/9415941492/job/25938011887
Is it regression?
20240514.3.0 worked perfectly fine - https://github.com/spacemeshos/go-spacemesh/actions/runs/9401526334/job/25893520036
Expected behavior
Curl should not return 000 as http status code on a successful request.
Actual behavior
It seems curl behaves incorrectly in the newest runner image for windows 2022
Repro steps
See decription above
The text was updated successfully, but these errors were encountered: