Skip to content

Commit 9cdc50c

Browse files
authored
Merge branch 'master' into fqdn_partition_configuration_2
2 parents f9df583 + 6a40395 commit 9cdc50c

File tree

156 files changed

+2599
-1094
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+2599
-1094
lines changed

.clang-tidy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
CheckOptions: []
2121
# Disable some checks that are not useful for us now.
2222
# They are sorted by names, and should be consistent to build_tools/clang_tidy.py.
23-
Checks: 'abseil-*,boost-*,bugprone-*,cert-*,clang-analyzer-*,concurrency-*,cppcoreguidelines-*,darwin-*,fuchsia-*,google-*,hicpp-*,linuxkernel-*,llvm-*,misc-*,modernize-*,performance-*,portability-*,readability-*,-bugprone-easily-swappable-parameters,-bugprone-lambda-function-name,-bugprone-macro-parentheses,-bugprone-sizeof-expression,-cert-err58-cpp,-concurrency-mt-unsafe,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-avoid-non-const-global-variables,-cppcoreguidelines-macro-usage,-cppcoreguidelines-non-private-member-variables-in-classes,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-union-access,-fuchsia-default-arguments-calls,-fuchsia-multiple-inheritance,-fuchsia-overloaded-operator,-fuchsia-statically-constructed-objects,-google-readability-avoid-underscore-in-googletest-name,-hicpp-avoid-c-arrays,-hicpp-named-parameter,-hicpp-no-array-decay,-llvm-include-order,-misc-definitions-in-headers,-misc-non-private-member-variables-in-classes,-misc-unused-parameters,-modernize-avoid-bind,-modernize-avoid-c-arrays,-modernize-replace-disallow-copy-and-assign-macro,-modernize-use-trailing-return-type,-performance-unnecessary-value-param,-readability-function-cognitive-complexity,-readability-identifier-length,-readability-magic-numbers,-readability-named-parameter,-readability-suspicious-call-argument'
23+
Checks: 'abseil-*,boost-*,bugprone-*,cert-*,clang-analyzer-*,concurrency-*,cppcoreguidelines-*,darwin-*,fuchsia-*,google-*,hicpp-*,linuxkernel-*,llvm-*,misc-*,modernize-*,performance-*,portability-*,readability-*,-bugprone-easily-swappable-parameters,-bugprone-lambda-function-name,-bugprone-macro-parentheses,-bugprone-sizeof-expression,-cert-err58-cpp,-clang-analyzer-cplusplus.NewDelete,-concurrency-mt-unsafe,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-avoid-non-const-global-variables,-cppcoreguidelines-macro-usage,-cppcoreguidelines-non-private-member-variables-in-classes,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-union-access,-fuchsia-default-arguments-calls,-fuchsia-multiple-inheritance,-fuchsia-overloaded-operator,-fuchsia-statically-constructed-objects,-google-readability-avoid-underscore-in-googletest-name,-hicpp-avoid-c-arrays,-hicpp-named-parameter,-hicpp-no-array-decay,-llvm-header-guard,-llvm-include-order,-misc-definitions-in-headers,-misc-non-private-member-variables-in-classes,-misc-unused-parameters,-modernize-avoid-bind,-modernize-avoid-c-arrays,-modernize-replace-disallow-copy-and-assign-macro,-modernize-use-trailing-return-type,-performance-unnecessary-value-param,-readability-function-cognitive-complexity,-readability-identifier-length,-readability-magic-numbers,-readability-named-parameter,-readability-suspicious-call-argument'
2424
ExtraArgs:
2525
ExtraArgsBefore: []
2626
FormatStyle: none

.github/actions/rebuild_thirdparty_if_needed/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ name: Rebuild thirdparty if needed
1919
runs:
2020
using: composite
2121
steps:
22-
- uses: dorny/paths-filter@v2
22+
- uses: dorny/paths-filter@v3.0.2
2323
id: changes
2424
with:
2525
filters: |

.github/workflows/build-push-env-docker.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,41 @@ jobs:
7373
apache/pegasus:build-env-${{ matrix.dockertag }}-${{ github.ref_name }}
7474
- name: Image digest
7575
run: echo ${{ steps.docker_build.outputs.digest }}
76+
77+
build_go_compilation_env_docker_images:
78+
runs-on: ubuntu-latest
79+
env:
80+
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
81+
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
82+
strategy:
83+
fail-fast: false
84+
steps:
85+
- name: Checkout
86+
uses: actions/checkout@v4
87+
- name: Set up QEMU
88+
uses: docker/setup-qemu-action@v3
89+
- name: Set up Docker Buildx
90+
uses: docker/setup-buildx-action@v3
91+
- name: Login to DockerHub
92+
uses: docker/login-action@v3
93+
with:
94+
username: ${{ secrets.DOCKERHUB_USER }}
95+
password: ${{ secrets.DOCKERHUB_TOKEN }}
96+
- name: Build and push
97+
uses: docker/build-push-action@v6
98+
with:
99+
platforms: linux/amd64
100+
context: .
101+
file: ./docker/pegasus-build-env/go/Dockerfile
102+
push: true
103+
tags: |
104+
apache/pegasus:build-env-ubuntu2204-${{ github.ref_name }}-go
105+
# go-client imports thrift package of 0.13.0, so we must use thrift-compiler 0.13.0
106+
# to generate code as well. The thrift-compiler version on ubuntu-20.04 is 0.13.0,
107+
# however ubuntu-20.04 LTS runner has been retired on 2025-04-15. Thus we choose to
108+
# build thrift 0.13.0 in a image based on ubuntu-22.04 whose thrift version is 0.16.0
109+
# by default.
110+
build-args: |
111+
THRIFT_VERSION=0.13.0
112+
- name: Image digest
113+
run: echo ${{ steps.docker_build.outputs.digest }}

.github/workflows/lint_and_test_admin-cli.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,16 @@ jobs:
4141
name: Lint
4242
runs-on: ubuntu-latest
4343
steps:
44-
- uses: actions/checkout@v4
45-
- name: Set up Go
46-
uses: actions/setup-go@v2
44+
- name: Checkout
45+
uses: actions/checkout@v4
46+
- name: Setup Go
47+
uses: actions/setup-go@v4
4748
with:
4849
go-version: 1.18
49-
- name: golangci-lint
50+
- name: Lint
5051
uses: golangci/golangci-lint-action@v3
5152
with:
52-
version: v1.55.2
53+
version: v1.56.2
5354
working-directory: ./admin-cli
5455

5556
build:
@@ -58,8 +59,8 @@ jobs:
5859
steps:
5960
- name: Checkout
6061
uses: actions/checkout@v4
61-
- name: Set up Go
62-
uses: actions/setup-go@v2
62+
- name: Setup Go
63+
uses: actions/setup-go@v4
6364
with:
6465
go-version: 1.18
6566
- name: Compile

.github/workflows/lint_and_test_collector.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
- name: Checkout
4646
uses: actions/checkout@v4
4747
- name: Setup Go
48-
uses: actions/setup-go@v2
48+
uses: actions/setup-go@v4
4949
with:
5050
go-version: 1.18
5151
- name: Format
@@ -57,34 +57,38 @@ jobs:
5757
lint:
5858
name: Lint
5959
needs: format
60-
runs-on: ubuntu-20.04
60+
runs-on: ubuntu-latest
61+
container:
62+
image: apache/pegasus:build-env-ubuntu2204-${{ github.base_ref }}-go
6163
steps:
6264
- name: Checkout
6365
uses: actions/checkout@v4
6466
with:
6567
fetch-depth: 1
66-
- name: Set up Go
68+
- name: Setup Go
6769
uses: actions/setup-go@v4
6870
with:
6971
go-version: 1.18
7072
cache: false
7173
- name: Lint
7274
uses: golangci/golangci-lint-action@v3
7375
with:
74-
version: v1.55.2
76+
version: v1.56.2
7577
working-directory: ./collector
7678

7779
build:
7880
name: Build
7981
needs: lint
80-
runs-on: ubuntu-20.04
82+
runs-on: ubuntu-latest
83+
container:
84+
image: apache/pegasus:build-env-ubuntu2204-${{ github.base_ref }}-go
8185
steps:
8286
- name: Checkout
8387
uses: actions/checkout@v4
8488
with:
8589
fetch-depth: 1
86-
- name: Set up Go
87-
uses: actions/setup-go@v2
90+
- name: Setup Go
91+
uses: actions/setup-go@v4
8892
with:
8993
go-version: 1.18
9094
- name: Build

.github/workflows/lint_and_test_go-client.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Checkout
4848
uses: actions/checkout@v4
4949
- name: Setup Go
50-
uses: actions/setup-go@v2
50+
uses: actions/setup-go@v4
5151
with:
5252
go-version: 1.18
5353
- name: Format
@@ -59,16 +59,14 @@ jobs:
5959
lint:
6060
name: Lint
6161
needs: format
62-
# go-client imports thrift package of 0.13.0, so we must use thrift-compiler 0.13.0
63-
# to generate code as well. The thrift-compiler version on ubuntu-20.04 is 0.13.0
64-
runs-on: ubuntu-20.04
62+
runs-on: ubuntu-latest
63+
container:
64+
image: apache/pegasus:build-env-ubuntu2204-${{ github.base_ref }}-go
6565
steps:
66-
- name: Install thrift
67-
run: sudo apt-get install -y thrift-compiler
6866
- name: Checkout
6967
uses: actions/checkout@v4
7068
- name: Setup Go
71-
uses: actions/setup-go@v2
69+
uses: actions/setup-go@v4
7270
with:
7371
go-version: 1.18
7472
- name: Build
@@ -119,8 +117,8 @@ jobs:
119117
cd - && rm -rf thrift-${THRIFT_VERSION} v${THRIFT_VERSION}.tar.gz
120118
- name: Checkout
121119
uses: actions/checkout@v4
122-
- name: Set up Go
123-
uses: actions/setup-go@v2
120+
- name: Setup Go
121+
uses: actions/setup-go@v4
124122
with:
125123
go-version: 1.18
126124
- uses: "./.github/actions/download_artifact"

.github/workflows/lint_and_test_java-client.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
java: [ '8', '11']
8181
steps:
8282
- uses: actions/checkout@v4
83-
- uses: actions/cache@v2
83+
- uses: actions/cache@v3
8484
with:
8585
path: ~/.m2/repository
8686
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

.github/workflows/lint_and_test_pegic.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,16 @@ jobs:
4141
name: Lint
4242
runs-on: ubuntu-latest
4343
steps:
44-
- uses: actions/checkout@v4
45-
- name: golangci-lint
44+
- name: Checkout
45+
uses: actions/checkout@v4
46+
- name: Setup Go
47+
uses: actions/setup-go@v4
48+
with:
49+
go-version: 1.18
50+
- name: Lint
4651
uses: golangci/golangci-lint-action@v3
4752
with:
48-
version: v1.55.2
53+
version: v1.56.2
4954
working-directory: ./pegic
5055

5156
build:
@@ -54,8 +59,8 @@ jobs:
5459
steps:
5560
- name: Checkout
5661
uses: actions/checkout@v4
57-
- name: Set up Go
58-
uses: actions/setup-go@v2
62+
- name: Setup Go
63+
uses: actions/setup-go@v4
5964
with:
6065
go-version: 1.18
6166
- name: Compile

.github/workflows/lint_and_test_scala-client.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,29 @@ env:
3535
ARTIFACT_NAME: release_for_scala_client
3636

3737
jobs:
38-
format:
38+
check_format:
3939
name: Format
4040
runs-on: ubuntu-latest
4141
steps:
4242
- uses: actions/checkout@v4
4343
- uses: actions/setup-java@v1
4444
with:
4545
java-version: 8
46-
- name: format
46+
- name: Install sbt
47+
run: |
48+
curl -s "https://get.sdkman.io" | bash
49+
source "${HOME}/.sdkman/bin/sdkman-init.sh"
50+
sdk install sbt
51+
sbt -V
52+
- name: Check format with sbt
4753
working-directory: ./scala-client
48-
run: sbt scalafmtSbtCheck scalafmtCheck test:scalafmtCheck
54+
run: |
55+
source "${HOME}/.sdkman/bin/sdkman-init.sh"
56+
sbt scalafmtSbtCheck scalafmtCheck test:scalafmtCheck
4957
5058
build_server:
5159
name: Build server
52-
needs: format
60+
needs: check_format
5361
runs-on: ubuntu-latest
5462
env:
5563
USE_JEMALLOC: OFF
@@ -74,7 +82,7 @@ jobs:
7482
java: [ '8', '11']
7583
steps:
7684
- uses: actions/checkout@v4
77-
- uses: actions/cache@v2
85+
- uses: actions/cache@v3
7886
with:
7987
path: ~/.m2/repository
8088
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -83,10 +91,10 @@ jobs:
8391
- uses: actions/setup-java@v1
8492
with:
8593
java-version: ${{ matrix.java }}
86-
- name: Setup sbt
94+
- name: Install sbt
8795
run: |
8896
curl -s "https://get.sdkman.io" | bash
89-
source /github/home/.sdkman/bin/sdkman-init.sh
97+
source "${HOME}/.sdkman/bin/sdkman-init.sh"
9098
sdk install sbt
9199
sbt -V
92100
- name: Download thrift
@@ -107,5 +115,5 @@ jobs:
107115
- name: Run Scala client tests
108116
working-directory: ./scala-client
109117
run: |
110-
source /github/home/.sdkman/bin/sdkman-init.sh
118+
source "${HOME}/.sdkman/bin/sdkman-init.sh"
111119
sbt test

.github/workflows/regular-build.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,14 @@ jobs:
8686

8787
build_and_lint_go:
8888
name: Build and Lint Golang
89-
runs-on: ubuntu-20.04
89+
runs-on: ubuntu-latest
90+
container:
91+
image: apache/pegasus:build-env-ubuntu2204-${{ github.ref_name }}-go
9092
steps:
91-
- name: Install thrift
92-
# go-client imports thrift package of 0.13.0, so we must use thrift-compiler 0.13.0
93-
# to generate code as well. The thrift-compiler version on ubuntu-20.04 is 0.13.0
94-
run: sudo apt-get install -y thrift-compiler
9593
- name: Checkout
9694
uses: actions/checkout@v4
97-
- name: Set up Go
98-
uses: actions/setup-go@v2
95+
- name: Setup Go
96+
uses: actions/setup-go@v4
9997
with:
10098
go-version: 1.18
10199
- name: Build go-client
@@ -104,23 +102,31 @@ jobs:
104102
- name: Lint go-client
105103
uses: golangci/golangci-lint-action@v3
106104
with:
107-
version: v1.55.2
105+
version: v1.56.2
108106
working-directory: ./go-client
107+
- name: Build collector
108+
run: make
109+
working-directory: ./collector
110+
- name: Lint collector
111+
uses: golangci/golangci-lint-action@v3
112+
with:
113+
version: v1.56.2
114+
working-directory: ./collector
109115
- name: Build admin-cli
110116
run: make
111117
working-directory: ./admin-cli
112118
- name: Lint admin-cli
113119
uses: golangci/golangci-lint-action@v3
114120
with:
115-
version: v1.55.2
121+
version: v1.56.2
116122
working-directory: ./admin-cli
117123
- name: Build pegic
118124
run: make
119125
working-directory: ./pegic
120126
- name: Lint pegic
121127
uses: golangci/golangci-lint-action@v3
122128
with:
123-
version: v1.55.2
129+
version: v1.56.2
124130
working-directory: ./pegic
125131

126132
build_java:
@@ -130,7 +136,7 @@ jobs:
130136
matrix:
131137
java: [ '8', '11']
132138
steps:
133-
- uses: actions/cache@v2
139+
- uses: actions/cache@v3
134140
with:
135141
path: ~/.m2/repository
136142
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

.golangci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
# under the License.
1717
---
1818
linters:
19+
# TODO(wangdan): consider replacing 'golint' with 'revive' because 'golint' is
20+
# deprecated (since v1.41.0, its repository has been archived by the owner).
21+
#
22+
# After Go is upgraded to v1.22, consider replacing 'exportloopref' with 'copyloopvar'
23+
# because as of Go 1.22, the problem resolved by 'exportloopref' no longer occurs and
24+
# fixed by Go team (https://go.dev/blog/loopvar-preview).
25+
#
26+
# After all of above are bumped, consider upgrading golangci-lint (e.g. to v1.64.8).
1927
enable:
2028
- gofmt
2129
- goimports

.licenserc.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,6 @@ header:
499499
- 'src/runtime/fault_injector.h'
500500
- 'src/runtime/global_config.cpp'
501501
- 'src/runtime/global_config.h'
502-
- 'src/runtime/message_utils.cpp'
503502
- 'src/runtime/nativerun.cpp'
504503
- 'src/runtime/nativerun.h'
505504
- 'src/runtime/node_scoper.h'

admin-cli/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ require (
6666
github.com/tidwall/gjson v1.14.0 // indirect
6767
github.com/tidwall/match v1.1.1 // indirect
6868
github.com/tidwall/pretty v1.2.0 // indirect
69-
golang.org/x/net v0.23.0 // indirect
70-
golang.org/x/sys v0.18.0 // indirect
71-
golang.org/x/text v0.14.0 // indirect
69+
golang.org/x/net v0.36.0 // indirect
70+
golang.org/x/sys v0.30.0 // indirect
71+
golang.org/x/text v0.22.0 // indirect
7272
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
7373
gopkg.in/ini.v1 v1.67.0 // indirect
7474
gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637 // indirect

0 commit comments

Comments
 (0)