Skip to content

tsup build hangs with ubuntu-latest #980

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

Closed
2 of 13 tasks
jkazimierczak opened this issue Mar 6, 2024 · 4 comments
Closed
2 of 13 tasks

tsup build hangs with ubuntu-latest #980

jkazimierczak opened this issue Mar 6, 2024 · 4 comments
Assignees

Comments

@jkazimierczak
Copy link

jkazimierczak commented Mar 6, 2024

Description

Issue Summary

Since my build test job started to fail randomly since this week began, I investigated it and found out that:

  • when it uses ubuntu-latest version 20240304.1.0 it hangs in place,
  • when it uses ubuntu-latets version 20240225.1.0 it works just fine.

The build is pretty simple and takes usually no longer than 10 seconds, if not even less. It's triggered by running nx, which first runs build dependency. Here's an example of a job that I had to stop, as it hang for 40 minutes:

https://github.com/jkazimierczak/quizcamp/actions/runs/8165348642/job/22322341581?pr=34

Of course build and tests pass if it's run locally. It never failed with the previous version of the runner.

Important distinction - it's not the Build step which fails, but rather the tsup bulid inside of Run tests action's step:

image

Environment

Failing runner image:

Image: ubuntu-22.04
Version: 20240304.1.0

Succeeding runner image:

Image: ubuntu-22.04
Version: 20240225.1.0

System info - same for both:

Current runner version: '2.314.1'

Operating System
  Ubuntu
  22.04.4
  LTS

Runner Image Provisioner
  2.0.359.1

Repository & Workflow Files

Affected repository: https://github.com/jkazimierczak/quizcamp
Affected workflow file: https://github.com/jkazimierczak/quizcamp/actions/runs/8165348642/workflow

test.yml:

name: Tests

on:
  push:
    branches:
      - main
  pull_request:
    branches: ["*"]

jobs:
  unit-tests:
    name: Run unit tests
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Build
        uses: ./.github/actions/build

      - name: Run tests
        run: pnpm test

./.github/actions/build:

name: "Build"

description: "Sets up repository"

runs:
  using: "composite"
  steps:
    - name: Check out source code
      uses: actions/checkout@v4

    - name: Set up pnpm
      uses: pnpm/action-setup@v2
      with:
        version: latest

    - name: Install Node.js
      uses: actions/setup-node@v4
      with:
        node-version: "20.11.0"
        cache: "pnpm"

    - name: Install dependencies
      shell: bash
      run: pnpm install

Additional context

I'm making my repository public for the time of this bug report. Feel free to fork the repo.

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

20240304.1.0

https://github.com/jkazimierczak/quizcamp/actions/runs/8165348642/job/22322341581?pr=34

Is it regression?

https://github.com/jkazimierczak/quizcamp/actions/runs/8165278837/job/22322151833

Expected behavior

test action works and succeeds, just how it succeeded prior to update, with ubuntu-latest version 20240225.1.0.

Actual behavior

test runs, but halts at the build step of tsup. From there it never ends and has to be terminated manually and potentially restarted multiple times for the CI to pass.

Repro steps

  1. Fork the repository.
  2. Trigger any change to pickup.
  3. If Run unit tests action is run with ubuntu-latest version 20240304.1.0, see if it succeeds past the tsup build command.
@erik-bershel
Copy link

Hey @jkazimierczak!
Sorry to hear that. Thank you very much for the detailed description of the problem and examples - this will simplify the investigation. We will try to collect more information about the reasons and will return a little later with an answer.

@mikhailkoliada mikhailkoliada transferred this issue from actions/runner-images Mar 6, 2024
@mikhailkoliada
Copy link

Tranferring to setup-node as it does not seem to be image-connected

@actions actions deleted a comment Mar 7, 2024
@priyagupta108
Copy link
Contributor

priyagupta108 commented Mar 22, 2024

Hello @jkazimierczak! 👋 ,
Based on the details provided, it appears the setup-node action is correctly setting up Node.js version 20.11.0 as specified in your ./.github/actions/build workflow file.
The problem seems to occur later, during the Run tests step, which is independent of the setup-node action. There could be several possible reasons for this, including a bug in the test itself, a problem with the environment, or an issue with the dependencies. It might be helpful to investigate these areas.
Please feel free to reach us out incase of any concerns. Thank you!

@jkazimierczak
Copy link
Author

Hello @priyagupta108!

That's correct, although it started only after the runner was at the version of 20240304.1.0. At the time of opening the issue I haven't updated any of my dependencies, nor configs. I also run all of the checks locally before pushing, so I doubt that it was something wrong with the project environment itself. The only thing that changed was the version of the runner, thus I though that might be the cause.

After the runner was updated from 20240304.1.0 to newer version (such as 20240317.1.0), it hasn't happened again. I'm self-closing this for now, as this seemed like a momentary problem with the past version of runner, which probably won't be investigated further.

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

4 participants