Skip to content

tsup build hangs with ubuntu-latest #980

@jkazimierczak

Description

@jkazimierczak

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions