From f4ff5cfb02339cab48238f0621ba4fdbc3e3bdd2 Mon Sep 17 00:00:00 2001 From: philippe Date: Thu, 18 Jun 2026 11:44:43 -0400 Subject: [PATCH 1/3] fix dependabot report --- .github/workflows/post-test-status.yml | 7 +++++-- .github/workflows/testing.yml | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/post-test-status.yml b/.github/workflows/post-test-status.yml index 5f7ec4a3a4..956eb47a11 100644 --- a/.github/workflows/post-test-status.yml +++ b/.github/workflows/post-test-status.yml @@ -68,10 +68,13 @@ jobs: test-report: name: Consolidated Test Report (Fork PR) runs-on: ubuntu-latest - # Only run for fork PRs (non-fork PRs are handled in the main workflow) + # Run for fork PRs and Dependabot PRs. Both run with a read-only + # GITHUB_TOKEN in the main workflow, so the check run is created here in the + # base-repo context instead. Other same-repo PRs are handled in the main workflow. if: | github.event.workflow_run.event == 'pull_request' && - github.event.workflow_run.head_repository.full_name != github.repository + (github.event.workflow_run.head_repository.full_name != github.repository || + github.event.workflow_run.actor.login == 'dependabot[bot]') permissions: checks: write actions: read diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 2359695404..7cc2a0e395 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -1093,8 +1093,9 @@ jobs: - name: Publish Test Report uses: dorny/test-reporter@v1 - # Skip for fork PRs - handled by post-test-status.yml workflow_run - if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) + # Skip for fork PRs and Dependabot PRs - both run with a read-only + # GITHUB_TOKEN, so they're handled by post-test-status.yml workflow_run. + if: always() && (github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')) with: name: Test Results Summary path: 'test-results/**/*.xml' From a8e3b553ca846478635b0ddcf2297c603ded9a47 Mon Sep 17 00:00:00 2001 From: philippe Date: Thu, 18 Jun 2026 12:19:59 -0400 Subject: [PATCH 2/3] fix percy --- .github/workflows/testing.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 7cc2a0e395..100a365fed 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -620,6 +620,14 @@ jobs: PERCY_TOKEN: ${{ matrix.python-version == '3.12' && secrets.PERCY_TOKEN || '' }} PERCY_ENABLE: ${{ matrix.python-version == '3.12' && '1' || '0' }} PERCY_PARALLEL_TOTAL: -1 + # Pin the build identity so every shard joins the same parallel build and + # Percy links it to the PR. Auto-detection otherwise uses the ephemeral + # merge SHA (refs/pull/N/merge), so the build never shows up on the PR. + PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_attempt }} + PERCY_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} + PERCY_BRANCH: ${{ github.head_ref || github.ref_name }} + PERCY_PULL_REQUEST: ${{ github.event.pull_request.number }} + PERCY_TARGET_BRANCH: ${{ github.base_ref }} steps: - name: Checkout repository @@ -713,6 +721,14 @@ jobs: PERCY_TOKEN: ${{ matrix.python-version == '3.12' && secrets.PERCY_TOKEN || '' }} PERCY_ENABLE: ${{ matrix.python-version == '3.12' && '1' || '0' }} PERCY_PARALLEL_TOTAL: -1 + # Pin the build identity so every shard joins the same parallel build and + # Percy links it to the PR. Auto-detection otherwise uses the ephemeral + # merge SHA (refs/pull/N/merge), so the build never shows up on the PR. + PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_attempt }} + PERCY_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} + PERCY_BRANCH: ${{ github.head_ref || github.ref_name }} + PERCY_PULL_REQUEST: ${{ github.event.pull_request.number }} + PERCY_TARGET_BRANCH: ${{ github.base_ref }} steps: - name: Checkout repository @@ -899,6 +915,14 @@ jobs: PERCY_TOKEN: ${{ matrix.python-version == '3.12' && secrets.PERCY_TOKEN || '' }} PERCY_ENABLE: ${{ matrix.python-version == '3.12' && '1' || '0' }} PERCY_PARALLEL_TOTAL: -1 + # Pin the build identity so every shard joins the same parallel build and + # Percy links it to the PR. Auto-detection otherwise uses the ephemeral + # merge SHA (refs/pull/N/merge), so the build never shows up on the PR. + PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_attempt }} + PERCY_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} + PERCY_BRANCH: ${{ github.head_ref || github.ref_name }} + PERCY_PULL_REQUEST: ${{ github.event.pull_request.number }} + PERCY_TARGET_BRANCH: ${{ github.base_ref }} steps: - name: Checkout repository @@ -1056,6 +1080,13 @@ jobs: if: always() env: PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} + # Must match the snapshot jobs so finalize targets the same parallel build + # and the result is attached to the PR head commit, not the merge SHA. + PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_attempt }} + PERCY_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} + PERCY_BRANCH: ${{ github.head_ref || github.ref_name }} + PERCY_PULL_REQUEST: ${{ github.event.pull_request.number }} + PERCY_TARGET_BRANCH: ${{ github.base_ref }} steps: - name: Finalize Main Percy Build if: | From 37432d304c506a771ba9a1c57bfd8d0457c6a2df Mon Sep 17 00:00:00 2001 From: philippe Date: Thu, 18 Jun 2026 13:26:05 -0400 Subject: [PATCH 3/3] try fix percy --- .github/actions/percy-exec/action.yml | 18 +++++++++++++++++- .github/workflows/testing.yml | 4 ++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/actions/percy-exec/action.yml b/.github/actions/percy-exec/action.yml index 9dbe11bad1..e1c25d5a7d 100644 --- a/.github/actions/percy-exec/action.yml +++ b/.github/actions/percy-exec/action.yml @@ -13,6 +13,10 @@ inputs: description: 'Working directory for the command' required: false default: '.' + browser-executable: + description: 'Path to a Chrome/Chromium binary for Percy to use. Defaults to the one found on PATH.' + required: false + default: '' runs: using: 'composite' @@ -23,7 +27,19 @@ runs: working-directory: ${{ inputs.working-directory }} env: PERCY_TOKEN: ${{ inputs.percy-token }} - run: npx percy exec -- ${{ inputs.command }} + PERCY_BROWSER_EXECUTABLE: ${{ inputs.browser-executable }} + run: | + # Percy otherwise downloads its own Chromium from storage.googleapis.com + # on the first snapshot. That download stalls in CI, which blocks the + # synchronous percy_snapshot() calls (so pytest never finishes and writes + # no JUnit) and leaves an empty Percy build with no snapshots. Point Percy + # at the Chrome already installed in the job so it skips the download. + if [ -z "${PERCY_BROWSER_EXECUTABLE:-}" ]; then + PERCY_BROWSER_EXECUTABLE="$(command -v google-chrome || command -v google-chrome-stable || command -v chrome || command -v chromium || command -v chromium-browser || true)" + export PERCY_BROWSER_EXECUTABLE + fi + echo "PERCY_BROWSER_EXECUTABLE=${PERCY_BROWSER_EXECUTABLE:-}" + npx percy exec -- ${{ inputs.command }} - name: Run without Percy (fork PR) if: inputs.percy-token == '' diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 100a365fed..9a43c3f195 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -662,6 +662,7 @@ jobs: find packages -name dash-*.whl -print -exec sh -c 'pip install "{}[ci,testing,dev,celery,diskcache]"' \; - name: Setup Chrome and ChromeDriver + id: setup-chrome uses: browser-actions/setup-chrome@v1 with: chrome-version: stable @@ -686,6 +687,7 @@ jobs: with: command: pytest --headless --nopercyfinalize --junitxml=test-reports/junit_intg.xml tests/integration --splits 3 --group ${{ matrix.test-group }} percy-token: ${{ secrets.PERCY_TOKEN }} + browser-executable: ${{ steps.setup-chrome.outputs.chrome-path }} - name: Upload test results if: always() @@ -763,6 +765,7 @@ jobs: find packages -name dash-*.whl -print -exec sh -c 'pip install "{}[ci,testing,dev]"' \; - name: Setup Chrome and ChromeDriver + id: setup-chrome uses: browser-actions/setup-chrome@v1 with: chrome-version: stable @@ -789,6 +792,7 @@ jobs: with: command: pytest --headless --nopercyfinalize --junitxml=test-reports/junit_html.xml percy-token: ${{ secrets.PERCY_TOKEN }} + browser-executable: ${{ steps.setup-chrome.outputs.chrome-path }} working-directory: components/dash-html-components - name: Upload test results