Skip to content

Commit 526d3ea

Browse files
authored
Merge pull request #908 from oceanbase/merge_422bp1_into_main
merge dev/4.2.2 into main
2 parents 3e8706f + 411e84b commit 526d3ea

File tree

103 files changed

+2489
-715
lines changed

Some content is hidden

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

103 files changed

+2489
-715
lines changed

.secignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
http://pmd.sourceforge.net*
100100
https://pmd.github.io*
101101
http://ns.adobe.com*
102+
https://farm-ce.oss-cn-heyuan.aliyuncs.com
102103

103104

104105
--------------------------------------------------------

CHANGELOG-zh-CN.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# OceanBase Developer Center (ODC) CHANGELOG
22

3+
## 4.2.2 bp (2023-11-23)
4+
5+
### 缺陷修复
6+
7+
数据归档
8+
9+
- 数据归档子任务开始运行后更新限流器配置无法生效
10+
- 数据清理任务没有运行
11+
12+
数据脱敏
13+
14+
- 自动扫描敏感列场景下输入恶意识别规则会导致正则表达式拒绝服务
15+
16+
SQL 执行
17+
18+
- MySQL 模式下以科学计数法展示 NUMBER 类型的数据
19+
20+
PL 运行
21+
22+
- 无法查看游标的内容
23+
24+
SQL-Check
25+
26+
- 数据库没有报语法错的时候 SQL-Check 依然会提示语法错误
27+
328
## 4.2.2 (2023-11-07)
429

530
### 功能变化

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# OceanBase Developer Center (ODC) CHANGELOG
22

3+
## 4.2.2 bp (2023-11-23)
4+
5+
### Bug fixes
6+
7+
Data archiving
8+
9+
- After the data archiving subtask starts running, updating the current limiter configuration cannot take effect.
10+
- Data cleaning task is not running
11+
12+
Data desensitization
13+
14+
- Entering malicious identification rules in the scenario of automatic scanning of sensitive columns will result in a denial of service by regular expressions
15+
16+
SQL execution
17+
18+
- Display NUMBER type data in scientific notation in MySQL mode
19+
20+
PL run
21+
22+
- Unable to view the contents of the cursor
23+
24+
SQL-Check
25+
26+
- When the database does not report syntax errors, SQL-Check will still prompt syntax errors.
27+
328
## 4.2.2 (2023-11-07)
429

530
### Feature

CHANGELOG.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,44 @@
11
(unreleased)
22
------------
33

4+
New
5+
~~~
6+
- Feat(notification): support send notification when schedule job failed
7+
(#711) [LuckyLeo]
8+
- Feat(jdbc): upgrade jdbc to 2.4.7.1 (#761) [LuckyLeo]
9+
- Feat(ob-sql-parser): supports insert statement and add timeout
10+
settings (#754) [IL MARE]
11+
12+
Fix
13+
~~~
14+
- Fix(migrate): failed to start up when there is no users or
15+
organizations (#860) [IL MARE]
16+
- Fix(dlm):update limiter failed after data-delete job was created.
17+
(#840) [guowl3]
18+
- Fix(data-security): regex column recognization rule may suffer ReDos 2
19+
(#848) [XiaoYang]
20+
- Fix(data-security): regex column recognization rule may suffer ReDos
21+
(#843) [XiaoYang]
22+
- Fix(dlm): data delete failed after data archived. (#735) [guowl3]
23+
- Fix(name): change resource name length limit from 64 to 128 (#839)
24+
[XiaoYang]
25+
- Fix(security): add white list for security scanning and modify mysql
26+
pl parser's g4 (#837) [IL MARE]
27+
- Fix(sql-execute): fix number data display error format (#764) [IL
28+
MARE]
29+
- Fix(pldebug): pldebug monitor does not exit block process exiting
30+
(#765) [yizhou]
31+
- Fix(pl): fix column name is wrong when viewing cursor's content (#757)
32+
[IL MARE]
33+
- Fix(sql-check): avoid reporting syntax error when sql is executed
34+
successfully (#748) [IL MARE]
35+
- Fix(web): response header content-type would be application/xml while
36+
using RestTemplate (#722) [pynzzZ]
37+
38+
39+
v4.2.2 (2023-11-07)
40+
-------------------
41+
442
New
543
~~~
644
- Feat(dlm):support breakpoint recovery (#635) [guowl3]
@@ -36,6 +74,18 @@ Changes
3674

3775
Fix
3876
~~~
77+
- Fix(dlm):wrong order status when task is rollback (#707) [guowl3]
78+
- Fix(sql-execute): no trace id when sql executing failed (#700)
79+
[LuckyLeo]
80+
- Fix(SSO):saved SSO intergration test login failed (#698) [Ang]
81+
- Fix(SSO):saved SSO intergration test login failed (#698) [Ang]
82+
- Fix(SSO):saved SSO intergration test login failed (#698) [Ang]
83+
- Fix(sql-parser): failed to report syntax error if the input's any
84+
prefix is grammatical (#699) [IL MARE]
85+
- Fix(datasource): make 'socketTimeout' and 'connectTimeout' settings
86+
work for backend datasource (#691) [IL MARE]
87+
- Fix(result-set-export): get wrong filename for result-set export task
88+
on cloud (#685) [LuckyLeo]
3989
- Fix(dlm): submit task got condition not supported error while
4090
condition contains subquery (#668) [guowl3]
4191
- Fix(database-change): failed to view a scheduled database change task

client

Submodule client updated 25 files

distribution/docker/build.sh

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,46 @@
44

55
cd $(dirname "$0") || exit 1
66

7+
function get_cpu_arch() {
8+
local cpu_arch=$(uname -m)
9+
case "$cpu_arch" in
10+
x86*)
11+
cpu_arch="amd64"
12+
;;
13+
aarch*)
14+
cpu_arch="arm64"
15+
;;
16+
*)
17+
cpu_arch="unknown"
18+
;;
19+
esac
20+
echo "${cpu_arch}"
21+
}
22+
23+
function get_odc_version() {
24+
local odc_version=$(cat "../odc-server-VER.txt" | sed 's/[ \s\t\n\r]*//g')
25+
echo "${odc_version}"
26+
}
27+
728
main() {
829

930
local register="docker.io"
1031
local namespace="oceanbase"
1132
local app_name=odc
1233
local image_name=${register}/${namespace}/${app_name}
13-
local image_tag=${2:-"latest"}
34+
local image_tag=${2:-$(get_odc_version)}
35+
local cpu_arch=$(get_cpu_arch)
36+
37+
echo "image_name=${image_name}, image_tag=${image_tag}, cpu_arch=${cpu_arch}"
1438

1539
case $1 in
16-
build-odc)
40+
build)
1741
if [ ! -e resources/*.rpm ]; then
1842
echo "There is no rpm packages in \"resources\""
1943
echo "run \"../../script/build_rpm.sh\" to create rpm and copy to resources/"
2044
exit 1
2145
fi
22-
docker build -t ${image_name}:${image_tag} -f odc/Dockerfile .
46+
docker build --build-arg "ARCH=${cpu_arch}" -t ${image_name}:${image_tag} -f odc/Dockerfile .
2347
;;
2448
tag)
2549
docker tag ${image_name}:${image_tag} ${image_name}:latest
@@ -32,15 +56,21 @@ main() {
3256
fi
3357
docker login --username=${username} ${register}
3458
;;
59+
save)
60+
echo "save docker image to resources/odc-${image_tag}-${cpu_arch}.tar.gz"
61+
docker save ${image_name}:${image_tag} |
62+
gzip > resources/odc-${image_tag}-${cpu_arch}.tar.gz
63+
;;
3564
push)
3665
docker tag ${image_name}:${image_tag} ${image_name}:latest
3766
docker push ${image_name}:${image_tag}
3867
docker push ${image_name}:latest
3968
;;
4069
*)
41-
echo "Usage: build.sh build-odc [ <IMAGE_TAG> ]"
70+
echo "Usage: build.sh build <IMAGE_TAG:odc_version>"
4271
echo " build.sh login <USERNAME>"
43-
echo " build.sh push [ <IMAGE_TAG> ]"
72+
echo " build.sh push <IMAGE_TAG:odc_version>"
73+
echo " build.sh save <IMAGE_TAG:odc_version>"
4474
;;
4575
esac
4676
}

distribution/docker/odc/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
# the jdk version used in docker is java-1.8.0-openjdk-1.8.0.262
55
# 2021-7-15:sync centos7 base image to aliyun docker reg for build stablility
66
# 2022-05-10:base image change to anolisos8 for avoid system vulnerabilities
7-
FROM docker.io/openanolis/anolisos:8.6-x86_64
7+
# 2023-11-09: one Dockerfile for different cpu architectures, amd64 and arm64
8+
ARG ARCH=amd64
9+
FROM docker.io/openanolis/anolisos:8.6-x86_64 AS amd64-base
10+
FROM docker.io/openanolis/anolisos:8.6-aarch64 AS arm64-base
11+
FROM ${ARCH}-base AS base
812

913
# set labels
1014
LABEL maintainer="ODC <[email protected]>"

docs/en-US/DEVELOPER_GUIDE.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,16 @@ When plaintext configuration is identified, EncryptableConfiguration will automa
231231

232232
## 3.1 jar build and run
233233

234+
### 3.1.1 Dependent component installation
235+
236+
ODC relies on 2 self-developed components, which you can see in `lib` respectively. In the official release, if these two components are modified, we will upload them to the maven central warehouse for reference in advance, but during the development process, we will reference them through local installation. You need to manually install these two components locally before building, otherwise the build may not be successful. You can complete the installation of dependent components through the following shell script:
237+
238+
```shell
239+
script/build_libs.sh
240+
```
241+
242+
### 3.1.2 Build and start
243+
234244
Build or run scripts locate at `script` directory.
235245

236246
Build
@@ -316,7 +326,7 @@ The first run will fail because there are no startup parameters configured, and
316326
When starting ODC Server, add the following configuration to the startup options, which will automatically pull in the front-end resources.
317327

318328
```shell
319-
--ODC_INDEX_PAGE_URI=http://alipay-rmsdeploy-image.cn-hangzhou.alipay.aliyun-inc.com/oceanbase/odc/release-4.2.0/index.html
329+
--ODC_INDEX_PAGE_URI=http://static-resource-server/dev-4.2.2/index.html
320330
```
321331

322332
### 3.3.1 Run arguments
@@ -329,7 +339,21 @@ Notice here we use Spring environment variables arguments `--`, not VM options
329339
--ODC_DATABASE_PASSWORD=your_metadb_password --server.port=8989
330340
```
331341

332-
### 3.3.2 Configuration
342+
### 3.3.2 Build support components
343+
344+
First, you need to complete the installation of dependent components according to the instructions in Chapter 3.1.1. If you have already completed this step, please ignore it.
345+
346+
Next, you need to complete the build of the ODC plugin. You can see them in the `server/plugins` and `server/starters` directories. You can complete the build through the following shell command:
347+
348+
```shell
349+
mvn clean package -Dmaven.test.skip=true
350+
```
351+
352+
The building of the plugin is integrated into the ODC building process. By default, you can see these built plugins in the `distribution/plugins` and `distribution/starters` directories:
353+
354+
![image.png](./images/odc-plugins-starters.png)
355+
356+
### 3.3.3 Configuration
333357

334358
Run OdcServer
335359
![image.png](../en-US/images/idea-run-configuration-start-odc-server.png)
66.8 KB
Loading

docs/zh-CN/DEVELOPER_GUIDE.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,16 @@ odc.mysql.default.commandline=your_mysql_test_server_mysql_cli_commandline
203203

204204
## 3.1 jar 构建和启动
205205

206+
### 3.1.1 依赖组件安装
207+
208+
ODC 依赖 2 个自研组件,您可以分别在`lib`目录下看到它们。在正式的发布中,如果对这 2 个组件进行了修改,我们会提前将其上传至 maven 中央仓库以供引用,但是在开发过程中我们是通过本地安装的方式进行引用的。您在构建之前需要手动将这 2 个组件安装到本地,否则可能会导致构建不成功。您可以通过以下 shell 脚本完成依赖组件的安装:
209+
210+
```shell
211+
script/build_libs.sh
212+
```
213+
214+
### 3.1.2 构建和启动
215+
206216
构建和启动可以使用 `script` 目录的脚本实现,过程如下
207217

208218
构建
@@ -288,7 +298,7 @@ OdcServer 类是 odc-server 程序入口,可直接运行。
288298
启动 ODC Server 时在启动项中添加如下配置,会自动拉取前端资源。
289299

290300
```shell
291-
--ODC_INDEX_PAGE_URI=http://alipay-rmsdeploy-image.cn-hangzhou.alipay.aliyun-inc.com/oceanbase/odc/release-4.2.0/index.html
301+
--ODC_INDEX_PAGE_URI=http://static-resource-server/dev-4.2.2/index.html
292302
```
293303

294304
### 3.3.1 启动参数
@@ -299,7 +309,21 @@ OdcServer 类是 odc-server 程序入口,可直接运行。
299309
--ODC_DATABASE_HOST=your_metadb_host --ODC_DATABASE_PORT=your_metadb_port --ODC_DATABASE_NAME=your_metadb_database --ODC_DATABASE_USERNAME=your_metadb_user --ODC_DATABASE_PASSWORD=your_metadb_password --server.port=8989
300310
```
301311

302-
### 3.3.2 配置过程
312+
### 3.3.2 构建支持组件
313+
314+
首先您需要按照 3.1.1 章节的指引完成依赖组件的安装,如果您已经完成了这一步,请忽略。
315+
316+
接下来,您需要完成 ODC 插件的构建,您可以在`server/plugins`以及`server/starters`目录中看到它们,您可以通过以下 shell 命令完成构建:
317+
318+
```shell
319+
mvn clean package -Dmaven.test.skip=true
320+
```
321+
322+
插件的构建是集成在 ODC 的构建过程中的。默认情况下,您可以在`distribution/plugins`以及`distribution/starters`目录中看到这些构建完成的插件:
323+
324+
![image.png](../en-US/images/odc-plugins-starters.png)
325+
326+
### 3.3.3 配置过程
303327

304328
运行 OdcServer
305329
![image.png](../en-US/images/idea-run-configuration-start-odc-server.png)

0 commit comments

Comments
 (0)