Skip to content

Commit e89fee3

Browse files
committed
Merge branch 'main' of https://github.com/datafuselabs/databend into add_runtime_bloom_filter_for_merge_into
2 parents 7e8717d + 96c39f7 commit e89fee3

File tree

488 files changed

+18077
-4998
lines changed

Some content is hidden

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

488 files changed

+18077
-4998
lines changed

โ€Ž.github/workflows/merge_group.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "PR Assistant"
2+
3+
on:
4+
merge_group:
5+
6+
jobs:
7+
title:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Skip title check
11+
shell: bash
12+
run: exit 0
13+
14+
cla:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Skip CLA check
18+
shell: bash
19+
run: exit 0

โ€Ž.github/workflows/pr.yml

Lines changed: 87 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
- edited
1010
- ready_for_review
1111
- converted_to_draft
12-
merge_group:
1312

1413
permissions:
1514
pull-requests: write
@@ -20,20 +19,15 @@ jobs:
2019
runs-on: ubuntu-latest
2120
steps:
2221
- name: Check PR title if not sematic
23-
uses: actions/github-script@v6
22+
uses: actions/github-script@v7
2423
id: check
2524
with:
2625
script: |
27-
if (!context.payload.pull_request) {
28-
core.info('PR payload is null');
29-
core.setOutput('title', 'ignore');
30-
return;
31-
}
3226
const title = context.payload.pull_request.title;
3327
const regex = /^(rfc|feat|fix|refactor|ci|docs|chore)(\([a-z0-9-]+\))?:/;
3428
const m = title.match(regex);
3529
if (!m) {
36-
core.error('PR title is not semantic');
30+
core.setFailed('PR title is not semantic');
3731
core.setOutput('title', 'not-semantic');
3832
return;
3933
}
@@ -72,14 +66,14 @@ jobs:
7266
});
7367
core.setOutput('title', 'semantic');
7468
- name: Delete Comment
75-
if: steps.check.outputs.title == 'semantic'
69+
if: always() && steps.check.outputs.title == 'semantic'
7670
uses: everpcpc/comment-on-pr-action@v1
7771
with:
7872
token: ${{ github.token }}
7973
identifier: 'pr-assistant-title'
8074
delete: true
8175
- name: Comment on PR
82-
if: steps.check.outputs.title == 'not-semantic'
76+
if: always() && steps.check.outputs.title == 'not-semantic'
8377
uses: everpcpc/comment-on-pr-action@v1
8478
with:
8579
token: ${{ github.token }}
@@ -112,32 +106,27 @@ jobs:
112106
runs-on: ubuntu-latest
113107
steps:
114108
- name: Check CLA if not signed
115-
uses: actions/github-script@v6
109+
uses: actions/github-script@v7
116110
id: check
117111
with:
118112
script: |
119-
if (!context.payload.pull_request) {
120-
core.info('PR payload is null');
121-
core.setOutput('cla', 'ignore');
122-
return;
123-
}
124113
const body = context.payload.pull_request.body;
125114
const regex = /I hereby agree to the terms of the CLA available at: https:\/\/docs.databend.com\/dev\/policies\/cla\//;
126115
if (!regex.test(body)) {
127-
core.error('CLA is not signed');
116+
core.setFailed('CLA is not signed');
128117
core.setOutput('cla', 'not-signed');
129118
} else {
130119
core.setOutput('cla', 'signed');
131120
}
132121
- name: Delete Comment
133-
if: steps.check.outputs.cla == 'signed'
122+
if: always() && steps.check.outputs.cla == 'signed'
134123
uses: everpcpc/comment-on-pr-action@v1
135124
with:
136125
token: ${{ github.token }}
137126
identifier: 'pr-assistant-cla'
138127
delete: true
139128
- name: Comment on PR
140-
if: steps.check.outputs.cla == 'not-signed'
129+
if: always() && steps.check.outputs.cla == 'not-signed'
141130
uses: everpcpc/comment-on-pr-action@v1
142131
with:
143132
token: ${{ github.token }}
@@ -154,3 +143,82 @@ jobs:
154143
155144
- Close #issue
156145
```
146+
147+
description:
148+
runs-on: ubuntu-latest
149+
steps:
150+
- name: Check PR description checkbox
151+
uses: actions/github-script@v7
152+
id: check
153+
with:
154+
script: |
155+
const body = context.payload.pull_request.body;
156+
let section = "summary";
157+
let testsChecked = false;
158+
let changesChecked = false;
159+
for (const line of body.split('\n')) {
160+
if (line.includes("## Tests")) {
161+
section = "tests";
162+
core.info('checking section: tests');
163+
continue;
164+
} else if (line.includes("## Type of change")) {
165+
section = "changes";
166+
core.info('checking section: changes');
167+
continue;
168+
}
169+
if (section === "tests") {
170+
if (line.startsWith("- [x] ")) {
171+
testsChecked = true;
172+
core.info(`tests checked: ${line}`);
173+
core.setOutput('tests', 'checked');
174+
continue;
175+
}
176+
} else if (section === "changes") {
177+
if (line.startsWith("- [x] ")) {
178+
changesChecked = true;
179+
core.info(`type of change checked: ${line}`);
180+
core.setOutput('changes', 'checked');
181+
continue;
182+
}
183+
}
184+
}
185+
if (!testsChecked) {
186+
core.setOutput('tests', 'not-checked');
187+
core.setFailed('Tests are not checked');
188+
}
189+
if (!changesChecked) {
190+
core.setOutput('changes', 'not-checked');
191+
core.setFailed('Type of Changes are not checked');
192+
}
193+
- name: Delete Comment for Tests
194+
if: always() && steps.check.outputs.tests == 'checked'
195+
uses: everpcpc/comment-on-pr-action@v1
196+
with:
197+
token: ${{ github.token }}
198+
identifier: 'pr-assistant-description-tests'
199+
delete: true
200+
- name: Delete Comment for Changes
201+
if: always() && steps.check.outputs.changes == 'checked'
202+
uses: everpcpc/comment-on-pr-action@v1
203+
with:
204+
token: ${{ github.token }}
205+
identifier: 'pr-assistant-description-changes'
206+
delete: true
207+
- name: Comment on PR for Tests
208+
if: always() && steps.check.outputs.tests != 'checked'
209+
uses: everpcpc/comment-on-pr-action@v1
210+
with:
211+
token: ${{ github.token }}
212+
identifier: 'pr-assistant-description-tests'
213+
body: |
214+
At least one test kind must be checked in the PR description.
215+
@${{ github.event.pull_request.user.login }} please update it ๐Ÿ™.
216+
- name: Comment on PR for Changes
217+
if: always() && steps.check.outputs.changes != 'checked'
218+
uses: everpcpc/comment-on-pr-action@v1
219+
with:
220+
token: ${{ github.token }}
221+
identifier: 'pr-assistant-description-changes'
222+
body: |
223+
At least one type of change must be checked in the PR description.
224+
@${{ github.event.pull_request.user.login }} please update it ๐Ÿ™.

โ€ŽCargo.lock

Lines changed: 33 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

โ€ŽCargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,10 @@ opendal = { version = "0.45.0", features = [
120120
sled = { git = "https://github.com/datafuse-extras/sled", tag = "v0.34.7-datafuse.1", default-features = false }
121121

122122
# openraft for debugging
123-
openraft = { git = "https://github.com/drmingdrmer/openraft", tag = "v0.9.0-alpha.8", features = [
123+
openraft = { git = "https://github.com/datafuselabs/openraft", tag = "v0.9.0", features = [
124124
"serde",
125125
"tracing-log",
126+
"generic-snapshot-data",
126127
"storage-v2",
127128
"loosen-follower-log-revert", # allows removing all data from a follower and restoring from the leader.
128129
] }

โ€ŽMakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,5 +114,7 @@ clean:
114114

115115
genproto:
116116
python -m grpc_tools.protoc -Isrc/common/cloud_control/proto/ --python_out=tests/cloud_control_server/ --grpc_python_out=tests/cloud_control_server/ src/common/cloud_control/proto/task.proto
117+
python -m grpc_tools.protoc -Isrc/common/cloud_control/proto/ --python_out=tests/cloud_control_server/ --grpc_python_out=tests/cloud_control_server/ src/common/cloud_control/proto/notification.proto
118+
python -m grpc_tools.protoc -Isrc/common/cloud_control/proto/ --python_out=tests/cloud_control_server/ --grpc_python_out=tests/cloud_control_server/ src/common/cloud_control/proto/timestamp.proto
117119

118120
.PHONY: setup test run build fmt lint clean docs

0 commit comments

Comments
ย (0)