Git Product home page Git Product logo

Comments (20)

zkochan avatar zkochan commented on May 26, 2024 2

how does changing fetch's url and checking response's body can help to prevent server responding false js file?

changing the URL is unrelated. It was just an old version, so I updated it.

The fix is in using @fetch/retry. When this issue happens, the HTTP response is a 500. @fetch/retry retries the request in this case.

from action-setup.

zkochan avatar zkochan commented on May 26, 2024 2

I have also configured cloudflare caching, so I don't think this will happen again

pnpm/get.pnpm.io@08d49fa

from action-setup.

zkochan avatar zkochan commented on May 26, 2024 2

Can't we just commit that file to this repository?

from action-setup.

zkochan avatar zkochan commented on May 26, 2024 2

🚢 2.2.2

from action-setup.

KSXGitHub avatar KSXGitHub commented on May 26, 2024 1

We run multiple jobs in parallel so now I suspect we're being ratelimited by the jobs starting in parallel that all download pnpm.js

I tried downloading multiple pnpm.js concurrently (30 requests) but all of them were valid JavaScript files.

Anyway, I will leave this issue open for a month or two. If there is a problem, let me know.

from action-setup.

gaggle avatar gaggle commented on May 26, 2024

Mm.. just got more failing pipelines, same as the error reported here. Maybe it's not random request/response errors if they occur so close together… could the endpoint be rate-limited? If response headers indicate when another request is allowed this action could delay until that time?

I assume the file itself cannot be cached locally to this action? It's not like it needs to re-download it every time if it was last fetched by another CI run a few minutes ago… but I'm not really sure what's possible in the GitHub Actions infrastructure.

from action-setup.

gaggle avatar gaggle commented on May 26, 2024

We run multiple jobs in parallel so now I suspect we're being ratelimited by the jobs starting in parallel that all download pnpm.js. Do you foresee a way to share the downloaded artifact for the whole CI job? I'm considering ways to download it once when the pipeline starts and somehow sharing the file-location with pnpm/action-setup.

I can help work on a PR, but looking to align w. maintainers before I go too crazy.

from action-setup.

KSXGitHub avatar KSXGitHub commented on May 26, 2024

Are you using the latest version of pnpm/action-setup?

from action-setup.

gaggle avatar gaggle commented on May 26, 2024

Sorry I should have included that information, yes here's the pipeline snippet:

      - uses: pnpm/action-setup@v2
        with:
          version: ${{ env.pnpm-version }}
          run_install: |
            - recursive: true
              args: [--frozen-lockfile, --filter "${{ matrix.package }}..."]

That snippet sits inside a matrix that currently ramps up to 27 parallel jobs.

from action-setup.

KSXGitHub avatar KSXGitHub commented on May 26, 2024

v2 is actually outdated. Use tag v2.0.1 instead. If you want to be up-to-date, just use dependabot.

from action-setup.

gaggle avatar gaggle commented on May 26, 2024

Yikes okay, thanks change.

from action-setup.

gaggle avatar gaggle commented on May 26, 2024

Thanks. If we see it again with the latest version we're discussing a fork to introduce additional debug information, and if the smoking gun points to the downlading of pnpm.js then we could introduce caching of it. But we'll wait and see too 👍

from action-setup.

bkniffler avatar bkniffler commented on May 26, 2024

Just got the same issue with

- uses: pnpm/[email protected]
        with:
          version: 6.0.2
          run_install: true

Bildschirmfoto 2021-12-15 um 13 28 48

from action-setup.

hikariNTU avatar hikariNTU commented on May 26, 2024

Same issue in Github matrix actions:

Run pnpm/[email protected]
  with:
    version: latest
    dest: ~/setup-pnpm
    run_install: null
  env:
    NPM_CONFIG_USERCONFIG: /home/runner/work/_temp/.npmrc
    NODE_AUTH_TOKEN: XXXXX-XXXXX-XXXXX-XXXXX
Running self-installer...
  [stdin]:1
  <HTML>
  ^
  
  SyntaxError: Unexpected token '<'
      at new Script (vm.js:84:7)
      at createScript (vm.js:258:10)
      at Object.runInThisContext (vm.js:306:10)
      at Object.<anonymous> ([stdin]-wrapper:9:26)
      at Module._compile (internal/modules/cjs/loader.js:959:30)
      at evalScript (internal/process/execution.js:80:25)
      at internal/main/eval_stdin.js:29:5
      at Socket.<anonymous> (internal/process/execution.js:192:5)
      at Socket.emit (events.js:215:7)
      at endReadableNT (_stream_readable.js:1184:12)
Error: Something went wrong, self-installer exits with code 1
Installation Completed!

We also set npmrc before installing pnpm:

Run actions/setup-node@v2
  with:
    node-version: 16.x
    registry-url: https://npm.pkg.github.com
    scope: ***
    always-auth: false
    check-latest: false
    token: ***
Found in cache @ /opt/hostedtoolcache/node/16.13.2/x64

But these setting should not be a problem.

And these actions only fail in an action
image

We will try to combine these actions together to make sure this is not rate limit problem later on.

from action-setup.

razbensimon avatar razbensimon commented on May 26, 2024

Still happens to us on version 2.1.0. Any suggestions?
this is our usage:

- name: setup pnpm
        uses: pnpm/[email protected]
        with:
          version: 6.16.0

from action-setup.

zkochan avatar zkochan commented on May 26, 2024

maybe we should add some retries.

from action-setup.

hikariNTU avatar hikariNTU commented on May 26, 2024

@zkochan Can you elaborate more about this PR?
I don't know how does changing fetch's url and checking response's body can help to prevent server responding false js file?

from action-setup.

DennisChungTW avatar DennisChungTW commented on May 26, 2024

I see, pnpm fetch utils seems dealing with falsy response with retry.

from action-setup.

meteorlxy avatar meteorlxy commented on May 26, 2024

Still ran into this issue today.

workflow log

image

from action-setup.

dominikg avatar dominikg commented on May 26, 2024

got a hit for this as well today: https://github.com/sveltejs/kit/runs/6599932579?check_suite_focus=true#step:4:14

given https://get.pnpm.io/install.sh exists, could this action embed (not download!) this shell script or an equivalent js implementation to download straight from npm registry instead?

that way it would no longer depend on availability of pnpm.io

from action-setup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.