Skip to content

Commit 75a8903

Browse files
authored
Merge branch 'master' into master
2 parents fab7806 + b0d681e commit 75a8903

File tree

11 files changed

+45
-122
lines changed

11 files changed

+45
-122
lines changed

.devcontainer/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include:
22
- path:
3-
- ../e2e/server/docker-compose.common.yml
3+
- ../e2e/server/docker-compose.yml
44
- docker-compose.override.yml
55
services:
66
apisix-dashboard:

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
# Initializes the CodeQL tools for scanning.
4646
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v3
47+
uses: github/codeql-action/init@v4
4848
with:
4949
languages: ${{ matrix.language }}
5050
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -55,7 +55,7 @@ jobs:
5555
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5656
# If this step fails, then you should remove it and run the build manually (see below)
5757
- name: Autobuild
58-
uses: github/codeql-action/autobuild@v3
58+
uses: github/codeql-action/autobuild@v4
5959

6060
# ℹ️ Command-line programs to run using the OS shell.
6161
# 📚 https://git.io/JvXDl
@@ -69,4 +69,4 @@ jobs:
6969
# make release
7070

7171
- name: Perform CodeQL Analysis
72-
uses: github/codeql-action/analyze@v3
72+
uses: github/codeql-action/analyze@v4

.github/workflows/e2e.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
with:
5252
run_install: false
5353

54-
- uses: actions/setup-node@v4
54+
- uses: actions/setup-node@v6
5555
with:
5656
node-version: "22"
5757
cache: "pnpm"
@@ -72,14 +72,13 @@ jobs:
7272
- name: Waiting dashboard service to be healthy
7373
working-directory: ./e2e/server
7474
run: |
75-
E2E_SERVER="dashboard-e2e"
7675
TIMEOUT=30
7776
timeout $TIMEOUT bash -c '
78-
until [ "$(docker inspect --format="{{.State.Health.Status}}" $(docker compose ps -q '$E2E_SERVER'))" = "healthy" ]; do
79-
echo "'$E2E_SERVER' is starting..."
77+
until curl -f http://127.0.0.1:9180/ui > /dev/null 2>&1; do
78+
echo "Waiting for APISIX dashboard to be ready..."
8079
sleep 5
8180
done
82-
' || (echo "$E2E_SERVER not healthy after $TIMEOUT seconds" && exit 1)
81+
' || (echo "APISIX dashboard not ready after $TIMEOUT seconds" && exit 1)
8382
8483
- name: Run e2e tests
8584
run: |

e2e/server/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ COPY . .
3535
RUN apk add --no-cache git
3636
RUN corepack enable pnpm && pnpm build
3737

38-
# serve ui
39-
FROM nginx:1.28.0-alpine-slim AS runner
40-
COPY --from=builder /app/dist /usr/share/nginx/html
38+
# embed dashboard ui into apisix
39+
FROM apache/apisix:dev
40+
COPY --from=builder /app/dist /usr/local/apisix/ui/

e2e/server/docker-compose.common.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

e2e/server/docker-compose.yml

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,38 @@
1515
# limitations under the License.
1616
#
1717

18-
include:
19-
- docker-compose.common.yml
2018
services:
21-
dashboard-e2e:
19+
apisix:
2220
build:
2321
context: ../..
2422
dockerfile: e2e/server/Dockerfile
23+
restart: always
2524
volumes:
26-
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
27-
networks:
28-
- apisix
25+
- ./apisix_conf.yml:/usr/local/apisix/conf/config.yaml:ro
2926
ports:
30-
- '6174:6174'
27+
- '9180:9180'
3128
depends_on:
29+
- etcd
30+
networks:
31+
- apisix
32+
33+
etcd:
34+
image: bitnamilegacy/etcd:3.5
35+
36+
restart: always
37+
volumes:
38+
- etcd_data:/bitnami/etcd
39+
environment:
40+
ETCD_ENABLE_V2: 'true'
41+
ALLOW_NONE_AUTHENTICATION: 'yes'
42+
ETCD_ADVERTISE_CLIENT_URLS: 'http://etcd:2379'
43+
ETCD_LISTEN_CLIENT_URLS: 'http://0.0.0.0:2379'
44+
networks:
3245
- apisix
33-
healthcheck:
34-
test:
35-
[
36-
'CMD',
37-
'wget',
38-
'--quiet',
39-
'--tries=1',
40-
'--spider',
41-
'http://127.0.0.1:6174/ui/',
42-
]
43-
interval: 10s
44-
timeout: 5s
45-
retries: 5
46-
start_period: 10s
46+
47+
networks:
48+
apisix:
49+
driver: bridge
50+
51+
volumes:
52+
etcd_data:

e2e/server/nginx.conf

Lines changed: 0 additions & 36 deletions
This file was deleted.

e2e/tests/stream_routes.show-disabled-error.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import path from 'node:path';
3636
import { promisify } from 'node:util';
3737

3838
import { streamRoutesPom } from '@e2e/pom/stream_routes';
39+
import { env } from '@e2e/utils/env';
3940
import { test } from '@e2e/utils/test';
4041
import { expect } from '@playwright/test';
4142
import { produce, type WritableDraft } from 'immer';
@@ -67,11 +68,11 @@ const updateAPISIXConf = async (
6768

6869
const restartDockerServices = async () => {
6970
await execAsync('docker compose restart apisix', { cwd: getE2EServerDir() });
70-
const url = 'http://127.0.0.1:6174/ui/';
71+
const url = env.E2E_TARGET_URL;
7172
const maxRetries = 20;
7273
const interval = 1000;
7374
for (let i = 0; i < maxRetries; i++) {
74-
const res = await fetch(url);
75+
const res = await fetch(url).catch(() => ({ ok: false }));
7576
if (res.ok) return;
7677
await new Promise((resolve) => setTimeout(resolve, interval));
7778
}

e2e/utils/env.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ export const env = parseEnv(process.env, {
2828
E2E_TARGET_URL: z
2929
.string()
3030
.url()
31-
.default(`http://localhost:6174${BASE_PATH}/`)
31+
.default(`http://localhost:9180${BASE_PATH}/`)
3232
.describe(
33-
`If you want to access the test server from dev container playwright to host e2e server, try http://host.docker.internal:6174${BASE_PATH}/`
33+
`If you want to access the test server from dev container playwright to host e2e server, try http://host.docker.internal:9180${BASE_PATH}/`
3434
),
3535
});

src/components/form/Editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
import { InputWrapper, type InputWrapperProps, Skeleton } from '@mantine/core';
1818
import { Editor } from '@monaco-editor/react';
19-
import classNames from 'clsx';
19+
import { clsx } from 'clsx';
2020
import { useEffect, useMemo, useRef, useState } from 'react';
2121
import {
2222
type FieldValues,

0 commit comments

Comments
 (0)