xiangzihao
3 months ago
committed by
GitHub
431 changed files with 3939 additions and 5249 deletions
@ -0,0 +1,35 @@
|
||||
# |
||||
# Licensed to the Apache Software Foundation (ASF) under one or more |
||||
# contributor license agreements. See the NOTICE file distributed with |
||||
# this work for additional information regarding copyright ownership. |
||||
# The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
# (the "License"); you may not use this file except in compliance with |
||||
# the License. You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
# |
||||
|
||||
version: "3" |
||||
|
||||
services: |
||||
mysql: |
||||
container_name: mysql |
||||
image: mysql:8.0.33 |
||||
command: --default-authentication-plugin=mysql_native_password |
||||
restart: always |
||||
environment: |
||||
MYSQL_ROOT_PASSWORD: mysql |
||||
MYSQL_DATABASE: dolphinscheduler_dev |
||||
ports: |
||||
- "3306:3306" |
||||
healthcheck: |
||||
test: mysqladmin ping -h 127.0.0.1 -u root --password=$$MYSQL_ROOT_PASSWORD |
||||
interval: 5s |
||||
timeout: 60s |
||||
retries: 120 |
@ -0,0 +1,54 @@
|
||||
#!/bin/bash |
||||
# |
||||
# Licensed to the Apache Software Foundation (ASF) under one or more |
||||
# contributor license agreements. See the NOTICE file distributed with |
||||
# this work for additional information regarding copyright ownership. |
||||
# The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
# (the "License"); you may not use this file except in compliance with |
||||
# the License. You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
# |
||||
set -euox pipefail |
||||
|
||||
DS_VERSION=$1 |
||||
DATABASE_VERSION=$2 |
||||
|
||||
# Install dev schema |
||||
export DATABASE="mysql" |
||||
export SPRING_DATASOURCE_DRIVER_CLASS_NAME="com.mysql.cj.jdbc.Driver" |
||||
export SPRING_DATASOURCE_URL="jdbc:mysql://127.0.0.1:3306/dolphinscheduler_dev?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false" |
||||
export SPRING_DATASOURCE_USERNAME="root" |
||||
export SPRING_DATASOURCE_PASSWORD="mysql" |
||||
bash ds_schema_check_test/dev/tools/bin/upgrade-schema.sh |
||||
|
||||
# Install the target version schema and upgrade it |
||||
export SPRING_DATASOURCE_URL="jdbc:mysql://127.0.0.1:3306/dolphinscheduler_${DATABASE_VERSION}?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false" |
||||
bash ds_schema_check_test/${DS_VERSION}/tools/bin/upgrade-schema.sh |
||||
bash ds_schema_check_test/dev/tools/bin/upgrade-schema.sh |
||||
|
||||
# Compare the schema |
||||
set +x |
||||
atlas_result=$(atlas schema diff \ |
||||
--from "mysql://root:mysql@127.0.0.1:3306/dolphinscheduler_${DATABASE_VERSION}" \ |
||||
--to "mysql://root:mysql@127.0.0.1:3306/dolphinscheduler_dev") |
||||
if [[ ${atlas_result} != *"Schemas are synced"* ]]; then |
||||
echo "================================================================================================" |
||||
echo " !!!!! For Contributors !!!!!" |
||||
echo "================================================================================================" |
||||
echo "Database schema not sync, please add below change in the latest version of dolphinscheduler-dao/src/main/resources/sql/upgrade directory" |
||||
echo "${atlas_result}" |
||||
exit 1 |
||||
else |
||||
echo "================================================================================================" |
||||
echo " !!!!! For Contributors !!!!!" |
||||
echo "================================================================================================" |
||||
echo "Database schema sync successfully" |
||||
exit 0 |
||||
fi |
@ -0,0 +1,57 @@
|
||||
#!/bin/bash |
||||
# |
||||
# Licensed to the Apache Software Foundation (ASF) under one or more |
||||
# contributor license agreements. See the NOTICE file distributed with |
||||
# this work for additional information regarding copyright ownership. |
||||
# The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
# (the "License"); you may not use this file except in compliance with |
||||
# the License. You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
# |
||||
set -euox pipefail |
||||
|
||||
DS_VERSION=$1 |
||||
DATABASE_VERSION=${DS_VERSION//\./} |
||||
|
||||
# Install Atlas and Create Dir |
||||
mkdir -p ds_schema_check_test/dev ds_schema_check_test/${DS_VERSION} |
||||
curl -sSf https://atlasgo.sh | sh |
||||
|
||||
# Preparing the environment |
||||
wget https://archive.apache.org/dist/dolphinscheduler/${DS_VERSION}/apache-dolphinscheduler-${DS_VERSION}-bin.tar.gz -P ds_schema_check_test/${DS_VERSION} |
||||
tar -xzf ds_schema_check_test/${DS_VERSION}/apache-dolphinscheduler-${DS_VERSION}-bin.tar.gz -C ds_schema_check_test/${DS_VERSION} --strip-components 1 |
||||
tar -xzf ds_schema_check_test/dev/apache-dolphinscheduler-*-bin.tar.gz -C ds_schema_check_test/dev --strip-components 1 |
||||
|
||||
if [[ $DATABASE_VERSION -lt 300 ]]; then |
||||
chmod +x ds_schema_check_test/dev/tools/bin/upgrade-schema.sh ds_schema_check_test/${DS_VERSION}/script/create-dolphinscheduler.sh |
||||
else |
||||
chmod +x ds_schema_check_test/dev/tools/bin/upgrade-schema.sh ds_schema_check_test/${DS_VERSION}/tools/bin/upgrade-schema.sh |
||||
fi |
||||
|
||||
MYSQL_JDBC_URL="https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/8.0.16/mysql-connector-java-8.0.16.jar" |
||||
MYSQL_JDBC_JAR="mysql-connector-java-8.0.16.jar" |
||||
wget ${MYSQL_JDBC_URL} -O ds_schema_check_test/${MYSQL_JDBC_JAR} |
||||
for base_dir in ds_schema_check_test/dev ds_schema_check_test/${DS_VERSION}; do |
||||
if [[ $base_dir == *"dolphinscheduler/2"* ]]; then |
||||
cp ds_schema_check_test/${MYSQL_JDBC_JAR} ${base_dir}/lib |
||||
else |
||||
for d in alert-server api-server master-server worker-server tools; do |
||||
cp ds_schema_check_test/${MYSQL_JDBC_JAR} ${base_dir}/${d}/libs |
||||
done |
||||
fi |
||||
done |
||||
docker compose -f .github/workflows/schema-check/mysql/docker-compose-base.yaml up -d --wait |
||||
docker exec -i mysql mysql -uroot -pmysql -e "create database dolphinscheduler_${DATABASE_VERSION}"; |
||||
|
||||
#Running schema check tests |
||||
/bin/bash .github/workflows/schema-check/mysql/running-test.sh ${DS_VERSION} ${DATABASE_VERSION} |
||||
|
||||
#Cleanup |
||||
docker compose -f .github/workflows/schema-check/mysql/docker-compose-base.yaml down -v --remove-orphans |
@ -0,0 +1,34 @@
|
||||
# |
||||
# Licensed to the Apache Software Foundation (ASF) under one or more |
||||
# contributor license agreements. See the NOTICE file distributed with |
||||
# this work for additional information regarding copyright ownership. |
||||
# The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
# (the "License"); you may not use this file except in compliance with |
||||
# the License. You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
# |
||||
|
||||
version: "3" |
||||
|
||||
services: |
||||
postgres: |
||||
container_name: postgres |
||||
image: postgres:14.1 |
||||
restart: always |
||||
environment: |
||||
POSTGRES_PASSWORD: postgres |
||||
POSTGRES_DB: dolphinscheduler_dev |
||||
ports: |
||||
- "5432:5432" |
||||
healthcheck: |
||||
test: [ "CMD-SHELL", "pg_isready -U postgres" ] |
||||
interval: 5s |
||||
timeout: 60s |
||||
retries: 120 |
@ -0,0 +1,54 @@
|
||||
#!/bin/bash |
||||
# |
||||
# Licensed to the Apache Software Foundation (ASF) under one or more |
||||
# contributor license agreements. See the NOTICE file distributed with |
||||
# this work for additional information regarding copyright ownership. |
||||
# The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
# (the "License"); you may not use this file except in compliance with |
||||
# the License. You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
# |
||||
set -euox pipefail |
||||
|
||||
DS_VERSION=$1 |
||||
DATABASE_VERSION=$2 |
||||
|
||||
# Install dev schema |
||||
export DATABASE="postgresql" |
||||
export SPRING_DATASOURCE_DRIVER_CLASS_NAME="org.postgresql.Driver" |
||||
export SPRING_DATASOURCE_USERNAME="postgres" |
||||
export SPRING_DATASOURCE_PASSWORD="postgres" |
||||
export SPRING_DATASOURCE_URL="jdbc:postgresql://127.0.0.1:5432/dolphinscheduler_dev" |
||||
bash ds_schema_check_test/dev/tools/bin/upgrade-schema.sh |
||||
|
||||
# Install the target version schema and upgrade it |
||||
export SPRING_DATASOURCE_URL="jdbc:postgresql://127.0.0.1:5432/dolphinscheduler_${DATABASE_VERSION}" |
||||
bash ds_schema_check_test/${DS_VERSION}/tools/bin/upgrade-schema.sh |
||||
bash ds_schema_check_test/dev/tools/bin/upgrade-schema.sh |
||||
|
||||
# Compare the schema |
||||
set +x |
||||
atlas_result=$(atlas schema diff \ |
||||
--from "postgres://postgres:postgres@127.0.0.1:5432/dolphinscheduler_${DATABASE_VERSION}?search_path=public&sslmode=disable" \ |
||||
--to "postgres://postgres:postgres@127.0.0.1:5432/dolphinscheduler_dev?search_path=public&sslmode=disable") |
||||
if [[ ${atlas_result} != *"Schemas are synced"* ]]; then |
||||
echo "================================================================================================" |
||||
echo " !!!!! For Contributors !!!!!" |
||||
echo "================================================================================================" |
||||
echo "Database schema not sync, please add below change in the latest version of dolphinscheduler-dao/src/main/resources/sql/upgrade directory" |
||||
echo "${atlas_result}" |
||||
exit 1 |
||||
else |
||||
echo "================================================================================================" |
||||
echo " !!!!! For Contributors !!!!!" |
||||
echo "================================================================================================" |
||||
echo "Database schema sync successfully" |
||||
exit 0 |
||||
fi |
@ -0,0 +1,45 @@
|
||||
#!/bin/bash |
||||
# |
||||
# Licensed to the Apache Software Foundation (ASF) under one or more |
||||
# contributor license agreements. See the NOTICE file distributed with |
||||
# this work for additional information regarding copyright ownership. |
||||
# The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
# (the "License"); you may not use this file except in compliance with |
||||
# the License. You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
# |
||||
set -euox pipefail |
||||
|
||||
DS_VERSION=$1 |
||||
DATABASE_VERSION=${DS_VERSION//\./} |
||||
|
||||
# Install Atlas and Create Dir |
||||
mkdir -p ds_schema_check_test/dev ds_schema_check_test/${DS_VERSION} |
||||
curl -sSf https://atlasgo.sh | sh |
||||
|
||||
# Preparing the environment |
||||
wget https://archive.apache.org/dist/dolphinscheduler/${DS_VERSION}/apache-dolphinscheduler-${DS_VERSION}-bin.tar.gz -P ds_schema_check_test/${DS_VERSION} |
||||
tar -xzf ds_schema_check_test/${DS_VERSION}/apache-dolphinscheduler-${DS_VERSION}-bin.tar.gz -C ds_schema_check_test/${DS_VERSION} --strip-components 1 |
||||
tar -xzf ds_schema_check_test/dev/apache-dolphinscheduler-*-bin.tar.gz -C ds_schema_check_test/dev --strip-components 1 |
||||
|
||||
if [[ $DATABASE_VERSION -lt 300 ]]; then |
||||
chmod +x ds_schema_check_test/dev/tools/bin/upgrade-schema.sh ds_schema_check_test/${DS_VERSION}/script/create-dolphinscheduler.sh |
||||
else |
||||
chmod +x ds_schema_check_test/dev/tools/bin/upgrade-schema.sh ds_schema_check_test/${DS_VERSION}/tools/bin/upgrade-schema.sh |
||||
fi |
||||
|
||||
docker compose -f .github/workflows/schema-check/postgresql/docker-compose-base.yaml up -d --wait |
||||
docker exec -i postgres psql -U postgres -c "create database dolphinscheduler_${DATABASE_VERSION}"; |
||||
|
||||
#Running schema check tests |
||||
/bin/bash .github/workflows/schema-check/postgresql/running-test.sh ${DS_VERSION} ${DATABASE_VERSION} |
||||
|
||||
#Cleanup |
||||
docker compose -f .github/workflows/schema-check/postgresql/docker-compose-base.yaml down -v --remove-orphans |
Before Width: | Height: | Size: 692 B After Width: | Height: | Size: 692 B |
36
dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/java/org/apache/dolphinscheduler/api/test/pages/workflow/ProcessDefinitionPage.java → dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/java/org/apache/dolphinscheduler/api/test/pages/workflow/WorkflowDefinitionPage.java
36
dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/java/org/apache/dolphinscheduler/api/test/pages/workflow/ProcessDefinitionPage.java → dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/java/org/apache/dolphinscheduler/api/test/pages/workflow/WorkflowDefinitionPage.java
22
dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/java/org/apache/dolphinscheduler/api/test/pages/workflow/ProcessInstancePage.java → dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/java/org/apache/dolphinscheduler/api/test/pages/workflow/WorkflowInstancePage.java
22
dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/java/org/apache/dolphinscheduler/api/test/pages/workflow/ProcessInstancePage.java → dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/java/org/apache/dolphinscheduler/api/test/pages/workflow/WorkflowInstancePage.java
@ -1,26 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.apache.dolphinscheduler.api.dto; |
||||
|
||||
import org.apache.dolphinscheduler.dao.entity.WorkflowDefinition; |
||||
|
||||
/** |
||||
* ProcessDefinitionDto |
||||
*/ |
||||
public class WorkflowDefinitionDto extends WorkflowDefinition { |
||||
} |
@ -1,26 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.apache.dolphinscheduler.api.dto; |
||||
|
||||
import org.apache.dolphinscheduler.dao.entity.WorkflowInstance; |
||||
|
||||
/** |
||||
* ProcessInstanceDto |
||||
*/ |
||||
public class WorkflowInstanceDto extends WorkflowInstance { |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue