Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions .github/workflows/ci-tests-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
outputs:
should-run: ${{ steps.changes.outputs.should-run }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- id: changes
uses: ./.github/actions/changes-filter

Expand All @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup frontend
uses: ./.github/actions/setup-frontend
with:
Expand All @@ -41,7 +41,7 @@ jobs:

# Upload only built dist/ (containerized test jobs will pnpm install without cache)
- name: Upload built frontend
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: frontend-dist
path: dist/
Expand Down Expand Up @@ -70,9 +70,9 @@ jobs:
shardTotal: [16]
steps:
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Download built frontend
uses: actions/download-artifact@v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: frontend-dist
path: dist/
Expand All @@ -92,7 +92,7 @@ jobs:
COLLECT_COVERAGE: 'true'

- name: Upload blob report
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: ${{ !cancelled() }}
with:
name: blob-report-chromium-${{ matrix.shardIndex }}
Expand All @@ -101,7 +101,7 @@ jobs:

- name: Upload shard coverage data
if: always()
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: e2e-coverage-shard-${{ matrix.shardIndex }}
path: coverage/playwright/
Expand All @@ -128,9 +128,9 @@ jobs:
[chromium-2x, chromium-0.5x, mobile-chrome, cloud, mobile-safari]
steps:
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Download built frontend
uses: actions/download-artifact@v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ${{ (matrix.browser == 'cloud' || matrix.browser == 'mobile-safari') && 'frontend-dist-cloud' || 'frontend-dist' }}
path: dist/
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
pnpm exec playwright merge-reports --reporter=json ./blob-report

- name: Upload Playwright report
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: always()
with:
name: playwright-report-${{ matrix.browser }}
Expand All @@ -177,7 +177,7 @@ jobs:
version: 10

- name: Download blob reports
uses: actions/download-artifact@v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: ./all-blob-reports
pattern: blob-report-chromium-*
Expand All @@ -192,7 +192,7 @@ jobs:
pnpm dlx @playwright/test merge-reports --reporter=json ./all-blob-reports

- name: Upload HTML report
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: playwright-report-chromium
path: ./playwright-report/
Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:
has-new-tests: ${{ steps.detect.outputs.has-new-tests }}
steps:
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0

Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:

- name: Download built frontend
if: steps.detect.outputs.has-new-tests == 'true'
uses: actions/download-artifact@v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: frontend-dist
path: dist/
Expand All @@ -287,7 +287,7 @@ jobs:

- name: Upload new-test report (with embedded video)
if: ${{ !cancelled() && steps.detect.outputs.has-new-tests == 'true' }}
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: playwright-report-new-tests
path: ./playwright-report/
Expand Down Expand Up @@ -316,7 +316,7 @@ jobs:
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Upsert playwright starting section into unified report
uses: ./.github/actions/upsert-comment-section
Expand Down Expand Up @@ -347,10 +347,10 @@ jobs:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Download all playwright reports
uses: actions/download-artifact@v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: playwright-report-*
path: reports
Expand Down
24 changes: 20 additions & 4 deletions .github/workflows/pr-backport.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,9 @@ jobs:
Cherry-pick merge commit ${MERGE_COMMIT} onto new branch
${BACKPORT_BRANCH} from origin/${target}.
Resolve conflicts in: ${CONFLICTS_INLINE}.

${STACK_HINT}

For test snapshots (browser_tests/**/*-snapshots/), accept PR version if
changed in original PR, else keep target. For package.json versions, keep
target branch. For pnpm-lock.yaml, regenerate with pnpm install.
Expand All @@ -417,6 +420,8 @@ jobs:
manually onto branch `${BACKPORT_BRANCH}` (from `origin/${target}`) and
open a PR to `${target}`.

${STACK_HINT}

<details>
<summary>📄 Conflicting files</summary>

Expand Down Expand Up @@ -482,21 +487,32 @@ jobs:
CONFLICTS_INLINE=$(echo "${conflicts}" | tr ',' ' ')
PR_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}"

export PR_NUMBER PR_URL MERGE_COMMIT target BACKPORT_BRANCH CONFLICTS_INLINE
# Stacked PRs conflict here until the one below them merges into the target; note other open backports so the failure reads as that artifact, not a real conflict.
STACK_HINT=""
OPEN_BACKPORTS=$(
gh pr list --repo "${GITHUB_REPOSITORY}" --state open \
--base "${target}" --label backport --json number \
--jq '[.[].number | "#\(.)"] | join(", ")' 2>/dev/null
) || OPEN_BACKPORTS=""
if [ -n "${OPEN_BACKPORTS}" ]; then
STACK_HINT="> **This may be a stacking conflict rather than a real one.** ${OPEN_BACKPORTS} are still open against \`${target}\`. If this PR sits on top of any of them, the conflict will disappear once they merge — wait for that, then remove and re-add the \`needs-backport\` label to re-run this workflow."
fi

export PR_NUMBER PR_URL MERGE_COMMIT target BACKPORT_BRANCH CONFLICTS_INLINE STACK_HINT

# envsubst is provided by gettext-base
if ! command -v envsubst >/dev/null 2>&1; then
sudo apt-get update && sudo apt-get install -y gettext-base
fi

AGENT_PROMPT=$(envsubst '${PR_NUMBER} ${PR_URL} ${target} ${MERGE_COMMIT} ${BACKPORT_BRANCH} ${CONFLICTS_INLINE}' <<<"$BACKPORT_AGENT_PROMPT_TEMPLATE")
AGENT_PROMPT=$(envsubst '${PR_NUMBER} ${PR_URL} ${target} ${MERGE_COMMIT} ${BACKPORT_BRANCH} ${CONFLICTS_INLINE} ${STACK_HINT}' <<<"$BACKPORT_AGENT_PROMPT_TEMPLATE")

# Use fenced code block for conflicts to handle special chars in filenames
CONFLICTS_BLOCK=$(echo "${conflicts}" | tr ',' '\n')
MERGE_COMMIT_SHORT="${MERGE_COMMIT:0:7}"

export target MERGE_COMMIT_SHORT BACKPORT_BRANCH CONFLICTS_BLOCK AGENT_PROMPT PR_AUTHOR
COMMENT_BODY=$(envsubst '${target} ${MERGE_COMMIT_SHORT} ${BACKPORT_BRANCH} ${CONFLICTS_BLOCK} ${AGENT_PROMPT} ${PR_AUTHOR}' <<<"$COMMENT_BODY_TEMPLATE")
export target MERGE_COMMIT_SHORT BACKPORT_BRANCH CONFLICTS_BLOCK AGENT_PROMPT PR_AUTHOR STACK_HINT
COMMENT_BODY=$(envsubst '${target} ${MERGE_COMMIT_SHORT} ${BACKPORT_BRANCH} ${CONFLICTS_BLOCK} ${AGENT_PROMPT} ${PR_AUTHOR} ${STACK_HINT}' <<<"$COMMENT_BODY_TEMPLATE")

post_comment "${COMMENT_BODY}" "cherry-pick conflict on ${target} (backport manually onto ${BACKPORT_BRANCH})"
fi
Expand Down
Loading