From 6c92080ca46b2dca931a037500411ec0cf6198bc Mon Sep 17 00:00:00 2001 From: imbajin Date: Mon, 2 Nov 2026 21:42:11 +0800 Subject: [PATCH 1/4] fix(vermeer): align release version - Synchronize Vermeer with Computer 1.8.0 - Check both release versions in Vermeer CI - Run the check when the Computer POM changes --- .github/workflows/vermeer-ci.yml | 17 +++++++++++++++++ vermeer/README.md | 4 ++++ vermeer/apps/version/version.go | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/vermeer-ci.yml b/.github/workflows/vermeer-ci.yml index 11ba4a4c9..31d01d343 100644 --- a/.github/workflows/vermeer-ci.yml +++ b/.github/workflows/vermeer-ci.yml @@ -23,10 +23,12 @@ on: - /^release-.*$/ paths: - vermeer/** + - computer/pom.xml - .github/workflows/vermeer-ci.yml pull_request: paths: - vermeer/** + - computer/pom.xml - .github/workflows/vermeer-ci.yml defaults: @@ -44,6 +46,21 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Check release versions + run: | + python3 - <<'PY' + import re + import xml.etree.ElementTree as ET + + root = ET.parse('../computer/pom.xml').getroot() + revision = root.findtext('{*}properties/{*}revision') + source = open('apps/version/version.go', encoding='utf-8').read() + match = re.search(r'^const Version = "([^"]+)"$', source, re.MULTILINE) + if not revision or not match or revision != match.group(1): + raise SystemExit(f'Computer revision {revision!r} and Vermeer version ' + f'{match.group(1) if match else None!r} must match') + PY + - name: Set up Go uses: actions/setup-go@v5 with: diff --git a/vermeer/README.md b/vermeer/README.md index 3f7a85965..d41a2789b 100644 --- a/vermeer/README.md +++ b/vermeer/README.md @@ -152,6 +152,10 @@ cd vermeer The `--env` parameter specifies the configuration file name in the `config/` folder (e.g., `master.ini`, `worker.ini`). +Master and Worker must run the same Vermeer version: registration rejects a +version mismatch. When upgrading, rebuild and update all Master and Worker +images together, and expect Workers to be unavailable during the transition. + #### Using the Shell Script Configure parameters in `vermeer.sh`, then: diff --git a/vermeer/apps/version/version.go b/vermeer/apps/version/version.go index 08c8433ee..e195aad92 100644 --- a/vermeer/apps/version/version.go +++ b/vermeer/apps/version/version.go @@ -17,4 +17,4 @@ under the License. package version -const Version = "1.7.0" +const Version = "1.8.0" From a102f1f82395f20f1d7c6ccd465ea1342eca4684 Mon Sep 17 00:00:00 2001 From: imbajin Date: Mon, 2 Nov 2026 23:28:48 +0800 Subject: [PATCH 2/4] fix(vermeer): match release branches in CI - Use a GitHub Actions glob for release branches - Run version checks on release branch pushes - Preserve existing workflow path filters --- .github/workflows/vermeer-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vermeer-ci.yml b/.github/workflows/vermeer-ci.yml index 31d01d343..539f908d3 100644 --- a/.github/workflows/vermeer-ci.yml +++ b/.github/workflows/vermeer-ci.yml @@ -20,7 +20,7 @@ on: push: branches: - master - - /^release-.*$/ + - 'release-*' paths: - vermeer/** - computer/pom.xml From ac50670a896dc5105222cffea5ce18d80f352ce2 Mon Sep 17 00:00:00 2001 From: imbajin Date: Tue, 3 Nov 2026 16:19:50 +0800 Subject: [PATCH 3/4] fix(vermeer): correct version mismatch message - report the master version under the correct label - report the worker version under the correct label - cover registration failures for mismatched versions --- vermeer/apps/master/bl/grpc_handlers.go | 2 +- vermeer/apps/master/bl/worker_availability_test.go | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/vermeer/apps/master/bl/grpc_handlers.go b/vermeer/apps/master/bl/grpc_handlers.go index f116c8f02..cbbdc55ea 100644 --- a/vermeer/apps/master/bl/grpc_handlers.go +++ b/vermeer/apps/master/bl/grpc_handlers.go @@ -60,7 +60,7 @@ func (h *ServerHandler) SayHelloMaster(ctx context.Context, req *pb.HelloMasterR // check worker version, if not match, deny if req.Version != version.Version { - err := fmt.Errorf("registration denied: inconsistent registration version! master version %v, worker version %v", req.Version, version.Version) + err := fmt.Errorf("registration denied: inconsistent registration version! master version %v, worker version %v", version.Version, req.Version) logrus.Errorf(err.Error()) return &pb.HelloMasterResp{Base: &pb.BaseResponse{ErrorCode: -1, Message: err.Error()}}, err } diff --git a/vermeer/apps/master/bl/worker_availability_test.go b/vermeer/apps/master/bl/worker_availability_test.go index 7a46337b2..8c8d6128a 100644 --- a/vermeer/apps/master/bl/worker_availability_test.go +++ b/vermeer/apps/master/bl/worker_availability_test.go @@ -45,6 +45,17 @@ type registrationWindowWorker struct { release chan struct{} } +func TestRegistrationVersionMismatchReportsCorrectVersions(t *testing.T) { + workerVersion := "incompatible-worker-version" + resp, err := new(ServerHandler).SayHelloMaster(context.Background(), &pb.HelloMasterReq{ + Version: workerVersion, + }) + want := fmt.Sprintf("registration denied: inconsistent registration version! master version %s, worker version %s", version.Version, workerVersion) + if err == nil || err.Error() != want || resp.GetBase().GetMessage() != want { + t.Fatalf("unexpected response for version mismatch: response=%v error=%v", resp, err) + } +} + type dispatchTestStream struct { grpc.ServerStream requests []*pb.LoadGraphTaskResp From 5d28c4a1baed1889acfeeef6a5903c99ccbf9a5a Mon Sep 17 00:00:00 2001 From: imbajin Date: Tue, 3 Nov 2026 17:28:51 +0800 Subject: [PATCH 4/4] fix(vermeer): correct version build checks - select the registration version test in CI - extract the version constant without license text - keep archive and Docker version values consistent --- .github/workflows/vermeer-ci.yml | 2 +- vermeer/build.sh | 2 +- vermeer/build_docker.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/vermeer-ci.yml b/.github/workflows/vermeer-ci.yml index 539f908d3..12da842b0 100644 --- a/.github/workflows/vermeer-ci.yml +++ b/.github/workflows/vermeer-ci.yml @@ -94,7 +94,7 @@ jobs: go test -race ./apps/auth ./cmd/vermeer-token go test -race ./apps/common go test -race ./apps/master/workers ./apps/master/services - go test -race ./apps/master/bl -run 'Test(WorkerAvailability|HugegraphLoadAuthorization)' + go test -race ./apps/master/bl -run 'Test(WorkerAvailability|HugegraphLoadAuthorization|RegistrationVersionMismatch)' go test -race ./apps/worker go test -race ./apps/structure -run 'Test(VertexStore|GraphPropagates|MemoryVertex|HugegraphSchema)' diff --git a/vermeer/build.sh b/vermeer/build.sh index 7d28846a3..4f00cd880 100644 --- a/vermeer/build.sh +++ b/vermeer/build.sh @@ -45,7 +45,7 @@ cd asset && go generate && cd .. ARCH=$1 CGO_ENABLED=0 GOOS=linux GOARCH="$ARCH" go build -VERSION=$(cat ./apps/version/version.go | grep 'Version' | awk -F '"' '{print $2}') +VERSION=$(awk -F '"' '/^const Version[[:space:]]/ {print $2}' ./apps/version/version.go) cp tools/supervisord/linux_"$ARCH"/supervisord supervisord tar --exclude=config/afs_client.conf -zcvf vermeer-"$VERSION"-"$ARCH".tar.gz vermeer config/ supervisord vermeer.sh mem_supervisor.sh release-docs/LICENSE release-docs/NOTICE release-docs/licenses/ diff --git a/vermeer/build_docker.sh b/vermeer/build_docker.sh index 880664d35..0bac5df07 100644 --- a/vermeer/build_docker.sh +++ b/vermeer/build_docker.sh @@ -15,7 +15,7 @@ # limitations under the License. # #!/usr/bin/env bash -VERSION=$(cat ./apps/version/version.go | grep 'Version' | awk -F '"' '{print $2}') +VERSION=$(awk -F '"' '/^const Version[[:space:]]/ {print $2}' ./apps/version/version.go) USERNAME=$1 # 用户邮箱前缀