You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ha...@apache.org on 2026/08/08 15:02:34 UTC
(skywalking-banyandb) branch main updated: ci: reduce pull request feedback time (#1263)
This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
The following commit(s) were added to refs/heads/main by this push:
new 5f97741c5 ci: reduce pull request feedback time (#1263)
5f97741c5 is described below
commit 5f97741c57ec365a565c87e96777c294b288950a
Author: Owen Willison <41...@users.noreply.github.com>
AuthorDate: Sat Aug 8 23:02:28 2026 +0800
ci: reduce pull request feedback time (#1263)
* ci: reduce pull request feedback time
* ci: rerun flaky storage e2e
---------
Co-authored-by: Gao Hongtao <ha...@gmail.com>
---
.github/actions/build-docker-image/action.yml | 20 ++++++----
.github/actions/setup-build-env/action.yml | 11 +++++-
.github/workflows/ci.yml | 43 +++++++++++++++-------
.github/workflows/e2e.yml | 7 ++--
.github/workflows/prepare.yml | 8 +---
.github/workflows/test-fodc-e2e.yml | 4 ++
.github/workflows/test-integration-distributed.yml | 18 +++++++--
.github/workflows/test-integration-standalone.yml | 18 +++++++--
.github/workflows/test.yml | 5 +--
Makefile | 10 +++--
mcp/Makefile | 10 +++--
test/docker/Makefile | 2 +-
ui/Makefile | 10 +++--
13 files changed, 112 insertions(+), 54 deletions(-)
diff --git a/.github/actions/build-docker-image/action.yml b/.github/actions/build-docker-image/action.yml
index c2f6a62f4..a2d3d49ea 100644
--- a/.github/actions/build-docker-image/action.yml
+++ b/.github/actions/build-docker-image/action.yml
@@ -35,16 +35,20 @@ runs:
steps:
- name: Build binary
shell: bash
- run: make release
+ run: |
+ make -C banyand banyand-server-static banyand-lifecycle-static
+ make -C bydbctl bydbctl-cli-static
- name: Build docker image
- shell: bash
- run: |
- make -C test/docker build
- docker image ls
- env:
- TAG: ${{ inputs.tag }}
- HUB: ${{ inputs.hub }}
+ uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a
+ with:
+ context: .
+ file: test/docker/Dockerfile
+ load: true
+ tags: ${{ inputs.hub }}/skywalking-banyandb:${{ inputs.tag }}-testing
+ provenance: false
+ cache-from: type=gha,scope=banyandb-testing-${{ runner.arch }}
+ cache-to: type=gha,mode=max,scope=banyandb-testing-${{ runner.arch }},ignore-error=true
- name: Package docker image
shell: bash
diff --git a/.github/actions/setup-build-env/action.yml b/.github/actions/setup-build-env/action.yml
index 86ed1b9ec..495f6f1d8 100644
--- a/.github/actions/setup-build-env/action.yml
+++ b/.github/actions/setup-build-env/action.yml
@@ -26,6 +26,14 @@ inputs:
description: 'Whether to setup Docker Buildx'
required: false
default: 'false'
+ setup-node:
+ description: 'Whether to setup Node.js'
+ required: false
+ default: 'true'
+ setup-qemu:
+ description: 'Whether to setup QEMU when Docker is enabled'
+ required: false
+ default: 'true'
runs:
using: composite
@@ -37,6 +45,7 @@ runs:
name: build-artifacts
- name: Setup Node.js
+ if: inputs.setup-node == 'true'
uses: actions/setup-node@v6
with:
node-version: 24.6.0
@@ -60,7 +69,7 @@ runs:
run: echo "GOTOOLCHAIN=auto" >> "$GITHUB_ENV"
- name: Set up QEMU
- if: inputs.setup-docker == 'true'
+ if: inputs.setup-docker == 'true' && inputs.setup-qemu == 'true'
uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3
- name: Set up Docker Buildx
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 991f35718..d0eb8facd 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -31,6 +31,10 @@ on:
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
+concurrency:
+ group: ci-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
jobs:
prepare:
name: Prepare (Generate)
@@ -54,11 +58,11 @@ jobs:
id: cache-tool
with:
path: bin
- key: ${{ runner.os }}-generate-tool-${{ hashFiles('**/version.mk') }}
+ key: ${{ runner.os }}-${{ runner.arch }}-generate-tool-${{ hashFiles('scripts/build/version.mk') }}
- name: npm ci and format
run: |
+ make -C ui install
cd ui
- npm ci
npm run format
cd ../
- name: Run consistency check
@@ -88,7 +92,7 @@ jobs:
- name: Generate dependencies licenses
run: make license-dep
- name: Check
- run: make check
+ run: make check-format
vuln-check:
name: Vulnerability Scan
runs-on: ubuntu-latest
@@ -100,18 +104,19 @@ jobs:
uses: ./.github/actions/setup-build-env
with:
download-artifacts: 'true'
+ setup-node: 'false'
setup-docker: 'false'
- name: Cache Tools
uses: actions/cache@v4
with:
path: bin
- key: ${{ runner.os }}-generate-tool-${{ hashFiles('**/version.mk') }}
+ key: ${{ runner.os }}-${{ runner.arch }}-vuln-tool-${{ hashFiles('scripts/build/version.mk') }}
- name: Run govulncheck (stdlib + dependency CVEs)
run: make vuln-check
detect_fodc_e2e_changes:
name: Detect FODC E2E Changes
runs-on: ubuntu-latest
- needs: [check]
+ needs: [prepare]
outputs:
should_run: ${{ steps.filter.outputs.should_run }}
steps:
@@ -147,43 +152,53 @@ jobs:
echo "should_run=${should_run}" >> "${GITHUB_OUTPUT}"
test-banyand:
name: Test Banyand
- needs: [check]
+ needs: [prepare]
uses: ./.github/workflows/test-banyand.yml
test-bydbctl:
name: Test Bydbctl
- needs: [check]
+ needs: [prepare]
uses: ./.github/workflows/test-bydbctl.yml
test-fodc:
name: Test FODC
- needs: [check]
+ needs: [prepare]
uses: ./.github/workflows/test-fodc.yml
test-fodc-e2e:
name: Test FODC E2E
- needs: [check, detect_fodc_e2e_changes]
+ needs: [prepare, detect_fodc_e2e_changes]
uses: ./.github/workflows/test-fodc-e2e.yml
with:
should_run: ${{ github.event_name != 'pull_request' || needs.detect_fodc_e2e_changes.outputs.should_run == 'true' }}
test-pkg:
name: Test Pkg
- needs: [check]
+ needs: [prepare]
uses: ./.github/workflows/test-pkg.yml
test-integration-standalone:
name: Test Integration Standalone
- needs: [check]
+ needs: [prepare]
uses: ./.github/workflows/test-integration-standalone.yml
test-integration-distributed:
name: Test Integration Distributed
- needs: [check]
+ needs: [prepare]
uses: ./.github/workflows/test-integration-distributed.yml
e2e:
name: E2E Tests
- needs: [check]
+ needs: [prepare]
uses: ./.github/workflows/e2e.yml
result:
name: Continuous Integration
runs-on: ubuntu-24.04
needs:
- [vuln-check, detect_fodc_e2e_changes, test-banyand, test-bydbctl, test-fodc, test-fodc-e2e, test-pkg, test-integration-standalone, test-integration-distributed, e2e]
+ - check
+ - vuln-check
+ - detect_fodc_e2e_changes
+ - test-banyand
+ - test-bydbctl
+ - test-fodc
+ - test-fodc-e2e
+ - test-pkg
+ - test-integration-standalone
+ - test-integration-distributed
+ - e2e
steps:
- run: echo 'success'
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
index 736218842..9462a82f7 100644
--- a/.github/workflows/e2e.yml
+++ b/.github/workflows/e2e.yml
@@ -41,7 +41,9 @@ jobs:
uses: ./.github/actions/setup-build-env
with:
download-artifacts: 'true'
+ setup-node: 'false'
setup-docker: 'true'
+ setup-qemu: 'false'
- name: Build and upload docker image
uses: ./.github/actions/build-docker-image
with:
@@ -95,14 +97,13 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- with:
- fetch-tags: true
- name: Load env
run: grep -v '^#' test/e2e-v2/script/env >> "$GITHUB_ENV"
- name: Setup build environment
uses: ./.github/actions/setup-build-env
with:
- download-artifacts: 'true'
+ download-artifacts: 'false'
+ setup-node: 'false'
setup-docker: 'false'
- name: Download docker image artifact
uses: actions/download-artifact@v4
diff --git a/.github/workflows/prepare.yml b/.github/workflows/prepare.yml
index 58048ca06..d25409ff7 100644
--- a/.github/workflows/prepare.yml
+++ b/.github/workflows/prepare.yml
@@ -33,7 +33,7 @@ jobs:
id: cache-tool
with:
path: bin
- key: ${{ runner.os }}-generate-tool-${{ hashFiles('**/version.mk') }}
+ key: ${{ runner.os }}-${{ runner.arch }}-generate-tool-${{ hashFiles('scripts/build/version.mk') }}
- uses: actions/setup-node@v6
with:
node-version: 24.6.0
@@ -49,11 +49,7 @@ jobs:
- name: Generate codes
run: make generate
- name: Build UI
- run: |
- cd ui
- npm ci
- npm run build
- cd ..
+ run: make -C ui build
- name: Upload generated files
uses: actions/upload-artifact@v7
with:
diff --git a/.github/workflows/test-fodc-e2e.yml b/.github/workflows/test-fodc-e2e.yml
index 8658c3c7d..48e01c46f 100644
--- a/.github/workflows/test-fodc-e2e.yml
+++ b/.github/workflows/test-fodc-e2e.yml
@@ -58,7 +58,9 @@ jobs:
uses: ./.github/actions/setup-build-env
with:
download-artifacts: 'true'
+ setup-node: 'false'
setup-docker: 'true'
+ setup-qemu: 'false'
- name: Install kubectl
run: |
@@ -167,7 +169,9 @@ jobs:
uses: ./.github/actions/setup-build-env
with:
download-artifacts: 'true'
+ setup-node: 'false'
setup-docker: 'true'
+ setup-qemu: 'false'
- name: Build BanyanDB image
run: |
diff --git a/.github/workflows/test-integration-distributed.yml b/.github/workflows/test-integration-distributed.yml
index 40f1e4f1f..5fe679963 100644
--- a/.github/workflows/test-integration-distributed.yml
+++ b/.github/workflows/test-integration-distributed.yml
@@ -22,14 +22,24 @@ on:
jobs:
test-integration-distributed:
strategy:
+ fail-fast: false
matrix:
tz: ["UTC", "America/Los_Angeles"]
+ lane:
+ - name: Query
+ pkg: ./test/integration/distributed/query/... ./test/integration/distributed/querybench/...
+ extra-options: ''
+ - name: Multi Segments
+ pkg: ./test/integration/distributed/multi_segments/...
+ extra-options: ''
+ - name: Remainder
+ pkg: ./test/integration/distributed/...
+ extra-options: --skip-package=/query,/multi_segments
uses: ./.github/workflows/test.yml
with:
- test-name: Integration Distributed
- options: --vv --fail-fast --label-filter \\!slow
+ test-name: Integration Distributed - ${{ matrix.lane.name }}
+ options: --vv --fail-fast --label-filter \\!slow ${{ matrix.lane.extra-options }}
timeout-minutes: 60
- pkg: ./test/integration/distributed/...
+ pkg: ${{ matrix.lane.pkg }}
coverage-flag: integration-distributed
timezone: ${{ matrix.tz }}
-
diff --git a/.github/workflows/test-integration-standalone.yml b/.github/workflows/test-integration-standalone.yml
index 3ec40b2ca..3547cbee9 100644
--- a/.github/workflows/test-integration-standalone.yml
+++ b/.github/workflows/test-integration-standalone.yml
@@ -22,14 +22,24 @@ on:
jobs:
test-integration-standalone:
strategy:
+ fail-fast: false
matrix:
tz: ["UTC", "America/Los_Angeles"]
+ lane:
+ - name: Query
+ pkg: ./test/integration/standalone/query/...
+ extra-options: ''
+ - name: Multi Segments
+ pkg: ./test/integration/standalone/multi_segments/...
+ extra-options: ''
+ - name: Remainder
+ pkg: ./test/integration/standalone/...
+ extra-options: --skip-package=/query,/multi_segments
uses: ./.github/workflows/test.yml
with:
- test-name: Integration Standalone
- options: --vv --fail-fast --label-filter \\!slow
+ test-name: Integration Standalone - ${{ matrix.lane.name }}
+ options: --vv --fail-fast --label-filter \\!slow ${{ matrix.lane.extra-options }}
timeout-minutes: 60
- pkg: ./test/integration/standalone/...
+ pkg: ${{ matrix.lane.pkg }}
coverage-flag: integration-standalone
timezone: ${{ matrix.tz }}
-
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 044b62c99..115bc920b 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -54,21 +54,20 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- with:
- fetch-tags: true
- name: Set timezone
run: sudo timedatectl set-timezone ${{ inputs.timezone || 'UTC' }}
- name: Setup build environment
uses: ./.github/actions/setup-build-env
with:
download-artifacts: 'true'
+ setup-node: 'false'
setup-docker: 'false'
- name: Cache tools
uses: actions/cache@v4
id: cache-tool
with:
path: bin
- key: ${{ runner.os }}-test-tool-${{ hashFiles('**version.mk') }}
+ key: ${{ runner.os }}-${{ runner.arch }}-test-tool-${{ hashFiles('scripts/build/version.mk') }}
- name: Test integration and banyand
env:
LOAD_TEST_MINUTES: ${{ inputs.load-test-minutes }}
diff --git a/Makefile b/Makefile
index 9cfcb4942..369258c73 100644
--- a/Makefile
+++ b/Makefile
@@ -274,10 +274,8 @@ include scripts/build/vuln.mk
vuln-check: $(GOVULNCHECK)
$(GOVULNCHECK) -show color,verbose ./...
-check: ## Check that the status is consistent with CI
- $(MAKE) license-check
+check-format: ## Check that generated and formatted files are consistent with CI
$(MAKE) format
- $(MAKE) tidy
git add --renormalize .
mkdir -p /tmp/artifacts
git diff >/tmp/artifacts/check.diff 2>&1
@@ -288,6 +286,10 @@ check: ## Check that the status is consistent with CI
exit 1; \
fi
+check: ## Check that the status is consistent with CI
+ $(MAKE) license-check
+ $(MAKE) check-format
+
pre-push: ## Check source files before pushing to the remote repo
$(MAKE) check-req
$(MAKE) generate
@@ -374,7 +376,7 @@ PUSH_RELEASE_SCRIPTS := $(mk_dir)/scripts/push-release.sh
release-push-candidate: ## Push release candidate
${PUSH_RELEASE_SCRIPTS}
-.PHONY: all $(PROJECTS) clean build default nuke
+.PHONY: all $(PROJECTS) clean build check-format default nuke
.PHONY: lint check tidy format pre-push generate-test-cases capture-test-cases generate-trace-test-cases capture-trace-test-cases generate-stream-test-cases capture-stream-test-cases check-import-boundaries
.PHONY: test test-race test-coverage test-ci test-docker
.PHONY: build-trace-pipeline-plugin build-trace-pipeline-telemetry-plugins build-trace-pipeline-server test-trace-pipeline
diff --git a/mcp/Makefile b/mcp/Makefile
index 00027ae70..926a19cbd 100644
--- a/mcp/Makefile
+++ b/mcp/Makefile
@@ -18,6 +18,7 @@
NAME := mcp
DIST_INDEX := dist/index.js
+NODE_MODULES_STAMP := node_modules/.package-lock.json
IMG_NAME := skywalking-banyandb-mcp
@@ -33,8 +34,11 @@ check-version: install
@node tools/checkversion
.PHONY: install
-install:
- npm ci
+install: $(NODE_MODULES_STAMP)
+
+$(NODE_MODULES_STAMP): package.json package-lock.json
+ npm ci --include=dev
+ touch $@
.PHONY: lint
lint: install
@@ -54,7 +58,7 @@ all: build
.PHONY: generate
generate: install
-$(DIST_INDEX): install
+$(DIST_INDEX): $(NODE_MODULES_STAMP)
@echo "Building $(NAME)"
npm run format:check
npm run lint
diff --git a/test/docker/Makefile b/test/docker/Makefile
index 01c71efd3..aa72c52fc 100644
--- a/test/docker/Makefile
+++ b/test/docker/Makefile
@@ -28,7 +28,7 @@ IMG := $(HUB)/skywalking-banyandb:$(TAG)-testing
build:
@echo "Building $(IMG)"
@pwd
- time docker buildx build --load --no-cache -t $(IMG) -f Dockerfile --provenance=false ../../
+ time docker buildx build --load -t $(IMG) -f Dockerfile --provenance=false ../../
push:
@echo "Pushing $(IMG) with platform linux/amd64,linux/arm64"
diff --git a/ui/Makefile b/ui/Makefile
index 3878bbe9a..ecc949f53 100644
--- a/ui/Makefile
+++ b/ui/Makefile
@@ -18,6 +18,7 @@
NAME := ui
DIST_INDEX := dist/index.html
+NODE_MODULES_STAMP := node_modules/.package-lock.json
include ../scripts/build/version.mk
include ../scripts/build/base.mk
@@ -29,8 +30,11 @@ check-version: install
@node tools/checkversion
.PHONY: install
-install:
- npm install
+install: $(NODE_MODULES_STAMP)
+
+$(NODE_MODULES_STAMP): package.json package-lock.json
+ npm ci --include=dev
+ touch $@
.PHONY: all
all: build
@@ -38,7 +42,7 @@ all: build
.PHONY: generate
generate: install
-$(DIST_INDEX): install
+$(DIST_INDEX): $(NODE_MODULES_STAMP)
@echo "Building $(NAME)"
npm run build
@echo "Done building $(NAME)"