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

Setup Bun Action Fails Due to Request Timeout #82

Closed
azishio opened this issue Jun 2, 2024 · 15 comments
Closed

Setup Bun Action Fails Due to Request Timeout #82

azishio opened this issue Jun 2, 2024 · 15 comments
Labels
bug Something isn't working

Comments

@azishio
Copy link

azishio commented Jun 2, 2024

Workaround

(Edited by @Jarred-Sumner)

      - name: Setup Bun
        uses: oven-sh/[email protected]
        with:
          bun-download-url: "https://github.com/oven-sh/bun/releases/latest/download/bun-${{runner.os == 'macOS' && 'darwin' || runner.os}}-${{ runner.arch == 'X64' && 'x64' || 'arm64' }}.zip"

The bun-download-url input lets you override the download URL to use and skip the redirect / version resolution.


Description

I'm using oven-sh/setup-bun@v1 in my GitHub Actions workflow to deploy a Next.js site to GitHub Pages. This action used to work without issues, but today I encountered repeated request timeouts when trying to download Bun.

Console Output

Here is the relevant part of the console output:

Run oven-sh/setup-bun@v1
  with:
    bun-version: latest
    no-cache: false
Downloading a new version of Bun: https://bun.sh/download/latest/linux/x64?avx2=true&profile=false
Request timeout: /download/latest/linux/x64?avx2=true&profile=false
Waiting 18 seconds before trying again
Request timeout: /download/latest/linux/x64?avx2=true&profile=false
Waiting 20 seconds before trying again

Workflow File

Below is the workflow file I'm using:

name: Deploy Next.js site to Pages

on:
  push:
    branches: ["main"]
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: "pages"
  cancel-in-progress: false

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Setup Bun
        uses: oven-sh/setup-bun@v1
        with:
          bun-version: latest
      - name: Setup Pages
        uses: actions/configure-pages@v5
        with:
          static_site_generator: next
      - name: Restore cache
        uses: actions/cache@v4
        with:
          path: |
            .next/cache
          key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
          restore-keys: |
            ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
      - name: Install dependencies
        run: bun install
      - name: Build with Next.js
        run: bun run build
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v3
        with:
          path: ./out

  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4

(This text has been translated from Japanese by ChatGPT and DeepL)

@nephix
Copy link

nephix commented Jun 2, 2024

Same here

@Jarred-Sumner
Copy link
Contributor

Looking into this now.

@hmmhmmhm
Copy link

hmmhmmhm commented Jun 2, 2024

스크린샷 2024-06-02 오후 7 09 36

I'm getting the same error. I've posted the above issue on Bun's official discord.
https://discord.com/channels/876711213126520882/1246770196992229428

@Jarred-Sumner
Copy link
Contributor

Jarred-Sumner commented Jun 2, 2024

It seems that Fly.io is having an incident in their Bucharest region, which is also where this redirecting app is currently hosted. Looking into migrating to a different region.

Workaround to try:

      - name: Setup Bun
        uses: oven-sh/setup-bun@1
        with:
          bun-download-url: "https://github.com/oven-sh/bun/releases/latest/download/bun-${{runner.os == 'macOS' && 'darwin' || runner.os}}-${{ runner.arch == 'X64' && 'x64' || 'arm64' }}.zip"

The bun-download-url input lets you override the download URL to use and skip the redirect / version resolution.

@hmmhmmhm
Copy link

hmmhmmhm commented Jun 2, 2024

스크린샷 2024-06-02 오후 7 38 04 스크린샷 2024-06-02 오후 7 39 03 스크린샷 2024-06-02 오후 7 39 45

@Jarred-Sumner The alternative you provided doesn't seem to be working yet.

azishio added a commit to azishio/seismic-response-web that referenced this issue Jun 2, 2024
@Jarred-Sumner
Copy link
Contributor

Looks like bun-download-url is not included in actions.yml, I will push an update.

customUrl: getInput("bun-download-url") || undefined,

@azishio
Copy link
Author

azishio commented Jun 2, 2024

Warnings occurred, but @Jarred-Sumner 's measures enabled him to deploy the system successfully.

Setup Bun

Warning: Unexpected input(s) 'bun-download-url', valid inputs are ['bun-version', 'registry-url', 'scope', 'no-cache']
Run oven-sh/setup-bun@v1
  with:
    bun-version: latest
    bun-download-url: https://github.com/oven-sh/bun/releases/latest/download/bun-Linux-x64.zip
    no-cache: false
Downloading a new version of Bun: https://github.com/oven-sh/bun/releases/latest/download/bun-Linux-x64.zip
/usr/bin/unzip -o -q /home/runner/work/_temp/4ec6c1ca-ad97-44f5-8f04-7df9db8903dc
/home/runner/.bun/bin/bun --revision
1.1.1[2](https://github.com/azishio/seismic-response-web/actions/runs/9337673936/job/25699852379#step:3:2)+43f0913c3

Post Setup Bun

Warning: Unexpected input(s) 'bun-download-url', valid inputs are ['bun-version', 'registry-url', 'scope', 'no-cache']
Post job cleanup.

https://github.com/azishio/seismic-response-web/actions/runs/9337673936

(By the way, the inclusion of my project's commits in this history was an unintended behaviour.
Next time I'll look into how not to do that and run the commits.)

@hmmhmmhm
Copy link

hmmhmmhm commented Jun 2, 2024

Warnings occurred, but @Jarred-Sumner 's measures enabled him to deploy the system successfully.

https://github.com/azishio/seismic-response-web/actions/runs/9337673936

스크린샷 2024-06-02 오후 7 55 18

Thx bro! this is work!

- name: Setup Bun
  uses: oven-sh/setup-bun@v1
  with:
    bun-version: latest
    bun-download-url: "https://github.com/oven-sh/bun/releases/latest/download/bun-${{runner.os == 'macOS' && 'darwin' || runner.os}}-${{ runner.arch == 'X64' && 'x64' || 'arm64' }}.zip"

@azishio
Copy link
Author

azishio commented Jun 2, 2024

However, the warnings seem to say that the bun-download-url is not valid. Why did it work?

@Jarred-Sumner
Copy link
Contributor

@azishio I have just released an update which adds the bun-download-url input to the action

@azishio
Copy link
Author

azishio commented Jun 2, 2024

Understood.
Thank you @Jarred-Sumner for your quick work.

I would like to close the issue as I believe our problem has now been resolved.

@azishio azishio closed this as completed Jun 2, 2024
@iM-GeeKy
Copy link

iM-GeeKy commented Jun 2, 2024

Is this resolved? I'm using

- uses: oven-sh/setup-bun@v1
  with:
    bun-version: latest

and it still appears to be hanging

Screenshot 2024-06-02 at 7 15 40 AM

@azishio
Copy link
Author

azishio commented Jun 2, 2024

Ah, the method provided by @Jarred-Sumner solved the problem, but it may fail if you don't override the URL.

I shouldn't have closed the Issue until a series of issues had been reported.

Apologies.

Reopen this Issue until those issues are reported.

@azishio azishio reopened this Jun 2, 2024
@alator21
Copy link

alator21 commented Jun 2, 2024

My last workflow just worked. I think flyio resolved their issues

@azishio
Copy link
Author

azishio commented Jun 2, 2024

Yes, I also removed the 'bun-download-url' and confirmed it works fine.

Screenshot_20240602-214558~2

Now that the issue has been resolved, I close this one this time.

@azishio azishio closed this as completed Jun 2, 2024
@xhyrom xhyrom added the bug Something isn't working label Jun 3, 2024
@xhyrom xhyrom pinned this issue Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants