Skip to content

Commit 761fc02

Browse files
chore(release): merge master into release-3.7 for enterprise v3.7.2
2 parents 2aca56e + e2831c1 commit 761fc02

380 files changed

Lines changed: 25057 additions & 11383 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
name: Fork PR dispatch to enterprise
3+
on:
4+
workflow_run:
5+
workflows: ["PR verification (forks)"]
6+
types: [completed]
7+
permissions:
8+
id-token: write
9+
contents: read
10+
statuses: write
11+
jobs:
12+
dispatch:
13+
if: >
14+
github.event.workflow_run.conclusion == 'success' &&
15+
github.event.workflow_run.event == 'pull_request' &&
16+
github.event.workflow_run.head_repository.fork == true
17+
runs-on: blacksmith-2vcpu-ubuntu-2404
18+
steps:
19+
- uses: aws-actions/configure-aws-credentials@v4
20+
with:
21+
aws-region: ${{ vars.RP_AWS_CRED_REGION }}
22+
role-to-assume: arn:aws:iam::${{ secrets.RP_AWS_CRED_ACCOUNT_ID }}:role/${{ vars.RP_AWS_CRED_BASE_ROLE_NAME }}${{ github.event.repository.name }}
23+
- uses: aws-actions/aws-secretsmanager-get-secrets@v2
24+
with:
25+
secret-ids: |
26+
,sdlc/prod/github/actions_bot_token
27+
parse-json-secrets: true
28+
- name: Build dispatch payload
29+
id: payload
30+
env:
31+
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
32+
HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
33+
HEAD_REPO: ${{ github.event.workflow_run.head_repository.full_name }}
34+
uses: actions/github-script@v7
35+
with:
36+
script: |
37+
const payload = {
38+
branch: process.env.HEAD_BRANCH,
39+
commit_sha: process.env.HEAD_SHA,
40+
head_repository: process.env.HEAD_REPO,
41+
is_fork: true,
42+
};
43+
core.setOutput('json', JSON.stringify(payload));
44+
core.setOutput('sha', process.env.HEAD_SHA);
45+
- name: Repository dispatch for fork PR
46+
uses: peter-evans/repository-dispatch@caebe2a7c967e9f927ff8780fea8e16e50b5ce40
47+
with:
48+
token: ${{ env.ACTIONS_BOT_TOKEN }}
49+
repository: redpanda-data/console-enterprise
50+
event-type: push
51+
client-payload: ${{ steps.payload.outputs.json }}
52+
- name: Set pending enterprise CI status
53+
env:
54+
HEAD_SHA: ${{ steps.payload.outputs.sha }}
55+
uses: actions/github-script@v7
56+
with:
57+
github-token: ${{ env.ACTIONS_BOT_TOKEN }}
58+
script: |
59+
await github.rest.repos.createCommitStatus({
60+
owner: 'redpanda-data',
61+
repo: 'console',
62+
sha: process.env.HEAD_SHA,
63+
state: 'pending',
64+
description: 'Enterprise CI is running...',
65+
context: 'Enterprise CI'
66+
});

.github/workflows/frontend-react-doctor.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
paths:
66
- "frontend/**"
77
- ".github/workflows/frontend-react-doctor.yml"
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
811
jobs:
912
react-doctor:
1013
timeout-minutes: 5
@@ -22,12 +25,10 @@ jobs:
2225
- name: Cache dependencies
2326
uses: actions/cache@v4
2427
with:
25-
path: |
26-
~/.bun/install/cache
27-
frontend/node_modules
28-
key: ${{ runner.os }}-bun-frontend-${{ hashFiles('frontend/bun.lock') }}
28+
path: ~/.bun/install/cache
29+
key: ${{ runner.os }}-bun-cache-${{ hashFiles('frontend/bun.lock') }}
2930
restore-keys: |
30-
${{ runner.os }}-bun-frontend-
31+
${{ runner.os }}-bun-cache-
3132
- name: Install dependencies
3233
run: bun install --frozen-lockfile
3334
- name: Run React Doctor
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
name: frontend-update-baselines
3+
# Regenerate Vitest browser test screenshot baselines (platform-agnostic)
4+
# and commit them to the branch. Run this workflow when UI changes cause
5+
# intentional visual diffs that need new baselines.
6+
# Keep action versions in sync with frontend-visual.yml
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
branch:
11+
description: Branch to update baselines on
12+
required: true
13+
default: main
14+
permissions:
15+
contents: write
16+
env:
17+
CI: true
18+
jobs:
19+
update-baselines:
20+
timeout-minutes: 5
21+
runs-on: blacksmith-2vcpu-ubuntu-2404
22+
defaults:
23+
run:
24+
working-directory: frontend
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v6.0.2
28+
with:
29+
ref: ${{ github.event.inputs.branch }}
30+
- name: Setup Bun
31+
uses: oven-sh/setup-bun@v2.2.0
32+
- name: Install dependencies
33+
run: bun install --frozen-lockfile
34+
- name: Cache Playwright browsers
35+
uses: actions/cache@v5.0.4
36+
id: playwright-cache
37+
with:
38+
path: ~/.cache/ms-playwright
39+
key: ${{ runner.os }}-playwright-chromium-${{ hashFiles('frontend/bun.lock') }}
40+
restore-keys: |
41+
${{ runner.os }}-playwright-chromium-
42+
- name: Install Playwright browsers
43+
if: steps.playwright-cache.outputs.cache-hit != 'true'
44+
run: bunx playwright install --with-deps chromium
45+
- name: Install Playwright system deps (cached)
46+
if: steps.playwright-cache.outputs.cache-hit == 'true'
47+
run: bunx playwright install-deps chromium
48+
- name: Regenerate screenshot baselines
49+
run: bun run test:browser:update
50+
- name: Commit updated baselines
51+
run: |
52+
git config user.name "github-actions[bot]"
53+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
54+
git add 'src/**/__screenshots__/**/*.png'
55+
if git diff --cached --quiet; then
56+
echo "::notice::No baseline changes detected"
57+
else
58+
git commit -m "chore(frontend): update visual regression baselines [skip ci]"
59+
git push
60+
fi

.github/workflows/frontend-verify.yml

Lines changed: 11 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@ jobs:
1616
uses: actions/checkout@v5
1717
- name: Setup Bun
1818
uses: oven-sh/setup-bun@v2
19-
- name: Cache dependencies
20-
uses: actions/cache@v4
21-
with:
22-
path: |
23-
~/.bun/install/cache
24-
frontend/node_modules
25-
key: ${{ runner.os }}-bun-frontend-${{ hashFiles('frontend/bun.lock') }}
26-
restore-keys: |
27-
${{ runner.os }}-bun-frontend-
2819
- name: Install dependencies
2920
run: bun install --frozen-lockfile
3021
- name: Get Biome version
@@ -57,15 +48,6 @@ jobs:
5748
uses: actions/checkout@v5
5849
- name: Setup Bun
5950
uses: oven-sh/setup-bun@v2
60-
- name: Cache dependencies
61-
uses: actions/cache@v4
62-
with:
63-
path: |
64-
~/.bun/install/cache
65-
frontend/node_modules
66-
key: ${{ runner.os }}-bun-frontend-${{ hashFiles('frontend/bun.lock') }}
67-
restore-keys: |
68-
${{ runner.os }}-bun-frontend-
6951
- name: Install dependencies
7052
run: bun install --frozen-lockfile
7153
- name: Run typecheck
@@ -82,15 +64,6 @@ jobs:
8264
uses: actions/checkout@v5
8365
- name: Setup Bun
8466
uses: oven-sh/setup-bun@v2
85-
- name: Cache dependencies
86-
uses: actions/cache@v4
87-
with:
88-
path: |
89-
~/.bun/install/cache
90-
frontend/node_modules
91-
key: ${{ runner.os }}-bun-frontend-${{ hashFiles('frontend/bun.lock') }}
92-
restore-keys: |
93-
${{ runner.os }}-bun-frontend-
9467
- name: Install dependencies
9568
run: bun install --frozen-lockfile
9669
- name: Restore Rspack build cache
@@ -125,15 +98,6 @@ jobs:
12598
uses: actions/checkout@v5
12699
- name: Setup Bun
127100
uses: oven-sh/setup-bun@v2
128-
- name: Cache dependencies
129-
uses: actions/cache@v4
130-
with:
131-
path: |
132-
~/.bun/install/cache
133-
frontend/node_modules
134-
key: ${{ runner.os }}-bun-frontend-${{ hashFiles('frontend/bun.lock') }}
135-
restore-keys: |
136-
${{ runner.os }}-bun-frontend-
137101
- name: Install dependencies
138102
run: bun install --frozen-lockfile
139103
- name: Run unit tests
@@ -160,15 +124,6 @@ jobs:
160124
uses: actions/checkout@v5
161125
- name: Setup Bun
162126
uses: oven-sh/setup-bun@v2
163-
- name: Cache dependencies
164-
uses: actions/cache@v4
165-
with:
166-
path: |
167-
~/.bun/install/cache
168-
frontend/node_modules
169-
key: ${{ runner.os }}-bun-frontend-${{ hashFiles('frontend/bun.lock') }}
170-
restore-keys: |
171-
${{ runner.os }}-bun-frontend-
172127
- name: Install dependencies
173128
run: bun install --frozen-lockfile
174129
- name: Run integration tests
@@ -180,10 +135,10 @@ jobs:
180135
path: frontend/test-results
181136
retention-days: 2
182137

183-
e2e-test:
184-
needs: ["lint", "type-check", "build"]
185-
timeout-minutes: 30
186-
runs-on: blacksmith-16vcpu-ubuntu-2404
138+
test-coverage:
139+
needs: ["test-unit", "test-integration"]
140+
timeout-minutes: 10
141+
runs-on: blacksmith-4vcpu-ubuntu-2404
187142
defaults:
188143
run:
189144
working-directory: frontend
@@ -192,45 +147,14 @@ jobs:
192147
uses: actions/checkout@v5
193148
- name: Setup Bun
194149
uses: oven-sh/setup-bun@v2
195-
- name: Cache dependencies
196-
uses: actions/cache@v4
197-
with:
198-
path: |
199-
~/.bun/install/cache
200-
frontend/node_modules
201-
key: ${{ runner.os }}-bun-frontend-${{ hashFiles('frontend/bun.lock') }}
202-
restore-keys: |
203-
${{ runner.os }}-bun-frontend-
204150
- name: Install dependencies
205151
run: bun install --frozen-lockfile
206-
- name: Download frontend build artifact
207-
uses: actions/download-artifact@v4
208-
with:
209-
name: frontend-build
210-
path: frontend/build
211-
- name: Setup Go
212-
uses: actions/setup-go@v6
213-
with:
214-
go-version-file: 'backend/go.mod'
215-
cache-dependency-path: backend/go.sum
216-
- name: Get Playwright version
217-
id: pw-version
218-
run: echo "version=$(jq -r '.devDependencies["@playwright/test"]' package.json)" >> $GITHUB_OUTPUT
219-
- name: Cache Playwright browsers
220-
uses: actions/cache@v4
221-
id: playwright-cache
222-
with:
223-
path: ~/.cache/ms-playwright
224-
key: ${{ runner.os }}-playwright-${{ steps.pw-version.outputs.version }}
225-
- name: Install Playwright browsers
226-
if: steps.playwright-cache.outputs.cache-hit != 'true'
227-
run: bun run install:chromium
228-
- name: Run Playwright tests
229-
run: bun run e2e-test
230-
- name: Upload Playwright report artifact
152+
- name: Run coverage (unit + integration, merged)
153+
run: bun run test:coverage
154+
- name: Upload merged coverage HTML report
231155
uses: actions/upload-artifact@v4
232-
if: ${{ failure() }}
156+
if: always()
233157
with:
234-
name: playwright-report
235-
path: frontend/playwright-report/
236-
retention-days: 2
158+
name: coverage-report
159+
path: frontend/coverage-merged/
160+
retention-days: 14
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
name: frontend-visual
3+
# Vitest browser-mode visual regression tests for the console frontend.
4+
# Mirrors apps/adp-ui/.github/workflows/adp-ui.yml `test-browser` job.
5+
on:
6+
push:
7+
paths:
8+
- '.github/workflows/frontend-visual.yml'
9+
- 'frontend/**'
10+
branches-ignore:
11+
- 'dependabot/**'
12+
- 'snyk-upgrade-**'
13+
- 'gh-readonly-queue/**'
14+
- 'production'
15+
- 'preprod'
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
env:
20+
CI: true
21+
jobs:
22+
test-browser:
23+
# Visual regression tests — compares against Linux/Chromium baselines
24+
# committed to git. If screenshots change, this job fails BUT does NOT
25+
# block PR merge (continue-on-error + not listed in any required checks).
26+
# Run "bun run test:browser:update" via the frontend-update-baselines
27+
# workflow to regenerate baselines when UI changes are intentional.
28+
timeout-minutes: 5
29+
continue-on-error: true
30+
runs-on: blacksmith-2vcpu-ubuntu-2404
31+
defaults:
32+
run:
33+
working-directory: frontend
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v6.0.2
37+
- name: Setup Bun
38+
uses: oven-sh/setup-bun@v2.2.0
39+
- name: Install dependencies
40+
run: bun install --frozen-lockfile
41+
- name: Cache Playwright browsers
42+
uses: actions/cache@v5.0.4
43+
with:
44+
path: ~/.cache/ms-playwright
45+
key: ${{ runner.os }}-playwright-chromium-${{ hashFiles('frontend/bun.lock') }}
46+
restore-keys: |
47+
${{ runner.os }}-playwright-chromium-
48+
- name: Install Playwright browsers
49+
run: bunx playwright install --with-deps chromium
50+
- name: Run browser tests
51+
run: |
52+
# Only run strict comparison when Linux baselines exist in git.
53+
# Baseline generation is intentionally NOT done on push CI — it
54+
# blocks on the first cold Vitest+Playwright browser-mode launch
55+
# and runs out the job timeout. Use the `frontend-update-baselines`
56+
# workflow_dispatch to generate and commit baselines.
57+
if git ls-files 'src/**/__screenshots__/**/*-linux.png' | grep -q .; then
58+
bun run test:browser
59+
else
60+
echo "::notice::No Linux baselines committed yet — skipping visual regression. Run 'frontend-update-baselines' workflow to generate."
61+
fi
62+
- uses: actions/upload-artifact@v7.0.1
63+
if: failure()
64+
with:
65+
name: browser-test-diffs
66+
path: |
67+
frontend/src/**/__screenshots__/**/*.png
68+
frontend/.vitest-attachments
69+
retention-days: 7
70+
- name: Hint on visual diff failure
71+
if: failure()
72+
run: |
73+
echo "::warning::Visual regression detected. If the UI change is intentional, run the 'frontend-update-baselines' workflow on this branch to regenerate baselines."

.github/workflows/repository-dispatch.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
- '*'
1616
branches:
1717
- '**'
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
1821
permissions:
1922
id-token: write
2023
contents: read

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ requests.txt
1919
# Local build tools installed via Taskfiles
2020
build
2121

22-
.cursor
22+
.cursor

0 commit comments

Comments
 (0)