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

curl errors with reject future index states test #9530

Open
philderbeast opened this issue Dec 16, 2023 · 5 comments
Open

curl errors with reject future index states test #9530

philderbeast opened this issue Dec 16, 2023 · 5 comments

Comments

@philderbeast
Copy link
Collaborator

I've noticed more than one failure of RejectFutureIndexStates/cabal.test.hs for Validate ubuntu-latest ghc-8.6.5 with a curl error:

-----BEGIN CABAL OUTPUT-----
Warning: Caught exception during _mirrors lookup:DnsNoData
-----END CABAL OUTPUT-----
-----BEGIN CABAL OUTPUT-----
Warning: No mirrors found for http://localhost:8000/
-----END CABAL OUTPUT-----
Selected mirror http://localhost:8000/
Downloading root
Running: /usr/bin/curl 'http://localhost:8000/root.json' --output /tmp/transportAdapterGet224304-2 --location --write-out '%{http_code}' --user-agent 'cabal-install/3.11.0.0 (linux; x86_64)' --silent --show-error --dump-header /tmp/curl-headers224304-3.txt
Waiting to acquire cache lock on /home/runner/work/cabal/cabal/cabal-testsuite/PackageTests/NewUpdate/RejectFutureIndexStates/cabal.dist/home/.cabal/packages/repository.localhost/hackage-security-lock
Acquired cache lock on /home/runner/work/cabal/cabal/cabal-testsuite/PackageTests/NewUpdate/RejectFutureIndexStates/cabal.dist/home/.cabal/packages/repository.localhost/hackage-security-lock
Released cache lock on /home/runner/work/cabal/cabal/cabal-testsuite/PackageTests/NewUpdate/RejectFutureIndexStates/cabal.dist/home/.cabal/packages/repository.localhost/hackage-security-lock
-----BEGIN CABAL OUTPUT-----
Downloading the latest package list from repository.localhost
-----END CABAL OUTPUT-----
Selected mirror http://localhost:8000/
Downloading timestamp
Running: /usr/bin/curl 'http://localhost:8000/timestamp.json' --output /tmp/transportAdapterGet224304-5 --location --write-out '%{http_code}' --user-agent 'cabal-install/3.11.0.0 (linux; x86_64)' --silent --show-error --dump-header /tmp/curl-headers224304-6.txt
Downloading snapshot
Running: /usr/bin/curl 'http://localhost:8000/snapshot.json' --output /tmp/transportAdapterGet224304-8 --location --write-out '%{http_code}' --user-agent 'cabal-install/3.11.0.0 (linux; x86_64)' --silent --show-error --dump-header /tmp/curl-headers224304-9.txt
Downloading mirrors
Running: /usr/bin/curl 'http://localhost:8000/mirrors.json' --output /tmp/transportAdapterGet224304-11 --location --write-out '%{http_code}' --user-agent 'cabal-install/3.11.0.0 (linux; x86_64)' --silent --show-error --dump-header /tmp/curl-headers224304-12.txt
dieVerbatim: user error (CallStack (from HasCallStack):
  withMetadata, called at src/Distribution/Simple/Utils.hs:439:12 in Cabal-3.11.0.0-inplace:Distribution.Simple.Utils
-----BEGIN CABAL OUTPUT-----
Error: cabal: '/usr/bin/curl' exited with an error:
curl: (56) Recv failure: Connection reset by peer
-----END CABAL OUTPUT-----
@philderbeast
Copy link
Collaborator Author

Another curl error for a related test, for NewUpdate/UpdateIndexState/update-index-state.test.hs:

-----BEGIN CABAL OUTPUT-----
Error: cabal: '/usr/local/opt/curl/bin/curl' exited with an error:
curl: (7) Failed to connect to localhost port 8000 after 0 ms: Couldn't connect to server
-----END CABAL OUTPUT-----

@ffaf1
Copy link
Collaborator

ffaf1 commented Dec 16, 2023

I found that relaunching the specific job fixes it, although this is obviously a workaround and not a solution.

@andreabedini
Copy link
Collaborator

I wrote withRemoteRepo and I acknowlege it's too fragile. I think we can switch the tests to use a secure repo with a local url. I'll give it a go.

@ulysses4ever
Copy link
Collaborator

#9540 seems stuck with the hardest problem in computer science -- Windows paths. To unblock many people tired of restarting pipelines, I submitted #9593 which disables the tests. This idea was coined at the last cabal meeting (2023-01-04).

@philderbeast
Copy link
Collaborator Author

philderbeast commented Jan 7, 2024

Thanks @ulysses4ever #9593 will be a great help in getting pull requests through CI. Even with babysitting and restarting failed jobs, it was taking more than 6 hrs to get CI to run green. Some of that time would have been delays in noticing the failures.

erikd pushed a commit to erikd/cabal that referenced this issue Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants