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

Issue installing PNPM in Circle CI (potentially on all linux machines) #449

Open
Jean-Baptiste-Lasselle opened this issue Aug 27, 2023 · 6 comments

Comments

@Jean-Baptiste-Lasselle
Copy link

Jean-Baptiste-Lasselle commented Aug 27, 2023

Hello awesome pnpm team,

I think my pipeline robots spotted an issue about the pnpm installation script.

There you go, i found where the error is coming from :

  • I execute, in a circle ci pipeline, in a debian bookworm docker container :
curl -fsSL https://get.pnpm.io/install.sh | tee ./pnpm.installation.script.sh
  • and here is the displayed output in the circle ci pipeline :
    image

So there are only 3 possible explanations I can fathom, this is either caused by :

  • Circle CI messing up the script characters,
  • this is coming from PNPM team, either the https://get.pnpm.io server has an issue, or the script itself recently changed
  • this is coming from a recent change in github (pages?) infrastructure configuration

see 3forges/juste-un-curieux#17 (comment)

@Jean-Baptiste-Lasselle Jean-Baptiste-Lasselle changed the title Issue installing PNPM in Circle CI (potentially o all linux machines) Issue installing PNPM in Circle CI (potentially of all linux machines) Aug 27, 2023
@Jean-Baptiste-Lasselle Jean-Baptiste-Lasselle changed the title Issue installing PNPM in Circle CI (potentially of all linux machines) Issue installing PNPM in Circle CI (potentially on all linux machines) Aug 27, 2023
@tdanecker
Copy link

We are experiencing the same issue in our Bitbucket pipelines. The builds started failing today for all repositories which install pnpm via curl.

@antimonad
Copy link

antimonad commented Aug 28, 2023

$ curl -V
curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.16
Release-Date: 2022-01-05
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets zstd

=> curl version supports 'br'

$ curl -v -o /dev/null -H 'Accept-Encoding: gzip' https://get.pnpm.io/v6.16.js 2>&1 | egrep '^<|^>'
> GET /v6.16.js HTTP/2
> Host: get.pnpm.io
> user-agent: curl/7.81.0
> accept: */*
!!! > accept-encoding: gzip
> 
< HTTP/2 200 
< date: Mon, 28 Aug 2023 15:31:57 GMT
< content-type: application/javascript; charset=utf-8
< access-control-allow-origin: *
< cache-control: public, max-age=86400
< content-disposition: inline; filename="v6.16.js"
!!! < content-encoding: br   # IGNORED ACCEPT-ENCODING HEADER
< etag: W/"318f98ac74c6b0d0790c5db9a1eea791"
< strict-transport-security: max-age=63072000
< x-vercel-cache: HIT
< x-vercel-id: gru1::flwrz-1693130457593-14951f204763
< cf-cache-status: HIT
< age: 10
< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=qSHx99dYeAq%2BbTFw3Guvou2EuLlDKYrYBAPGB5p%2BCcRzYscloU5R5izAoxWyc%2FYgL58HlMS%2Bkb18XP0fT4xXbGkkzpenTaNEvmfPIQgxqwsN2lB6YK2NoCmNdbbR0w%3D%3D"}],"group":"cf-nel","max_age":604800}
< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
!!! < vary: Accept-Encoding # ?!? vary header not in sync with result !?!
< server: cloudflare
< cf-ray: 7fdd9aa9cf903030-VIE
< alt-svc: h3=":443"; ma=86400
< 

using --compressed option with this version of curl will decompress the output and fixes installation issues.

❗ Note: some earlier versions of curl ( namely curl in nodejs V16 docker-image ) do not support 'br', thus --compressed option will NOT resolve installation issues.

@arhamroshan
Copy link

I am also getting the same issue in Gitlab
image

@Jean-Baptiste-Lasselle
Copy link
Author

$ curl -V
curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.16
Release-Date: 2022-01-05
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets zstd

=> curl version supports 'br'

$ curl -v -o /dev/null -H 'Accept-Encoding: gzip' https://get.pnpm.io/v6.16.js 2>&1 | egrep '^<|^>'
> GET /v6.16.js HTTP/2
> Host: get.pnpm.io
> user-agent: curl/7.81.0
> accept: */*
!!! > accept-encoding: gzip
> 
< HTTP/2 200 
< date: Mon, 28 Aug 2023 15:31:57 GMT
< content-type: application/javascript; charset=utf-8
< access-control-allow-origin: *
< cache-control: public, max-age=86400
< content-disposition: inline; filename="v6.16.js"
!!! < content-encoding: br   # IGNORED ACCEPT-ENCODING HEADER
< etag: W/"318f98ac74c6b0d0790c5db9a1eea791"
< strict-transport-security: max-age=63072000
< x-vercel-cache: HIT
< x-vercel-id: gru1::flwrz-1693130457593-14951f204763
< cf-cache-status: HIT
< age: 10
< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=qSHx99dYeAq%2BbTFw3Guvou2EuLlDKYrYBAPGB5p%2BCcRzYscloU5R5izAoxWyc%2FYgL58HlMS%2Bkb18XP0fT4xXbGkkzpenTaNEvmfPIQgxqwsN2lB6YK2NoCmNdbbR0w%3D%3D"}],"group":"cf-nel","max_age":604800}
< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
!!! < vary: Accept-Encoding # ?!? vary header not in sync with result !?!
< server: cloudflare
< cf-ray: 7fdd9aa9cf903030-VIE
< alt-svc: h3=":443"; ma=86400
< 

using --compressed option with this version of curl will decompress the output and fixes installation issues.

❗ Note: some earlier versions of curl ( namely curl in nodejs V16 docker-image ) do not support 'br', thus --compressed option will NOT resolve installation issues.

Thank you so much for digging this issue, now :

  • should we change the pnpm docs installation instructions, with all those --compressed / br options, (it seems a bit unclean to tell the pnpm user,to use that, especially we would have to tell the user which versions of curl he should use)
  • or should we find out what caused this change a few days ago ?
    Personnally, I 'm really curious to find out what caused that: is it a change in a file, or a change into github pages infrastructure..?

If I can help, i'm here, I love pnpm team 's work! <3

@Jean-Baptiste-Lasselle
Copy link
Author

Jean-Baptiste-Lasselle commented Aug 30, 2023

Just want to share a thought about a point relating this isue, and CI/CD Design patterns.

  • Here, the CI/CD I work with, which detected the issue:
    • includes a pipeline which execute a task in an "executor" in my case, in many cases among my colleagues, a container.
    • when each task is executed, the container image is pulled, an instance is started, abd in that instance commands toinstall pnpm are excuted
  • a better practice and improvement planned is to build container images with pnpm already installed into it:
    • then that error is detected by my pipeline which builds the container image,
    • and my pipeline runs faster

In other words, please be true, In other words, The CICD System infrastructure has to be immutable.

@zkochan
Copy link
Member

zkochan commented Nov 21, 2023

This was an issue on Cloudflare side. It should've been resolved by now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants