Skip to content

Commit 025f636

Browse files
committed
ci(perf): build PR-branch images before lineage perf run
The lineage_perf workflow_dispatch path was pulling the published `acryldata/...:quickstart` images, so it benchmarked whatever code happened to be on master at last release — not the PR. That made the screenshot stress test fail (missing CSP fix in application.conf) and produced perf numbers that didn't reflect the virtualization / overscan changes in this branch. When lineage_perf=true the job now: 1. Derives a tag from GITHUB_REF via docker_helpers.sh. 2. Runs `:docker:buildImagesQuickstart` with the GitHub buildx cache, tagging the built images as `acryldata/<image>:<tag>` locally. 3. Passes the same tag as DATAHUB_VERSION to run-quickstart.sh so compose resolves the PR-built images instead of pulling. Default (non-perf) runs are unchanged — they still pull `:quickstart`. Job timeout bumped from 60 to 90 minutes to cover the build (~25–30m cold, faster with cache) on top of the existing 25–30m perf matrix. Build step has its own 45m timeout so a hung build can't consume the whole job.
1 parent df5729d commit 025f636

1 file changed

Lines changed: 51 additions & 4 deletions

File tree

.github/workflows/playwright-e2e-tests.yml

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ concurrency:
3434

3535
env:
3636
PROFILE_NAME: "${{ github.event.inputs.profileName || 'quickstart-consumers' }}"
37+
# Matches docker-unified.yml so PR-branch builds produce `acryldata/...:<tag>`
38+
# images locally, which compose then resolves via DATAHUB_REPO=acryldata.
39+
DOCKER_REGISTRY: "acryldata"
3740

3841
permissions:
3942
contents: read
@@ -110,9 +113,10 @@ jobs:
110113
name: Playwright E2E (Shard ${{ matrix.shard }}/${{ matrix.shard_count }})
111114
runs-on: ${{ needs.setup.outputs.test_runner_type }}
112115
needs: [setup]
113-
# Perf runs include the 1000-node screenshot stress and CLL matrix when
114-
# opted into; default 20m isn't enough headroom for those.
115-
timeout-minutes: ${{ github.event.inputs.lineage_perf == 'true' && 60 || 20 }}
116+
# Perf runs build PR-branch images from source (~25–30m on a cold runner)
117+
# and include the 1000-node screenshot stress + CLL matrix; default 20m
118+
# isn't enough headroom for those.
119+
timeout-minutes: ${{ github.event.inputs.lineage_perf == 'true' && 90 || 20 }}
116120
strategy:
117121
fail-fast: false
118122
matrix: ${{ fromJson(needs.setup.outputs.matrix || '{"include":[]}') }}
@@ -146,11 +150,54 @@ jobs:
146150
with:
147151
node-version: "22"
148152

153+
# ---------------------------------------------------------------------
154+
# Lineage perf path: build images from the PR branch so the benchmark
155+
# actually exercises PR code (CSP fix, virtualization, feature flags,
156+
# etc.) rather than the published `acryldata/...:quickstart` images.
157+
# ---------------------------------------------------------------------
158+
- name: Compute PR build tag
159+
id: build-meta
160+
if: ${{ github.event.inputs.lineage_perf == 'true' }}
161+
run: |
162+
# docker_helpers.sh derives a tag from GITHUB_REF (set automatically
163+
# for workflow_dispatch on the PR branch). Output it so downstream
164+
# steps can reuse the value for both build and compose.
165+
source .github/scripts/docker_helpers.sh
166+
{
167+
echo "tag=$(get_tag)"
168+
echo "python_release_version=$(get_python_docker_release_v)"
169+
} >> "$GITHUB_OUTPUT"
170+
171+
- name: Build PR-branch images for perf run
172+
if: ${{ github.event.inputs.lineage_perf == 'true' }}
173+
# ~25–30m fresh on a 4-core runner; gradle/docker buildx caches keep
174+
# repeat runs faster. Bounded so a hung build can't eat the whole job.
175+
timeout-minutes: 45
176+
env:
177+
# buildImagesQuickstart switches between depot and github buildx
178+
# cache via $DOCKER_CACHE; we don't have depot access on community
179+
# PRs, so force the github buildx cache path.
180+
DOCKER_CACHE: GITHUB
181+
PERF_BUILD_TAG: ${{ steps.build-meta.outputs.tag }}
182+
PERF_PYTHON_VERSION: ${{ steps.build-meta.outputs.python_release_version }}
183+
run: |
184+
./gradlew :docker:buildImagesQuickstart \
185+
-Ptag="$PERF_BUILD_TAG" \
186+
-PpythonDockerVersion="$PERF_PYTHON_VERSION" \
187+
-PdockerRegistry="$DOCKER_REGISTRY"
188+
echo "::group::Built images"
189+
docker images | grep "^${DOCKER_REGISTRY}/" || true
190+
echo "::endgroup::"
191+
149192
- name: Run quickstart
150193
env:
151194
DATAHUB_TELEMETRY_ENABLED: false
152195
DATAHUB_REPO: acryldata
153-
DATAHUB_VERSION: quickstart
196+
# When lineage_perf=true the previous step built local images tagged
197+
# `acryldata/<image>:<PR-tag>`; compose looks them up via the same
198+
# tag so the benchmark runs against PR code. Otherwise fall back to
199+
# the published `quickstart` floating tag.
200+
DATAHUB_VERSION: ${{ steps.build-meta.outputs.tag || 'quickstart' }}
154201
ACTIONS_EXTRA_PACKAGES: "acryl-datahub-actions[executor] acryl-datahub-actions"
155202
ACTIONS_CONFIG: "https://raw.githubusercontent.com/acryldata/datahub-actions/main/docker/config/executor.yaml"
156203
run: ./smoke-test/run-quickstart.sh

0 commit comments

Comments
 (0)