From e070627a5f1add36ec1669a7474bd00da50f167a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Wed, 12 Aug 2026 13:22:13 +0200 Subject: [PATCH] NO-JIRA: fix(ci): build Playwright browser-tests image on rhoai-3.4 Backport the browser-tests-image step from opendatahub-io/notebooks#4096 so codeserver Playwright runs pass the required playwright-image input. Without it PLAYWRIGHT_IMAGE is empty and podman inspect fails with a Go JSON unmarshalling error. Co-authored-by: Cursor --- .../workflows/build-notebooks-TEMPLATE.yaml | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-notebooks-TEMPLATE.yaml b/.github/workflows/build-notebooks-TEMPLATE.yaml index e8eef2fcc3..fa9c5156e1 100644 --- a/.github/workflows/build-notebooks-TEMPLATE.yaml +++ b/.github/workflows/build-notebooks-TEMPLATE.yaml @@ -633,14 +633,35 @@ jobs: # https://playwright.dev/docs/ci # https://playwright.dev/docs/docker # opendatahub-io/notebooks#3965: podman storage is configured to have sufficient disk space - - name: Run Playwright tests + # Build the same image as .github/workflows/build-browser-tests.yaml so codeserver + # Playwright runs use baked-in deps (pnpm + Playwright) from tests/browser/Dockerfile. + # Backport of opendatahub-io/notebooks#4096: playwright-test requires playwright-image; + # without this step PLAYWRIGHT_IMAGE is empty and `podman inspect ''` fails with + # "json: cannot unmarshal array into Go value of type define.InspectContainerData". + - name: Build browser tests image + id: browser-tests-image if: ${{ !cancelled() && contains(inputs.target, 'codeserver') && steps.make-target.outcome == 'success' }} + run: | + set -Eeuxo pipefail + IMAGE="localhost/workbench-images-tests:ci" + PLAYWRIGHT_VERSION=$(python3 scripts/get_playwright_version.py tests/browser/package.json5) + podman build \ + --build-arg "PLAYWRIGHT_VERSION=${PLAYWRIGHT_VERSION}" \ + -t "${IMAGE}" \ + -f tests/browser/Dockerfile \ + tests/browser + echo "image=${IMAGE}" >> "$GITHUB_OUTPUT" + + - name: Run Playwright tests + if: ${{ !cancelled() && contains(inputs.target, 'codeserver') && steps.make-target.outcome == 'success' && steps.browser-tests-image.outcome == 'success' }} uses: ./.github/actions/playwright-test with: test-target: ${{ steps.calculated_vars.outputs.OUTPUT_IMAGE }} + playwright-image: ${{ steps.browser-tests-image.outputs.image }} podman-socket: /var/run/podman/podman.sock upload-report: ${{ fromJson(inputs.github).event_name == 'pull_request' }} artifact-name: "${{ inputs.target }}_${{ steps.calculated_vars.outputs.BUILD_TYPE }}_${{ steps.calculated_vars.outputs.SANITIZED_PLATFORM }}_playwright-report" + junit-artifact-file: "${{ inputs.target }}_${{ steps.calculated_vars.outputs.BUILD_TYPE }}_${{ steps.calculated_vars.outputs.SANITIZED_PLATFORM }}_playwright-junit.xml" grep-pattern: '@codeserver' # endregion