Skip to content

Bug: Orb doesn't work on a Playwright base image #25

@acsbendi

Description

@acsbendi

Is there an existing issue for this?

  • I have searched the existing issues

Orb version

No response

Current behavior

The recommended way to run Playwright integration tests on CircleCI is to use the official Playwright Docker image. However, this image doesn't contain xz-utils and trying to use the qlty orb here fails:

error: xz is required to install qlty

Installing xz-utils manually also doesn't always work, due to errors like this:

Err:1 http://security.ubuntu.com/ubuntu noble-updates/main amd64 xz-utils amd64 5.6.1+really5.4.5-1ubuntu0.2
  Connection failed [IP: 185.125.190.83 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/x/xz-utils/xz-utils_5.6.1%2breally5.4.5-1ubuntu0.2_amd64.deb  Connection failed [IP: 185.125.190.83 80]

and even when it does work, it's very slow (4+ minutes).

The only current workaround is to force HTTPS requests:

      - run:
          name: Install xz-utils (for qlty)
          command: |
            sed -i 's|http://archive.ubuntu.com|https://mirror.math.princeton.edu/pub/ubuntu|g' /etc/apt/sources.list
            sed -i 's|http://security.ubuntu.com|https://security.ubuntu.com|g' /etc/apt/sources.list
            apt-get update
            apt-get install -y xz-utils

If nothing else works, this can probably be included in the orb itself.

Minimum reproduction config

version: 2.1
orbs:
  qlty: qltysh/[email protected]

workflows:
  build_workflow:
    jobs:
      - test:
          name: run_linting_and_tests

jobs:
  test:
    working_directory: ~/repo
    docker:
      - image: mcr.microsoft.com/playwright:v1.54.2
    environment:
      # Project-specific qlty token for code coverage
      QLTY_COVERAGE_TOKEN: <some-token>
    resource_class: large
    steps:
      - checkout
      - run:
          name: Update npm
          command: 'npm install -g npm@latest'
      - restore_cache:
          key: dependency-cache-{{ checksum "package-lock.json" }}
      - run:
          name: Install dependencies
          command: 'npm install --legacy-peer-deps'
      - save_cache:
          key: dependency-cache-{{ checksum "package-lock.json" }}
          paths:
            - ./node_modules
      - run:
          name: Linting
          command: npm run lint
      - run:
          name: Tests
          command: npm test
          environment:
            NODE_OPTIONS: --max-old-space-size=8192
      - qlty/coverage_publish:
          files: ./coverage/lcov.info
          tag: integration-tests

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions