Compare commits
1 Commits
dev
...
upstream-d
| Author | SHA1 | Date |
|---|---|---|
|
|
8ce0367bd5 |
|
|
@ -46,8 +46,7 @@ github:
|
||||||
- E2E
|
- E2E
|
||||||
- Docs
|
- Docs
|
||||||
- Frontend Build
|
- Frontend Build
|
||||||
- "Mergeable: milestone-label-check"
|
# - "Mergeable: milestone-label-check"
|
||||||
- "Title Validator"
|
|
||||||
required_pull_request_reviews:
|
required_pull_request_reviews:
|
||||||
dismiss_stale_reviews: true
|
dismiss_stale_reviews: true
|
||||||
required_approving_review_count: 2
|
required_approving_review_count: 2
|
||||||
|
|
|
||||||
|
|
@ -16,39 +16,30 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
/.github/ @SbloodyS
|
/.github/ @SbloodyS
|
||||||
/deploy/ @SbloodyS
|
/deploy/ @caishunfeng
|
||||||
/dolphinscheduler-alert/ @SbloodyS
|
/dolphinscheduler-alert/ @caishunfeng
|
||||||
/dolphinscheduler-api/ @caishunfeng @SbloodyS
|
|
||||||
/dolphinscheduler-api-test/ @SbloodyS
|
|
||||||
/dolphinscheduler-authentication/ @ruanwenjun
|
|
||||||
/dolphinscheduler-bom/ @ruanwenjun
|
|
||||||
/dolphinscheduler-common/ @SbloodyS
|
|
||||||
/dolphinscheduler-dao/ @SbloodyS @ruanwenjun
|
|
||||||
/dolphinscheduler-dao-plugin/ @SbloodyS @ruanwenjun
|
|
||||||
/dolphinscheduler-data-quality/ @SbloodyS
|
|
||||||
/dolphinscheduler-datasource-plugin/ @SbloodyS
|
|
||||||
/dolphinscheduler-dist/ @SbloodyS
|
|
||||||
/dolphinscheduler-e2e/ @SbloodyS
|
/dolphinscheduler-e2e/ @SbloodyS
|
||||||
/dolphinscheduler-extract/ @ruanwenjun
|
/dolphinscheduler-api-test/ @SbloodyS
|
||||||
|
/dolphinscheduler-registry/ @caishunfeng @ruanwenjun
|
||||||
|
/dolphinscheduler-api/ @caishunfeng @SbloodyS
|
||||||
|
/dolphinscheduler-dao/ @caishunfeng @SbloodyS
|
||||||
|
/dolphinscheduler-dao/src/main/resources/sql/ @EricGao888
|
||||||
|
/dolphinscheduler-common/ @caishunfeng
|
||||||
|
/dolphinscheduler-standalone-server/ @caishunfeng
|
||||||
|
/dolphinscheduler-datasource-plugin/ @caishunfeng
|
||||||
|
/dolphinscheduler-dist/ @caishunfeng
|
||||||
|
/dolphinscheduler-meter/ @caishunfeng @ruanwenjun @EricGao888
|
||||||
|
/dolphinscheduler-scheduler-plugin/ @caishunfeng
|
||||||
/dolphinscheduler-master/ @caishunfeng @SbloodyS @ruanwenjun
|
/dolphinscheduler-master/ @caishunfeng @SbloodyS @ruanwenjun
|
||||||
/dolphinscheduler-meter/ @ruanwenjun @EricGao888
|
/dolphinscheduler-worker/ @caishunfeng @SbloodyS @ruanwenjun
|
||||||
/dolphinscheduler-microbench/ @SbloodyS @ruanwenjun
|
|
||||||
/dolphinscheduler-registry/ @ruanwenjun
|
|
||||||
/dolphinscheduler-scheduler-plugin/ @ruanwenjun
|
|
||||||
/dolphinscheduler-service/ @caishunfeng
|
/dolphinscheduler-service/ @caishunfeng
|
||||||
|
/dolphinscheduler-extract/ @caishunfeng @ruanwenjun
|
||||||
/dolphinscheduler-spi/ @caishunfeng
|
/dolphinscheduler-spi/ @caishunfeng
|
||||||
/dolphinscheduler-standalone-server/ @SbloodyS
|
|
||||||
/dolphinscheduler-storage-plugin/ @ruanwenjun @SbloodyS
|
|
||||||
/dolphinscheduler-task-plugin/ @caishunfeng @SbloodyS @zhuangchong
|
/dolphinscheduler-task-plugin/ @caishunfeng @SbloodyS @zhuangchong
|
||||||
/dolphinscheduler-tools/ @caishunfeng @SbloodyS @EricGao888
|
/dolphinscheduler-tools/ @caishunfeng @SbloodyS @EricGao888
|
||||||
|
/script/ @caishunfeng @SbloodyS @EricGao888
|
||||||
/dolphinscheduler-ui/ @songjianet @Amy0104
|
/dolphinscheduler-ui/ @songjianet @Amy0104
|
||||||
/dolphinscheduler-worker/ @caishunfeng @SbloodyS @ruanwenjun
|
/docs/ @EricGao888
|
||||||
/dolphinscheduler-yarn-aop/ @ruanwenjun
|
|
||||||
|
|
||||||
/dolphinscheduler-dao/src/main/resources/sql/ @EricGao888
|
|
||||||
|
|
||||||
/script/ @SbloodyS @EricGao888
|
|
||||||
/docs/ @EricGao888 @SbloodyS
|
|
||||||
/licenses/ @EricGao888
|
/licenses/ @EricGao888
|
||||||
/images/ @EricGao888
|
/images/ @EricGao888
|
||||||
/style/ @SbloodyS @EricGao888
|
/style/ @caishunfeng
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,4 @@ This change added tests and can be verified as follows:
|
||||||
|
|
||||||
(or)
|
(or)
|
||||||
|
|
||||||
## Pull Request Notice
|
|
||||||
[Pull Request Notice](https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md)
|
|
||||||
|
|
||||||
If your pull request contain incompatible change, you should also add it to `docs/docs/en/guide/upgrede/incompatible.md`
|
If your pull request contain incompatible change, you should also add it to `docs/docs/en/guide/upgrede/incompatible.md`
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 288f36f8cea1dded676b9c4477a64ff91e50c104
|
|
||||||
|
|
@ -18,54 +18,37 @@
|
||||||
backend:
|
backend:
|
||||||
- 'dolphinscheduler-alert/**/*'
|
- 'dolphinscheduler-alert/**/*'
|
||||||
- 'dolphinscheduler-api/**/*'
|
- 'dolphinscheduler-api/**/*'
|
||||||
- 'dolphinscheduler-authentication/**/*'
|
|
||||||
- 'dolphinscheduler-bom/**/*'
|
|
||||||
- 'dolphinscheduler-common/**/*'
|
- 'dolphinscheduler-common/**/*'
|
||||||
- 'dolphinscheduler-dao/**/*'
|
- 'dolphinscheduler-dao/**/*'
|
||||||
- 'dolphinscheduler-dao-plugin/**/*'
|
|
||||||
- 'dolphinscheduler-data-quality/**/*'
|
- 'dolphinscheduler-data-quality/**/*'
|
||||||
- 'dolphinscheduler-datasource-plugin/**/*'
|
- 'dolphinscheduler-datasource-plugin/**/*'
|
||||||
- 'dolphinscheduler-dist/**/*'
|
- 'dolphinscheduler-dist/**/*'
|
||||||
- 'dolphinscheduler-extract/**/*'
|
|
||||||
- 'dolphinscheduler-master/**/*'
|
- 'dolphinscheduler-master/**/*'
|
||||||
- 'dolphinscheduler-meter/**/*'
|
|
||||||
- 'dolphinscheduler-microbench/**/*'
|
|
||||||
- 'dolphinscheduler-registry/**/*'
|
- 'dolphinscheduler-registry/**/*'
|
||||||
|
- 'dolphinscheduler-extract/**/*'
|
||||||
- 'dolphinscheduler-scheduler-plugin/**/*'
|
- 'dolphinscheduler-scheduler-plugin/**/*'
|
||||||
- 'dolphinscheduler-service/**/*'
|
- 'dolphinscheduler-service/**/*'
|
||||||
- 'dolphinscheduler-spi/**/*'
|
- 'dolphinscheduler-spi/**/*'
|
||||||
- 'dolphinscheduler-standalone-server/**/*'
|
- 'dolphinscheduler-standalone-server/**/*'
|
||||||
- 'dolphinscheduler-storage-plugin/**/*'
|
|
||||||
- 'dolphinscheduler-task-plugin/**/*'
|
- 'dolphinscheduler-task-plugin/**/*'
|
||||||
- 'dolphinscheduler-tools/**/*'
|
- 'dolphinscheduler-tools/**/*'
|
||||||
- 'dolphinscheduler-worker/**/*'
|
- 'dolphinscheduler-worker/**/*'
|
||||||
- 'dolphinscheduler-yarn-aop/**/*'
|
|
||||||
- 'script/**/*'
|
- 'script/**/*'
|
||||||
- '.github/workflows/backend.yml'
|
|
||||||
|
|
||||||
document:
|
document:
|
||||||
- 'docs/**/*'
|
- 'docs/**/*'
|
||||||
- '**/*.md'
|
|
||||||
|
|
||||||
CI&CD:
|
CI&CD:
|
||||||
- any: ['.github/**/*']
|
- any: ['.github/**/*']
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
- any: ['deploy/docker/**/*']
|
- any: ['.deploy/**/*']
|
||||||
|
|
||||||
UI:
|
UI:
|
||||||
- any: ['dolphinscheduler-ui/**/*']
|
- any: ['dolphinscheduler-ui/**/*']
|
||||||
- any: ['.github/workflows/frontend.yml']
|
|
||||||
|
|
||||||
e2e:
|
e2e:
|
||||||
- any: ['dolphinscheduler-e2e/**/*']
|
- any: ['dolphinscheduler-e2e/**/*']
|
||||||
- any: ['dolphinscheduler-api-test/**/*']
|
|
||||||
- any: ['.github/workflows/e2e.yml']
|
|
||||||
- any: ['.github/workflows/api-test.yml']
|
|
||||||
- any: ['.github/workflows/e2e-k8s.yml']
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
- any: ['**/test/**/*']
|
- any: ['dolphinscheduler-api-test/**/*']
|
||||||
|
|
||||||
kubernetes:
|
|
||||||
- any: ['deploy/kubernetes/**/*']
|
|
||||||
|
|
|
||||||
|
|
@ -1,72 +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.
|
|
||||||
# Details: https://github.com/apps/boring-cyborg
|
|
||||||
|
|
||||||
###### IssueLink Adder #################################################################################################
|
|
||||||
# Insert Issue (Jira/Github etc) link in PR description based on the Issue ID in PR title.
|
|
||||||
insertIssueLinkInPrDescription:
|
|
||||||
# specify the placeholder for the issue link that should be present in the description
|
|
||||||
descriptionIssuePlaceholderRegexp: "^fix: (.*)$"
|
|
||||||
matchers:
|
|
||||||
# you can have several matches - for different types of issues
|
|
||||||
# only the first matching entry is replaced
|
|
||||||
jiraIssueMatch:
|
|
||||||
# specify the regexp of issue id that you can find in the title of the PR
|
|
||||||
# the match groups can be used to build the issue id (${1}, ${2}, etc.).
|
|
||||||
titleIssueIdRegexp: \[(Feature|Fix|Improvement|Test|E2E|Doc-[0-9]+)\]
|
|
||||||
# the issue link to be added. ${1}, ${2} ... are replaced with the match groups from the
|
|
||||||
# title match (remember to use quotes)
|
|
||||||
descriptionIssueLink: "[${1}](https://github.com/apache/dolphinschedule/${1}/)"
|
|
||||||
|
|
||||||
###### Title Validator #################################################################################################
|
|
||||||
# Verifies if commit/PR titles match the regexp specified
|
|
||||||
verifyTitles:
|
|
||||||
# Regular expression that should be matched by titles of commits or PR
|
|
||||||
titleRegexp: ^\[DSIP-[0-9]+\].*$|^\[Feature-[0-9]+\].*$|^\[Fix-[0-9]+\].*$|^\[Doc-[0-9]+\].*$|^\[Improvement-[0-9]+\].*$|^\[Test-[0-9]+\].*$|^\[E2E-[0-9]+\].*$|^\[CI].*$|^\[Chore].*$
|
|
||||||
# If set to true, it will always check the PR title (as opposed to the individual commits).
|
|
||||||
alwaysUsePrTitle: true
|
|
||||||
# If set to true, it will only check the commit in case there is a single commit.
|
|
||||||
# In case of multiple commits it will check PR title.
|
|
||||||
# This reflects the standard behaviour of Github that for `Squash & Merge` GitHub
|
|
||||||
# uses the PR title rather than commit messages for the squashed commit ¯\_(ツ)_/¯
|
|
||||||
# For single-commit PRs it takes the squashed commit message from the commit as expected.
|
|
||||||
#
|
|
||||||
# If set to false it will check all commit messages. This is useful when you do not squash commits at merge.
|
|
||||||
validateEitherPrOrSingleCommitTitle: true
|
|
||||||
# The title the GitHub status should appear from.
|
|
||||||
statusTitle: "Title Validator"
|
|
||||||
# A custom message to be displayed when the title passes validation.
|
|
||||||
successMessage: "Title Validation successful!"
|
|
||||||
# A custom message to be displayed when the title fails validation.
|
|
||||||
# Allows insertion of ${type} (commit/PR), ${title} (the title validated) and ${regex} (the titleRegexp above).
|
|
||||||
failureMessage: "Wrong ${type} title: ${title}"
|
|
||||||
|
|
||||||
# Various Flags to control behaviour of the "Labeler"
|
|
||||||
labelerFlags:
|
|
||||||
# If this flag is changed to 'false', labels would only be added when the PR is first created
|
|
||||||
# and not when existing PR is updated.
|
|
||||||
# The default is 'true' which means the labels would be added when PR is updated even if they
|
|
||||||
# were removed by the user
|
|
||||||
labelOnPRUpdates: true
|
|
||||||
|
|
||||||
# Comment to be posted to welcome users when they open their first PR
|
|
||||||
firstPRWelcomeComment: >
|
|
||||||
Thanks for opening this pull request! Please check out our contributing guidelines. (https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md)
|
|
||||||
|
|
||||||
# Comment to be posted to congratulate user on their first merged PR
|
|
||||||
firstPRMergeComment: >
|
|
||||||
Awesome work, congrats on your first merged pull request!
|
|
||||||
|
|
@ -20,8 +20,6 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- '[0-9]+.[0-9]+.[0-9]+-prepare'
|
|
||||||
- '[0-9]+.[0-9]+.[0-9]+-release'
|
|
||||||
|
|
||||||
name: API-Test
|
name: API-Test
|
||||||
|
|
||||||
|
|
@ -37,7 +35,7 @@ jobs:
|
||||||
outputs:
|
outputs:
|
||||||
not-ignore: ${{ steps.filter.outputs.not-ignore }}
|
not-ignore: ${{ steps.filter.outputs.not-ignore }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
|
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
|
|
@ -51,7 +49,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Sanity Check
|
- name: Sanity Check
|
||||||
|
|
@ -75,7 +73,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
docker save apache/dolphinscheduler-standalone-server:ci -o /tmp/standalone-image.tar \
|
docker save apache/dolphinscheduler-standalone-server:ci -o /tmp/standalone-image.tar \
|
||||||
&& du -sh /tmp/standalone-image.tar
|
&& du -sh /tmp/standalone-image.tar
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v2
|
||||||
name: Upload Docker Images
|
name: Upload Docker Images
|
||||||
with:
|
with:
|
||||||
name: standalone-image
|
name: standalone-image
|
||||||
|
|
@ -106,7 +104,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
RECORDING_PATH: /tmp/recording-${{ matrix.case.name }}
|
RECORDING_PATH: /tmp/recording-${{ matrix.case.name }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Cache local Maven repository
|
- name: Cache local Maven repository
|
||||||
|
|
@ -115,7 +113,7 @@ jobs:
|
||||||
path: ~/.m2/repository
|
path: ~/.m2/repository
|
||||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-api-test
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-api-test
|
||||||
restore-keys: ${{ runner.os }}-maven-
|
restore-keys: ${{ runner.os }}-maven-
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v2
|
||||||
name: Download Docker Images
|
name: Download Docker Images
|
||||||
with:
|
with:
|
||||||
name: standalone-image
|
name: standalone-image
|
||||||
|
|
@ -127,9 +125,9 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
./mvnw -B -f dolphinscheduler-api-test/pom.xml -am \
|
./mvnw -B -f dolphinscheduler-api-test/pom.xml -am \
|
||||||
-DfailIfNoTests=false \
|
-DfailIfNoTests=false \
|
||||||
-Dspotless.skip=true \
|
-Dspotless.skip=false \
|
||||||
-Dtest=${{ matrix.case.class }} test
|
-Dtest=${{ matrix.case.class }} test
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v2
|
||||||
if: always()
|
if: always()
|
||||||
name: Upload Recording
|
name: Upload Recording
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ jobs:
|
||||||
not-ignore: ${{ steps.filter.outputs.not-ignore }}
|
not-ignore: ${{ steps.filter.outputs.not-ignore }}
|
||||||
db-schema: ${{ steps.filter.outputs.db-schema }}
|
db-schema: ${{ steps.filter.outputs.db-schema }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
|
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
|
|
@ -63,7 +63,7 @@ jobs:
|
||||||
java: [ '8', '11' ]
|
java: [ '8', '11' ]
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Set up JDK ${{ matrix.java }}
|
- name: Set up JDK ${{ matrix.java }}
|
||||||
|
|
@ -91,7 +91,7 @@ jobs:
|
||||||
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120
|
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120
|
||||||
- name: Check dependency license
|
- name: Check dependency license
|
||||||
run: tools/dependencies/check-LICENSE.sh
|
run: tools/dependencies/check-LICENSE.sh
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v2
|
||||||
if: ${{ matrix.java == '8' }}
|
if: ${{ matrix.java == '8' }}
|
||||||
name: Upload Binary Package
|
name: Upload Binary Package
|
||||||
with:
|
with:
|
||||||
|
|
@ -115,10 +115,10 @@ jobs:
|
||||||
- name: cluster-test-postgresql-with-postgresql-registry
|
- name: cluster-test-postgresql-with-postgresql-registry
|
||||||
script: .github/workflows/cluster-test/postgresql_with_postgresql_registry/start-job.sh
|
script: .github/workflows/cluster-test/postgresql_with_postgresql_registry/start-job.sh
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v2
|
||||||
name: Download Binary Package
|
name: Download Binary Package
|
||||||
with:
|
with:
|
||||||
# Only run cluster test on jdk8
|
# Only run cluster test on jdk8
|
||||||
|
|
@ -165,7 +165,7 @@ jobs:
|
||||||
mkdir -p dolphinscheduler/dev dolphinscheduler/${{ matrix.version }}
|
mkdir -p dolphinscheduler/dev dolphinscheduler/${{ matrix.version }}
|
||||||
curl -sSf https://atlasgo.sh | sh
|
curl -sSf https://atlasgo.sh | sh
|
||||||
- name: Download Tarball
|
- name: Download Tarball
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: binary-package-8
|
name: binary-package-8
|
||||||
path: dolphinscheduler/dev
|
path: dolphinscheduler/dev
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,6 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- 'dev'
|
- 'dev'
|
||||||
- '[0-9]+.[0-9]+.[0-9]+-prepare'
|
|
||||||
- '[0-9]+.[0-9]+.[0-9]+-release'
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: codeql-${{ github.event.pull_request.number || github.ref }}
|
group: codeql-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ jobs:
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- name: Style Check
|
- name: Style Check
|
||||||
run: ./mvnw spotless:check
|
run: ./mvnw spotless:check
|
||||||
img-check:
|
img-check:
|
||||||
|
|
@ -40,7 +40,7 @@ jobs:
|
||||||
run:
|
run:
|
||||||
working-directory: docs
|
working-directory: docs
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python 3.9
|
- name: Set up Python 3.9
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
|
|
@ -54,7 +54,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- run: sudo npm install -g markdown-link-check@3.11.2
|
- run: sudo npm install -g markdown-link-check@3.11.2
|
||||||
- run: sudo apt install plocate -y
|
- run: sudo apt install plocate -y
|
||||||
# NOTE: Change command from `find . -name "*.md"` to `find . -not -path "*/node_modules/*" -not -path "*/.tox/*" -name "*.md"`
|
# NOTE: Change command from `find . -name "*.md"` to `find . -not -path "*/node_modules/*" -not -path "*/.tox/*" -name "*.md"`
|
||||||
|
|
@ -70,7 +70,7 @@ jobs:
|
||||||
outputs:
|
outputs:
|
||||||
helm-doc: ${{ steps.filter.outputs.helm-doc }}
|
helm-doc: ${{ steps.filter.outputs.helm-doc }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
|
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
|
|
@ -84,7 +84,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Generating helm-doc
|
- name: Generating helm-doc
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,6 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- '[0-9]+.[0-9]+.[0-9]+-prepare'
|
|
||||||
- '[0-9]+.[0-9]+.[0-9]+-release'
|
|
||||||
|
|
||||||
name: E2E-K8S
|
name: E2E-K8S
|
||||||
|
|
||||||
|
|
@ -37,7 +35,7 @@ jobs:
|
||||||
outputs:
|
outputs:
|
||||||
not-ignore: ${{ steps.filter.outputs.not-ignore }}
|
not-ignore: ${{ steps.filter.outputs.not-ignore }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
|
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
|
|
@ -51,7 +49,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Build Image
|
- name: Build Image
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,6 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- '[0-9]+.[0-9]+.[0-9]+-prepare'
|
|
||||||
- '[0-9]+.[0-9]+.[0-9]+-release'
|
|
||||||
|
|
||||||
name: E2E
|
name: E2E
|
||||||
|
|
||||||
|
|
@ -37,7 +35,7 @@ jobs:
|
||||||
outputs:
|
outputs:
|
||||||
not-ignore: ${{ steps.filter.outputs.not-ignore }}
|
not-ignore: ${{ steps.filter.outputs.not-ignore }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
|
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
|
|
@ -51,7 +49,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Sanity Check
|
- name: Sanity Check
|
||||||
|
|
@ -76,7 +74,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
docker save apache/dolphinscheduler-standalone-server:ci -o /tmp/standalone-image.tar \
|
docker save apache/dolphinscheduler-standalone-server:ci -o /tmp/standalone-image.tar \
|
||||||
&& du -sh /tmp/standalone-image.tar
|
&& du -sh /tmp/standalone-image.tar
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v2
|
||||||
name: Upload Docker Images
|
name: Upload Docker Images
|
||||||
with:
|
with:
|
||||||
name: standalone-image
|
name: standalone-image
|
||||||
|
|
@ -116,18 +114,20 @@ jobs:
|
||||||
# class: org.apache.dolphinscheduler.e2e.cases.WorkflowSwitchE2ETest
|
# class: org.apache.dolphinscheduler.e2e.cases.WorkflowSwitchE2ETest
|
||||||
- name: FileManage
|
- name: FileManage
|
||||||
class: org.apache.dolphinscheduler.e2e.cases.FileManageE2ETest
|
class: org.apache.dolphinscheduler.e2e.cases.FileManageE2ETest
|
||||||
|
- name: UdfManage
|
||||||
|
class: org.apache.dolphinscheduler.e2e.cases.UdfManageE2ETest
|
||||||
|
- name: FunctionManage
|
||||||
|
class: org.apache.dolphinscheduler.e2e.cases.FunctionManageE2ETest
|
||||||
- name: MysqlDataSource
|
- name: MysqlDataSource
|
||||||
class: org.apache.dolphinscheduler.e2e.cases.MysqlDataSourceE2ETest
|
class: org.apache.dolphinscheduler.e2e.cases.MysqlDataSourceE2ETest
|
||||||
- name: ClickhouseDataSource
|
- name: ClickhouseDataSource
|
||||||
class: org.apache.dolphinscheduler.e2e.cases.ClickhouseDataSourceE2ETest
|
class: org.apache.dolphinscheduler.e2e.cases.ClickhouseDataSourceE2ETest
|
||||||
- name: PostgresDataSource
|
- name: PostgresDataSource
|
||||||
class: org.apache.dolphinscheduler.e2e.cases.PostgresDataSourceE2ETest
|
class: org.apache.dolphinscheduler.e2e.cases.PostgresDataSourceE2ETest
|
||||||
- name: ShellTaskE2ETest
|
|
||||||
class: org.apache.dolphinscheduler.e2e.cases.tasks.ShellTaskE2ETest
|
|
||||||
env:
|
env:
|
||||||
RECORDING_PATH: /tmp/recording-${{ matrix.case.name }}
|
RECORDING_PATH: /tmp/recording-${{ matrix.case.name }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Cache local Maven repository
|
- name: Cache local Maven repository
|
||||||
|
|
@ -136,7 +136,7 @@ jobs:
|
||||||
path: ~/.m2/repository
|
path: ~/.m2/repository
|
||||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-e2e
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-e2e
|
||||||
restore-keys: ${{ runner.os }}-maven-
|
restore-keys: ${{ runner.os }}-maven-
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v2
|
||||||
name: Download Docker Images
|
name: Download Docker Images
|
||||||
with:
|
with:
|
||||||
name: standalone-image
|
name: standalone-image
|
||||||
|
|
@ -149,7 +149,7 @@ jobs:
|
||||||
./mvnw -B -f dolphinscheduler-e2e/pom.xml -am \
|
./mvnw -B -f dolphinscheduler-e2e/pom.xml -am \
|
||||||
-DfailIfNoTests=false \
|
-DfailIfNoTests=false \
|
||||||
-Dtest=${{ matrix.case.class }} test
|
-Dtest=${{ matrix.case.class }} test
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v2
|
||||||
if: always()
|
if: always()
|
||||||
name: Upload Recording
|
name: Upload Recording
|
||||||
with:
|
with:
|
||||||
|
|
@ -171,7 +171,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
RECORDING_PATH: /tmp/recording-${{ matrix.case.name }}
|
RECORDING_PATH: /tmp/recording-${{ matrix.case.name }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Cache local Maven repository
|
- name: Cache local Maven repository
|
||||||
|
|
@ -180,7 +180,7 @@ jobs:
|
||||||
path: ~/.m2/repository
|
path: ~/.m2/repository
|
||||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-e2e
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-e2e
|
||||||
restore-keys: ${{ runner.os }}-maven-
|
restore-keys: ${{ runner.os }}-maven-
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v2
|
||||||
name: Download Docker Images
|
name: Download Docker Images
|
||||||
with:
|
with:
|
||||||
name: standalone-image
|
name: standalone-image
|
||||||
|
|
@ -193,7 +193,7 @@ jobs:
|
||||||
./mvnw -B -f dolphinscheduler-e2e/pom.xml -am \
|
./mvnw -B -f dolphinscheduler-e2e/pom.xml -am \
|
||||||
-DfailIfNoTests=false \
|
-DfailIfNoTests=false \
|
||||||
-Dtest=${{ matrix.case.class }} test
|
-Dtest=${{ matrix.case.class }} test
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v2
|
||||||
if: always()
|
if: always()
|
||||||
name: Upload Recording
|
name: Upload Recording
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,7 @@ name: Frontend
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- '[0-9]+.[0-9]+.[0-9]+-prepare'
|
- dev
|
||||||
- '[0-9]+.[0-9]+.[0-9]+-release'
|
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/frontend.yml'
|
- '.github/workflows/frontend.yml'
|
||||||
- 'dolphinscheduler-ui/**'
|
- 'dolphinscheduler-ui/**'
|
||||||
|
|
@ -42,7 +41,7 @@ jobs:
|
||||||
outputs:
|
outputs:
|
||||||
not-ignore: ${{ steps.filter.outputs.not-ignore }}
|
not-ignore: ${{ steps.filter.outputs.not-ignore }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
|
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
|
|
@ -59,7 +58,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-latest, macos-latest ]
|
os: [ ubuntu-latest, macos-latest ]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- if: matrix.os == 'ubuntu-latest'
|
- if: matrix.os == 'ubuntu-latest'
|
||||||
|
|
@ -83,7 +82,7 @@ jobs:
|
||||||
needs: [ build, paths-filter ]
|
needs: [ build, paths-filter ]
|
||||||
if: always()
|
if: always()
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- name: Status
|
- name: Status
|
||||||
run: |
|
run: |
|
||||||
if [[ ${{ needs.paths-filter.outputs.not-ignore }} == 'false' && ${{ github.event_name }} == 'pull_request' ]]; then
|
if [[ ${{ needs.paths-filter.outputs.not-ignore }} == 'false' && ${{ github.event_name }} == 'pull_request' ]]; then
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout ${{ github.ref }}"
|
- name: "Checkout ${{ github.ref }}"
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
|
||||||
|
|
@ -14,50 +14,65 @@
|
||||||
# KIND, either express or implied. See the License for the
|
# KIND, either express or implied. See the License for the
|
||||||
# specific language governing permissions and limitations
|
# specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
---
|
||||||
|
#version: 2
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- reopened
|
|
||||||
- synchronize
|
|
||||||
- labeled
|
|
||||||
- unlabeled
|
|
||||||
- milestoned
|
|
||||||
- demilestoned
|
|
||||||
|
|
||||||
|
|
||||||
name: "Mergeable"
|
name: "Mergeable"
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
result:
|
result:
|
||||||
name: "Mergeable: milestone-label-check"
|
name: "Mergeable: milestone-label-check"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- name: Check milestone and labels
|
- name: Status
|
||||||
uses: actions/github-script@v7
|
run: |
|
||||||
with:
|
echo "Temporary skipping this check"
|
||||||
script: |
|
|
||||||
const { data } = await github.request("GET /repos/{owner}/{repo}/pulls/{pr}", {
|
#mergeable:
|
||||||
owner: context.repo.owner,
|
# # we can not use `pull_request.*` which including event `pull_request.labeled`, according to https://github.com/mergeability/mergeable/issues/643,
|
||||||
repo: context.repo.repo,
|
# # otherwise mergeable will keep add or remove label endless, we just need this CI act like the default behavior as
|
||||||
pr: context.payload.pull_request.number
|
# # GitHub action workflow `pull_requests` https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request like,
|
||||||
});
|
# # which only trigger runs when a pull_request event's activity type is opened, synchronize, or reopened
|
||||||
if (data.milestone) {
|
# - when: pull_request.opened, pull_request.reopened, pull_request.synchronize
|
||||||
core.info(`This pull request has a milestone: ${data.milestone.title}`);
|
# name: sync-sql-ddl
|
||||||
} else {
|
# validate:
|
||||||
core.setFailed(`A maintainer needs to set the milestone for this pull request.`);
|
# # Sql files must change synchronize
|
||||||
}
|
# - do: dependent
|
||||||
let labeledFlag = false;
|
# files:
|
||||||
for (const label of data.labels) {
|
# - 'dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql'
|
||||||
if (['feature', 'bug', 'improvement', 'document', 'chore', 'DSIP', 'CI&CD', 'revert'].includes(label.name)) {
|
# - 'dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql'
|
||||||
core.info(`This pull request has a valid label: ${label.name}`);
|
# - 'dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql'
|
||||||
labeledFlag = true;
|
# message: 'Sql files not change synchronize'
|
||||||
break;
|
# # Add labels 'sql not sync' and comment to reviewers if Sql files not change synchronize
|
||||||
}
|
# fail:
|
||||||
}
|
# - do: comment
|
||||||
if (!labeledFlag) {
|
# payload:
|
||||||
core.setFailed(`A maintainer needs to set a valid label for this pull request.`);
|
# body: >
|
||||||
}
|
# :warning: This PR do not change database DDL synchronize.
|
||||||
|
# leave_old_comment: false
|
||||||
|
# - do: labels
|
||||||
|
# add: 'sql not sync'
|
||||||
|
# # Remove labels 'sql not sync' if pass
|
||||||
|
# pass:
|
||||||
|
# - do: labels
|
||||||
|
# delete: 'sql not sync'
|
||||||
|
#
|
||||||
|
# - when: pull_request.*
|
||||||
|
# name: milestone-label-check
|
||||||
|
# validate:
|
||||||
|
# - do: milestone
|
||||||
|
# no_empty:
|
||||||
|
# enabled: false # Cannot be empty when true.
|
||||||
|
# message: 'Milestone is required and cannot be empty.'
|
||||||
|
# - do: label
|
||||||
|
# and:
|
||||||
|
# - must_include:
|
||||||
|
# regex: 'feature|bug|improvement|document|chore|revert'
|
||||||
|
# message: 'Label must include one of the following: `feature`, `bug`, `improvement`, `document`, `chore`, `revert`'
|
||||||
|
# - must_include:
|
||||||
|
# regex: 'ready-to-merge'
|
||||||
|
# message: 'Please check if there are PRs that already have a `ready-to-merge` label and can be merged, if exists please merge them first.'
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,7 @@ name: OWASP Dependency Check
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- '[0-9]+.[0-9]+.[0-9]+-prepare'
|
- dev
|
||||||
- '[0-9]+.[0-9]+.[0-9]+-release'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '**/pom.xml'
|
- '**/pom.xml'
|
||||||
|
|
@ -31,9 +30,8 @@ env:
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 120
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Set up JDK 8
|
- name: Set up JDK 8
|
||||||
|
|
@ -44,7 +42,7 @@ jobs:
|
||||||
- name: Run OWASP Dependency Check
|
- name: Run OWASP Dependency Check
|
||||||
run: ./mvnw -B clean install verify dependency-check:check -DskipDepCheck=false -Dmaven.test.skip=true -Dspotless.skip=true
|
run: ./mvnw -B clean install verify dependency-check:check -DskipDepCheck=false -Dmaven.test.skip=true -Dspotless.skip=true
|
||||||
- name: Upload report
|
- name: Upload report
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
if: ${{ cancelled() || failure() }}
|
if: ${{ cancelled() || failure() }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ jobs:
|
||||||
packages: write
|
packages: write
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- name: Cache local Maven repository
|
- name: Cache local Maven repository
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ jobs:
|
||||||
packages: write
|
packages: write
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- name: Set environment variables
|
- name: Set environment variables
|
||||||
run: |
|
run: |
|
||||||
if [[ ${{ github.event_name }} == "release" ]]; then
|
if [[ ${{ github.event_name }} == "release" ]]; then
|
||||||
|
|
|
||||||
|
|
@ -15,21 +15,20 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
name: "pull-request-target-robot"
|
name: "pull-request-robot"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pullRequestTargetRobot:
|
labelRobot:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout ${{ github.ref }}"
|
- name: "Checkout ${{ github.ref }}"
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
@ -40,8 +39,3 @@ jobs:
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
configuration-path: .github/actions/labeler/labeler.yml
|
configuration-path: .github/actions/labeler/labeler.yml
|
||||||
sync-labels: true
|
sync-labels: true
|
||||||
|
|
||||||
- name: "Auto assign in pull request"
|
|
||||||
uses: ./.github/actions/auto-assign-action
|
|
||||||
with:
|
|
||||||
configuration-path: .github/actions/auto-assign/auto-assign.yml
|
|
||||||
|
|
@ -24,8 +24,7 @@ on:
|
||||||
- '**/*.md'
|
- '**/*.md'
|
||||||
- 'dolphinscheduler-ui'
|
- 'dolphinscheduler-ui'
|
||||||
branches:
|
branches:
|
||||||
- '[0-9]+.[0-9]+.[0-9]+-prepare'
|
- dev
|
||||||
- '[0-9]+.[0-9]+.[0-9]+-release'
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
LOG_DIR: /tmp/dolphinscheduler
|
LOG_DIR: /tmp/dolphinscheduler
|
||||||
|
|
@ -41,7 +40,7 @@ jobs:
|
||||||
outputs:
|
outputs:
|
||||||
not-ignore: ${{ steps.filter.outputs.not-ignore }}
|
not-ignore: ${{ steps.filter.outputs.not-ignore }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
|
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
|
|
@ -58,7 +57,7 @@ jobs:
|
||||||
java: ['8', '11']
|
java: ['8', '11']
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Sanity Check
|
- name: Sanity Check
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
.target
|
.target
|
||||||
.idea/
|
.idea/
|
||||||
!.idea/icon.png
|
!.idea/icon.png
|
||||||
!.idea/vcs.xml
|
|
||||||
.run/
|
.run/
|
||||||
target/
|
target/
|
||||||
dist/
|
dist/
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,3 @@
|
||||||
[submodule ".github/actions/translate-on-issue"]
|
[submodule ".github/actions/translate-on-issue"]
|
||||||
path = .github/actions/translate-on-issue
|
path = .github/actions/translate-on-issue
|
||||||
url = https://github.com/xingchun-chen/translation-helper
|
url = https://github.com/xingchun-chen/translation-helper
|
||||||
[submodule ".github/actions/auto-assign-action"]
|
|
||||||
path = .github/actions/auto-assign-action
|
|
||||||
url = https://github.com/kentaro-m/auto-assign-action.git
|
|
||||||
branch = 288f36f
|
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="IssueNavigationConfiguration">
|
|
||||||
<option name="links">
|
|
||||||
<list>
|
|
||||||
<IssueNavigationLink>
|
|
||||||
<option name="issueRegexp" value="#(\d+)" />
|
|
||||||
<option name="linkRegexp" value="https://github.com/apache/dolphinscheduler/issues/$1" />
|
|
||||||
</IssueNavigationLink>
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="" vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
|
|
@ -51,6 +51,5 @@ header:
|
||||||
- '**/banner.txt'
|
- '**/banner.txt'
|
||||||
- '.terraform.lock.hcl'
|
- '.terraform.lock.hcl'
|
||||||
- deploy/kubernetes/dolphinscheduler/README.md.gotmpl
|
- deploy/kubernetes/dolphinscheduler/README.md.gotmpl
|
||||||
- .idea/vcs.xml
|
|
||||||
|
|
||||||
comment: on-failure
|
comment: on-failure
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,6 @@ Please refer to the [Quick Start in Kubernetes](../../../docs/docs/en/guide/inst
|
||||||
|-----|------|---------|-------------|
|
|-----|------|---------|-------------|
|
||||||
| alert.affinity | object | `{}` | Affinity is a group of affinity scheduling rules. If specified, the pod's scheduling constraints. More info: [node-affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity) |
|
| alert.affinity | object | `{}` | Affinity is a group of affinity scheduling rules. If specified, the pod's scheduling constraints. More info: [node-affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity) |
|
||||||
| alert.annotations | object | `{}` | You can use annotations to attach arbitrary non-identifying metadata to objects. Clients such as tools and libraries can retrieve this metadata. |
|
| alert.annotations | object | `{}` | You can use annotations to attach arbitrary non-identifying metadata to objects. Clients such as tools and libraries can retrieve this metadata. |
|
||||||
| alert.customizedConfig | object | `{}` | configure aligned with https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/resources/application.yaml |
|
|
||||||
| alert.enableCustomizedConfig | bool | `false` | enable configure custom config |
|
|
||||||
| alert.enabled | bool | `true` | Enable or disable the Alert-Server component |
|
| alert.enabled | bool | `true` | Enable or disable the Alert-Server component |
|
||||||
| alert.env.JAVA_OPTS | string | `"-Xms512m -Xmx512m -Xmn256m"` | The jvm options for alert server |
|
| alert.env.JAVA_OPTS | string | `"-Xms512m -Xmx512m -Xmn256m"` | The jvm options for alert server |
|
||||||
| alert.livenessProbe | object | `{"enabled":true,"failureThreshold":"3","initialDelaySeconds":"30","periodSeconds":"30","successThreshold":"1","timeoutSeconds":"5"}` | Periodic probe of container liveness. Container will be restarted if the probe fails. More info: [container-probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) |
|
| alert.livenessProbe | object | `{"enabled":true,"failureThreshold":"3","initialDelaySeconds":"30","periodSeconds":"30","successThreshold":"1","timeoutSeconds":"5"}` | Periodic probe of container liveness. Container will be restarted if the probe fails. More info: [container-probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) |
|
||||||
|
|
@ -54,8 +52,6 @@ Please refer to the [Quick Start in Kubernetes](../../../docs/docs/en/guide/inst
|
||||||
| alert.tolerations | list | `[]` | Tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass. |
|
| alert.tolerations | list | `[]` | Tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass. |
|
||||||
| api.affinity | object | `{}` | Affinity is a group of affinity scheduling rules. If specified, the pod's scheduling constraints. More info: [node-affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity) |
|
| api.affinity | object | `{}` | Affinity is a group of affinity scheduling rules. If specified, the pod's scheduling constraints. More info: [node-affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity) |
|
||||||
| api.annotations | object | `{}` | You can use annotations to attach arbitrary non-identifying metadata to objects. Clients such as tools and libraries can retrieve this metadata. |
|
| api.annotations | object | `{}` | You can use annotations to attach arbitrary non-identifying metadata to objects. Clients such as tools and libraries can retrieve this metadata. |
|
||||||
| api.customizedConfig | object | `{}` | configure aligned with https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-api/src/main/resources/application.yaml |
|
|
||||||
| api.enableCustomizedConfig | bool | `false` | enable configure custom config |
|
|
||||||
| api.enabled | bool | `true` | Enable or disable the API-Server component |
|
| api.enabled | bool | `true` | Enable or disable the API-Server component |
|
||||||
| api.env.JAVA_OPTS | string | `"-Xms512m -Xmx512m -Xmn256m"` | The jvm options for api server |
|
| api.env.JAVA_OPTS | string | `"-Xms512m -Xmx512m -Xmn256m"` | The jvm options for api server |
|
||||||
| api.livenessProbe | object | `{"enabled":true,"failureThreshold":"3","initialDelaySeconds":"30","periodSeconds":"30","successThreshold":"1","timeoutSeconds":"5"}` | Periodic probe of container liveness. Container will be restarted if the probe fails. More info: [container-probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) |
|
| api.livenessProbe | object | `{"enabled":true,"failureThreshold":"3","initialDelaySeconds":"30","periodSeconds":"30","successThreshold":"1","timeoutSeconds":"5"}` | Periodic probe of container liveness. Container will be restarted if the probe fails. More info: [container-probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) |
|
||||||
|
|
@ -195,8 +191,6 @@ Please refer to the [Quick Start in Kubernetes](../../../docs/docs/en/guide/inst
|
||||||
| initImage.pullPolicy | string | `"IfNotPresent"` | Image pull policy. Options: Always, Never, IfNotPresent |
|
| initImage.pullPolicy | string | `"IfNotPresent"` | Image pull policy. Options: Always, Never, IfNotPresent |
|
||||||
| master.affinity | object | `{}` | Affinity is a group of affinity scheduling rules. If specified, the pod's scheduling constraints. More info: [node-affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity) |
|
| master.affinity | object | `{}` | Affinity is a group of affinity scheduling rules. If specified, the pod's scheduling constraints. More info: [node-affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity) |
|
||||||
| master.annotations | object | `{}` | You can use annotations to attach arbitrary non-identifying metadata to objects. Clients such as tools and libraries can retrieve this metadata. |
|
| master.annotations | object | `{}` | You can use annotations to attach arbitrary non-identifying metadata to objects. Clients such as tools and libraries can retrieve this metadata. |
|
||||||
| master.customizedConfig | object | `{}` | configure aligned with https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-master/src/main/resources/application.yaml |
|
|
||||||
| master.enableCustomizedConfig | bool | `false` | enable configure custom config |
|
|
||||||
| master.enabled | bool | `true` | Enable or disable the Master component |
|
| master.enabled | bool | `true` | Enable or disable the Master component |
|
||||||
| master.env.JAVA_OPTS | string | `"-Xms1g -Xmx1g -Xmn512m"` | The jvm options for master server |
|
| master.env.JAVA_OPTS | string | `"-Xms1g -Xmx1g -Xmn512m"` | The jvm options for master server |
|
||||||
| master.env.MASTER_DISPATCH_TASK_NUM | string | `"3"` | Master dispatch task number per batch |
|
| master.env.MASTER_DISPATCH_TASK_NUM | string | `"3"` | Master dispatch task number per batch |
|
||||||
|
|
@ -303,8 +297,6 @@ Please refer to the [Quick Start in Kubernetes](../../../docs/docs/en/guide/inst
|
||||||
| timezone | string | `"Asia/Shanghai"` | World time and date for cities in all time zones |
|
| timezone | string | `"Asia/Shanghai"` | World time and date for cities in all time zones |
|
||||||
| worker.affinity | object | `{}` | Affinity is a group of affinity scheduling rules. If specified, the pod's scheduling constraints. More info: [node-affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity) |
|
| worker.affinity | object | `{}` | Affinity is a group of affinity scheduling rules. If specified, the pod's scheduling constraints. More info: [node-affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity) |
|
||||||
| worker.annotations | object | `{}` | You can use annotations to attach arbitrary non-identifying metadata to objects. Clients such as tools and libraries can retrieve this metadata. |
|
| worker.annotations | object | `{}` | You can use annotations to attach arbitrary non-identifying metadata to objects. Clients such as tools and libraries can retrieve this metadata. |
|
||||||
| worker.customizedConfig | object | `{}` | configure aligned with https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-worker/src/main/resources/application.yaml |
|
|
||||||
| worker.enableCustomizedConfig | bool | `false` | enable configure custom config |
|
|
||||||
| worker.enabled | bool | `true` | Enable or disable the Worker component |
|
| worker.enabled | bool | `true` | Enable or disable the Worker component |
|
||||||
| worker.env.DEFAULT_TENANT_ENABLED | bool | `false` | If set true, will use worker bootstrap user as the tenant to execute task when the tenant is `default`; |
|
| worker.env.DEFAULT_TENANT_ENABLED | bool | `false` | If set true, will use worker bootstrap user as the tenant to execute task when the tenant is `default`; |
|
||||||
| worker.env.WORKER_EXEC_THREADS | string | `"100"` | Worker execute thread number to limit task instances |
|
| worker.env.WORKER_EXEC_THREADS | string | `"100"` | Worker execute thread number to limit task instances |
|
||||||
|
|
@ -323,6 +315,7 @@ Please refer to the [Quick Start in Kubernetes](../../../docs/docs/en/guide/inst
|
||||||
| worker.keda.minReplicaCount | int | `0` | Minimum number of workers created by keda |
|
| worker.keda.minReplicaCount | int | `0` | Minimum number of workers created by keda |
|
||||||
| worker.keda.namespaceLabels | object | `{}` | Keda namespace labels |
|
| worker.keda.namespaceLabels | object | `{}` | Keda namespace labels |
|
||||||
| worker.keda.pollingInterval | int | `5` | How often KEDA polls the DolphinScheduler DB to report new scale requests to the HPA |
|
| worker.keda.pollingInterval | int | `5` | How often KEDA polls the DolphinScheduler DB to report new scale requests to the HPA |
|
||||||
|
| worker.livenessProbe | object | `{"enabled":true,"failureThreshold":"3","initialDelaySeconds":"30","periodSeconds":"30","successThreshold":"1","timeoutSeconds":"5"}` | Periodic probe of container liveness. Container will be restarted if the probe fails. More info: [container-probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) |
|
||||||
| worker.livenessProbe.enabled | bool | `true` | Turn on and off liveness probe |
|
| worker.livenessProbe.enabled | bool | `true` | Turn on and off liveness probe |
|
||||||
| worker.livenessProbe.failureThreshold | string | `"3"` | Minimum consecutive failures for the probe |
|
| worker.livenessProbe.failureThreshold | string | `"3"` | Minimum consecutive failures for the probe |
|
||||||
| worker.livenessProbe.initialDelaySeconds | string | `"30"` | Delay before liveness probe is initiated |
|
| worker.livenessProbe.initialDelaySeconds | string | `"30"` | Delay before liveness probe is initiated |
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
{{- if .Values.alert.enableCustomizedConfig }}
|
{{- if and .Values.alert.enabled }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
|
|
@ -23,8 +23,93 @@ metadata:
|
||||||
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-alert
|
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-alert
|
||||||
{{- include "dolphinscheduler.alert.labels" . | nindent 4 }}
|
{{- include "dolphinscheduler.alert.labels" . | nindent 4 }}
|
||||||
data:
|
data:
|
||||||
{{- range $path, $config := .Values.alert.customizedConfig }}
|
application.yaml: |
|
||||||
{{ $path }}: |
|
spring:
|
||||||
{{ $config | indent 4 -}}
|
profiles:
|
||||||
{{- end -}}
|
active: {{ .Values.datasource.profile }}
|
||||||
{{- end -}}
|
jackson:
|
||||||
|
time-zone: UTC
|
||||||
|
date-format: "yyyy-MM-dd HH:mm:ss"
|
||||||
|
banner:
|
||||||
|
charset: UTF-8
|
||||||
|
datasource:
|
||||||
|
driver-class-name: org.postgresql.Driver
|
||||||
|
url: jdbc:postgresql://127.0.0.1:5432/dolphinscheduler
|
||||||
|
username: root
|
||||||
|
password: root
|
||||||
|
hikari:
|
||||||
|
connection-test-query: select 1
|
||||||
|
pool-name: DolphinScheduler
|
||||||
|
|
||||||
|
# Mybatis-plus configuration, you don't need to change it
|
||||||
|
mybatis-plus:
|
||||||
|
mapper-locations: classpath:org/apache/dolphinscheduler/dao/mapper/*Mapper.xml
|
||||||
|
type-aliases-package: org.apache.dolphinscheduler.dao.entity
|
||||||
|
configuration:
|
||||||
|
cache-enabled: false
|
||||||
|
call-setters-on-nulls: true
|
||||||
|
map-underscore-to-camel-case: true
|
||||||
|
jdbc-type-for-null: NULL
|
||||||
|
global-config:
|
||||||
|
db-config:
|
||||||
|
id-type: auto
|
||||||
|
banner: false
|
||||||
|
|
||||||
|
server:
|
||||||
|
port: 50053
|
||||||
|
|
||||||
|
management:
|
||||||
|
endpoints:
|
||||||
|
web:
|
||||||
|
exposure:
|
||||||
|
include: health,metrics,prometheus
|
||||||
|
endpoint:
|
||||||
|
health:
|
||||||
|
enabled: true
|
||||||
|
show-details: always
|
||||||
|
health:
|
||||||
|
db:
|
||||||
|
enabled: true
|
||||||
|
defaults:
|
||||||
|
enabled: false
|
||||||
|
metrics:
|
||||||
|
tags:
|
||||||
|
application: ${spring.application.name}
|
||||||
|
|
||||||
|
alert:
|
||||||
|
port: 50052
|
||||||
|
# Mark each alert of alert server if late after x milliseconds as failed.
|
||||||
|
# Define value is (0 = infinite), and alert server would be waiting alert result.
|
||||||
|
wait-timeout: 0
|
||||||
|
max-heartbeat-interval: 60s
|
||||||
|
query_alert_threshold: 100
|
||||||
|
|
||||||
|
registry:
|
||||||
|
type: zookeeper
|
||||||
|
zookeeper:
|
||||||
|
namespace: dolphinscheduler
|
||||||
|
connect-string: localhost:2181
|
||||||
|
retry-policy:
|
||||||
|
base-sleep-time: 60ms
|
||||||
|
max-sleep: 300ms
|
||||||
|
max-retries: 5
|
||||||
|
session-timeout: 30s
|
||||||
|
connection-timeout: 9s
|
||||||
|
block-until-connected: 600ms
|
||||||
|
digest: ~
|
||||||
|
|
||||||
|
metrics:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Override by profile
|
||||||
|
---
|
||||||
|
spring:
|
||||||
|
config:
|
||||||
|
activate:
|
||||||
|
on-profile: mysql
|
||||||
|
datasource:
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler
|
||||||
|
username: root
|
||||||
|
password: root
|
||||||
|
{{- end }}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
{{- if .Values.api.enableCustomizedConfig }}
|
{{- if and .Values.api.enabled }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
|
|
@ -23,8 +23,236 @@ metadata:
|
||||||
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-api
|
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-api
|
||||||
{{- include "dolphinscheduler.api.labels" . | nindent 4 }}
|
{{- include "dolphinscheduler.api.labels" . | nindent 4 }}
|
||||||
data:
|
data:
|
||||||
{{- range $path, $config := .Values.api.customizedConfig }}
|
application.yaml: |
|
||||||
{{ $path }}: |
|
server:
|
||||||
{{ $config | indent 4 -}}
|
port: 12345
|
||||||
{{- end -}}
|
servlet:
|
||||||
{{- end -}}
|
session:
|
||||||
|
timeout: 120m
|
||||||
|
context-path: /dolphinscheduler/
|
||||||
|
compression:
|
||||||
|
enabled: true
|
||||||
|
mime-types: text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml
|
||||||
|
jetty:
|
||||||
|
max-http-form-post-size: 5000000
|
||||||
|
accesslog:
|
||||||
|
enabled: true
|
||||||
|
custom-format: '%{client}a - %u %t "%r" %s %O %{ms}Tms'
|
||||||
|
|
||||||
|
spring:
|
||||||
|
profiles:
|
||||||
|
active: {{ .Values.datasource.profile }}
|
||||||
|
banner:
|
||||||
|
charset: UTF-8
|
||||||
|
jackson:
|
||||||
|
time-zone: UTC
|
||||||
|
date-format: "yyyy-MM-dd HH:mm:ss"
|
||||||
|
servlet:
|
||||||
|
multipart:
|
||||||
|
max-file-size: 1024MB
|
||||||
|
max-request-size: 1024MB
|
||||||
|
messages:
|
||||||
|
basename: i18n/messages
|
||||||
|
datasource:
|
||||||
|
driver-class-name: org.postgresql.Driver
|
||||||
|
url: jdbc:postgresql://127.0.0.1:5432/dolphinscheduler
|
||||||
|
username: root
|
||||||
|
password: root
|
||||||
|
hikari:
|
||||||
|
connection-test-query: select 1
|
||||||
|
pool-name: DolphinScheduler
|
||||||
|
quartz:
|
||||||
|
auto-startup: false
|
||||||
|
job-store-type: jdbc
|
||||||
|
jdbc:
|
||||||
|
initialize-schema: never
|
||||||
|
properties:
|
||||||
|
org.quartz.jobStore.isClustered: true
|
||||||
|
org.quartz.jobStore.class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
|
||||||
|
org.quartz.scheduler.instanceId: AUTO
|
||||||
|
org.quartz.jobStore.tablePrefix: QRTZ_
|
||||||
|
org.quartz.jobStore.acquireTriggersWithinLock: true
|
||||||
|
org.quartz.scheduler.instanceName: DolphinScheduler
|
||||||
|
org.quartz.threadPool.class: org.apache.dolphinscheduler.scheduler.quartz.QuartzZeroSizeThreadPool
|
||||||
|
org.quartz.jobStore.useProperties: false
|
||||||
|
org.quartz.jobStore.misfireThreshold: 60000
|
||||||
|
org.quartz.scheduler.makeSchedulerThreadDaemon: true
|
||||||
|
org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
|
||||||
|
org.quartz.jobStore.clusterCheckinInterval: 5000
|
||||||
|
org.quartz.scheduler.batchTriggerAcquisitionMaxCount: 1
|
||||||
|
mvc:
|
||||||
|
pathmatch:
|
||||||
|
matching-strategy: ANT_PATH_MATCHER
|
||||||
|
static-path-pattern: /static/**
|
||||||
|
springdoc:
|
||||||
|
swagger-ui:
|
||||||
|
path: /swagger-ui.html
|
||||||
|
packages-to-scan: org.apache.dolphinscheduler.api
|
||||||
|
|
||||||
|
# Mybatis-plus configuration, you don't need to change it
|
||||||
|
mybatis-plus:
|
||||||
|
mapper-locations: classpath:org/apache/dolphinscheduler/dao/mapper/*Mapper.xml
|
||||||
|
type-aliases-package: org.apache.dolphinscheduler.dao.entity
|
||||||
|
configuration:
|
||||||
|
cache-enabled: false
|
||||||
|
call-setters-on-nulls: true
|
||||||
|
map-underscore-to-camel-case: true
|
||||||
|
jdbc-type-for-null: NULL
|
||||||
|
global-config:
|
||||||
|
db-config:
|
||||||
|
id-type: auto
|
||||||
|
banner: false
|
||||||
|
|
||||||
|
management:
|
||||||
|
endpoints:
|
||||||
|
web:
|
||||||
|
exposure:
|
||||||
|
include: health,metrics,prometheus
|
||||||
|
endpoint:
|
||||||
|
health:
|
||||||
|
enabled: true
|
||||||
|
show-details: always
|
||||||
|
health:
|
||||||
|
db:
|
||||||
|
enabled: true
|
||||||
|
defaults:
|
||||||
|
enabled: false
|
||||||
|
metrics:
|
||||||
|
tags:
|
||||||
|
application: ${spring.application.name}
|
||||||
|
|
||||||
|
registry:
|
||||||
|
type: zookeeper
|
||||||
|
zookeeper:
|
||||||
|
namespace: dolphinscheduler
|
||||||
|
connect-string: localhost:2181
|
||||||
|
retry-policy:
|
||||||
|
base-sleep-time: 60ms
|
||||||
|
max-sleep: 300ms
|
||||||
|
max-retries: 5
|
||||||
|
session-timeout: 60s
|
||||||
|
connection-timeout: 15s
|
||||||
|
block-until-connected: 15s
|
||||||
|
digest: ~
|
||||||
|
|
||||||
|
api:
|
||||||
|
audit-enable: false
|
||||||
|
# Traffic control, if you turn on this config, the maximum number of request/s will be limited.
|
||||||
|
# global max request number per second
|
||||||
|
# default tenant-level max request number
|
||||||
|
traffic-control:
|
||||||
|
global-switch: false
|
||||||
|
max-global-qps-rate: 300
|
||||||
|
tenant-switch: false
|
||||||
|
default-tenant-qps-rate: 10
|
||||||
|
#customize-tenant-qps-rate:
|
||||||
|
# eg.
|
||||||
|
#tenant1: 11
|
||||||
|
#tenant2: 20
|
||||||
|
python-gateway:
|
||||||
|
# Weather enable python gateway server or not. The default value is false.
|
||||||
|
enabled: false
|
||||||
|
# Authentication token for connection from python api to python gateway server. Should be changed the default value
|
||||||
|
# when you deploy in public network.
|
||||||
|
auth-token: jwUDzpLsNKEFER4*a8gruBH_GsAurNxU7A@Xc
|
||||||
|
# The address of Python gateway server start. Set its value to `0.0.0.0` if your Python API run in different
|
||||||
|
# between Python gateway server. It could be be specific to other address like `127.0.0.1` or `localhost`
|
||||||
|
gateway-server-address: 0.0.0.0
|
||||||
|
# The port of Python gateway server start. Define which port you could connect to Python gateway server from
|
||||||
|
# Python API side.
|
||||||
|
gateway-server-port: 25333
|
||||||
|
# The address of Python callback client.
|
||||||
|
python-address: 127.0.0.1
|
||||||
|
# The port of Python callback client.
|
||||||
|
python-port: 25334
|
||||||
|
# Close connection of socket server if no other request accept after x milliseconds. Define value is (0 = infinite),
|
||||||
|
# and socket server would never close even though no requests accept
|
||||||
|
connect-timeout: 0
|
||||||
|
# Close each active connection of socket server if python program not active after x milliseconds. Define value is
|
||||||
|
# (0 = infinite), and socket server would never close even though no requests accept
|
||||||
|
read-timeout: 0
|
||||||
|
|
||||||
|
metrics:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
security:
|
||||||
|
authentication:
|
||||||
|
# Authentication types (supported types: PASSWORD,LDAP,CASDOOR_SSO)
|
||||||
|
type: PASSWORD
|
||||||
|
# IF you set type `LDAP`, below config will be effective
|
||||||
|
ldap:
|
||||||
|
# ldap server config
|
||||||
|
urls: ldap://ldap.forumsys.com:389/
|
||||||
|
base-dn: dc=example,dc=com
|
||||||
|
username: cn=read-only-admin,dc=example,dc=com
|
||||||
|
password: password
|
||||||
|
user:
|
||||||
|
# admin userId when you use LDAP login
|
||||||
|
admin: read-only-admin
|
||||||
|
identity-attribute: uid
|
||||||
|
email-attribute: mail
|
||||||
|
# action when ldap user is not exist (supported types: CREATE,DENY)
|
||||||
|
not-exist-action: CREATE
|
||||||
|
ssl:
|
||||||
|
enable: false
|
||||||
|
# jks file absolute path && password
|
||||||
|
trust-store: "/ldapkeystore.jks"
|
||||||
|
trust-store-password: "password"
|
||||||
|
casdoor:
|
||||||
|
user:
|
||||||
|
admin: ""
|
||||||
|
oauth2:
|
||||||
|
enable: false
|
||||||
|
provider:
|
||||||
|
github:
|
||||||
|
authorizationUri: ""
|
||||||
|
redirectUri: ""
|
||||||
|
clientId: ""
|
||||||
|
clientSecret: ""
|
||||||
|
tokenUri: ""
|
||||||
|
userInfoUri: ""
|
||||||
|
callbackUrl: ""
|
||||||
|
iconUri: ""
|
||||||
|
provider: github
|
||||||
|
google:
|
||||||
|
authorizationUri: ""
|
||||||
|
redirectUri: ""
|
||||||
|
clientId: ""
|
||||||
|
clientSecret: ""
|
||||||
|
tokenUri: ""
|
||||||
|
userInfoUri: ""
|
||||||
|
callbackUrl: ""
|
||||||
|
iconUri: ""
|
||||||
|
provider: google
|
||||||
|
casdoor:
|
||||||
|
# Your Casdoor server url
|
||||||
|
endpoint: ""
|
||||||
|
client-id: ""
|
||||||
|
client-secret: ""
|
||||||
|
# The certificate may be multi-line, you can use `|-` for ease
|
||||||
|
certificate: ""
|
||||||
|
# Your organization name added in Casdoor
|
||||||
|
organization-name: ""
|
||||||
|
# Your application name added in Casdoor
|
||||||
|
application-name: ""
|
||||||
|
# Doplhinscheduler login url
|
||||||
|
redirect-url: ""
|
||||||
|
|
||||||
|
# Override by profile
|
||||||
|
---
|
||||||
|
spring:
|
||||||
|
config:
|
||||||
|
activate:
|
||||||
|
on-profile: mysql
|
||||||
|
datasource:
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler
|
||||||
|
username: root
|
||||||
|
password: root
|
||||||
|
quartz:
|
||||||
|
properties:
|
||||||
|
org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
{{- if .Values.master.enableCustomizedConfig }}
|
{{- if and .Values.master.enabled }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
|
|
@ -23,8 +23,151 @@ metadata:
|
||||||
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-master
|
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-master
|
||||||
{{- include "dolphinscheduler.master.labels" . | nindent 4 }}
|
{{- include "dolphinscheduler.master.labels" . | nindent 4 }}
|
||||||
data:
|
data:
|
||||||
{{- range $path, $config := .Values.master.customizedConfig }}
|
application.yaml: |
|
||||||
{{ $path }}: |
|
spring:
|
||||||
{{ $config | indent 4 -}}
|
profiles:
|
||||||
{{- end -}}
|
active: {{ .Values.datasource.profile }}
|
||||||
{{- end -}}
|
banner:
|
||||||
|
charset: UTF-8
|
||||||
|
jackson:
|
||||||
|
time-zone: UTC
|
||||||
|
date-format: "yyyy-MM-dd HH:mm:ss"
|
||||||
|
datasource:
|
||||||
|
driver-class-name: org.postgresql.Driver
|
||||||
|
url: jdbc:postgresql://127.0.0.1:5432/dolphinscheduler
|
||||||
|
username: root
|
||||||
|
password: root
|
||||||
|
hikari:
|
||||||
|
connection-test-query: select 1
|
||||||
|
pool-name: DolphinScheduler
|
||||||
|
quartz:
|
||||||
|
job-store-type: jdbc
|
||||||
|
jdbc:
|
||||||
|
initialize-schema: never
|
||||||
|
properties:
|
||||||
|
org.quartz.threadPool.threadPriority: 5
|
||||||
|
org.quartz.jobStore.isClustered: true
|
||||||
|
org.quartz.jobStore.class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
|
||||||
|
org.quartz.scheduler.instanceId: AUTO
|
||||||
|
org.quartz.jobStore.tablePrefix: QRTZ_
|
||||||
|
org.quartz.jobStore.acquireTriggersWithinLock: true
|
||||||
|
org.quartz.scheduler.instanceName: DolphinScheduler
|
||||||
|
org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool
|
||||||
|
org.quartz.jobStore.useProperties: false
|
||||||
|
org.quartz.threadPool.makeThreadsDaemons: true
|
||||||
|
org.quartz.threadPool.threadCount: 25
|
||||||
|
org.quartz.jobStore.misfireThreshold: 60000
|
||||||
|
org.quartz.scheduler.batchTriggerAcquisitionMaxCount: 1
|
||||||
|
org.quartz.scheduler.makeSchedulerThreadDaemon: true
|
||||||
|
org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
|
||||||
|
org.quartz.jobStore.clusterCheckinInterval: 5000
|
||||||
|
|
||||||
|
# Mybatis-plus configuration, you don't need to change it
|
||||||
|
mybatis-plus:
|
||||||
|
mapper-locations: classpath:org/apache/dolphinscheduler/dao/mapper/*Mapper.xml
|
||||||
|
type-aliases-package: org.apache.dolphinscheduler.dao.entity
|
||||||
|
configuration:
|
||||||
|
cache-enabled: false
|
||||||
|
call-setters-on-nulls: true
|
||||||
|
map-underscore-to-camel-case: true
|
||||||
|
jdbc-type-for-null: NULL
|
||||||
|
global-config:
|
||||||
|
db-config:
|
||||||
|
id-type: auto
|
||||||
|
banner: false
|
||||||
|
|
||||||
|
|
||||||
|
registry:
|
||||||
|
type: zookeeper
|
||||||
|
zookeeper:
|
||||||
|
namespace: dolphinscheduler
|
||||||
|
connect-string: localhost:2181
|
||||||
|
retry-policy:
|
||||||
|
base-sleep-time: 60ms
|
||||||
|
max-sleep: 300ms
|
||||||
|
max-retries: 5
|
||||||
|
session-timeout: 30s
|
||||||
|
connection-timeout: 9s
|
||||||
|
block-until-connected: 600ms
|
||||||
|
digest: ~
|
||||||
|
|
||||||
|
master:
|
||||||
|
listen-port: 5678
|
||||||
|
# master fetch command num
|
||||||
|
fetch-command-num: 10
|
||||||
|
# master prepare execute thread number to limit handle commands in parallel
|
||||||
|
pre-exec-threads: 10
|
||||||
|
# master execute thread number to limit process instances in parallel
|
||||||
|
exec-threads: 100
|
||||||
|
# master dispatch task number per batch, if all the tasks dispatch failed in a batch, will sleep 1s.
|
||||||
|
dispatch-task-number: 3
|
||||||
|
# master host selector to select a suitable worker, default value: LowerWeight. Optional values include random, round_robin, lower_weight
|
||||||
|
host-selector: lower_weight
|
||||||
|
# master heartbeat interval
|
||||||
|
max-heartbeat-interval: 10s
|
||||||
|
# master commit task retry times
|
||||||
|
task-commit-retry-times: 5
|
||||||
|
# master commit task interval
|
||||||
|
task-commit-interval: 1s
|
||||||
|
state-wheel-interval: 5s
|
||||||
|
server-load-protection:
|
||||||
|
# If set true, will open master overload protection
|
||||||
|
enabled: true
|
||||||
|
# Master max system cpu usage, when the master's system cpu usage is smaller then this value, master server can execute workflow.
|
||||||
|
max-system-cpu-usage-percentage-thresholds: 0.7
|
||||||
|
# Master max jvm cpu usage, when the master's jvm cpu usage is smaller then this value, master server can execute workflow.
|
||||||
|
max-jvm-cpu-usage-percentage-thresholds: 0.7
|
||||||
|
# Master max System memory usage , when the master's system memory usage is smaller then this value, master server can execute workflow.
|
||||||
|
max-system-memory-usage-percentage-thresholds: 0.7
|
||||||
|
# Master max disk usage , when the master's disk usage is smaller then this value, master server can execute workflow.
|
||||||
|
max-disk-usage-percentage-thresholds: 0.7
|
||||||
|
# failover interval, the unit is minute
|
||||||
|
failover-interval: 10m
|
||||||
|
# kill yarn / k8s application when failover taskInstance, default true
|
||||||
|
kill-application-when-task-failover: true
|
||||||
|
registry-disconnect-strategy:
|
||||||
|
# The disconnect strategy: stop, waiting
|
||||||
|
strategy: waiting
|
||||||
|
# The max waiting time to reconnect to registry if you set the strategy to waiting
|
||||||
|
max-waiting-time: 100s
|
||||||
|
worker-group-refresh-interval: 10s
|
||||||
|
|
||||||
|
server:
|
||||||
|
port: 5679
|
||||||
|
|
||||||
|
management:
|
||||||
|
endpoints:
|
||||||
|
web:
|
||||||
|
exposure:
|
||||||
|
include: health,metrics,prometheus
|
||||||
|
endpoint:
|
||||||
|
health:
|
||||||
|
enabled: true
|
||||||
|
show-details: always
|
||||||
|
health:
|
||||||
|
db:
|
||||||
|
enabled: true
|
||||||
|
defaults:
|
||||||
|
enabled: false
|
||||||
|
metrics:
|
||||||
|
tags:
|
||||||
|
application: ${spring.application.name}
|
||||||
|
|
||||||
|
metrics:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Override by profile
|
||||||
|
---
|
||||||
|
spring:
|
||||||
|
config:
|
||||||
|
activate:
|
||||||
|
on-profile: mysql
|
||||||
|
datasource:
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler
|
||||||
|
username: root
|
||||||
|
password: root
|
||||||
|
quartz:
|
||||||
|
properties:
|
||||||
|
org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
|
||||||
|
{{- end }}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
{{- if .Values.worker.enableCustomizedConfig }}
|
{{- if and .Values.worker.enabled }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
|
|
@ -23,8 +23,86 @@ metadata:
|
||||||
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-worker
|
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-worker
|
||||||
{{- include "dolphinscheduler.worker.labels" . | nindent 4 }}
|
{{- include "dolphinscheduler.worker.labels" . | nindent 4 }}
|
||||||
data:
|
data:
|
||||||
{{- range $path, $config := .Values.worker.customizedConfig }}
|
application.yaml: |
|
||||||
{{ $path }}: |
|
spring:
|
||||||
{{ $config | indent 4 -}}
|
banner:
|
||||||
{{- end -}}
|
charset: UTF-8
|
||||||
{{- end -}}
|
jackson:
|
||||||
|
time-zone: UTC
|
||||||
|
date-format: "yyyy-MM-dd HH:mm:ss"
|
||||||
|
autoconfigure:
|
||||||
|
exclude:
|
||||||
|
- org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
|
||||||
|
|
||||||
|
registry:
|
||||||
|
type: zookeeper
|
||||||
|
zookeeper:
|
||||||
|
namespace: dolphinscheduler
|
||||||
|
connect-string: localhost:2181
|
||||||
|
retry-policy:
|
||||||
|
base-sleep-time: 60ms
|
||||||
|
max-sleep: 300ms
|
||||||
|
max-retries: 5
|
||||||
|
session-timeout: 30s
|
||||||
|
connection-timeout: 9s
|
||||||
|
block-until-connected: 600ms
|
||||||
|
digest: ~
|
||||||
|
|
||||||
|
worker:
|
||||||
|
# worker listener port
|
||||||
|
listen-port: 1234
|
||||||
|
# worker execute thread number to limit task instances in parallel
|
||||||
|
exec-threads: 100
|
||||||
|
# worker heartbeat interval
|
||||||
|
max-heartbeat-interval: 10s
|
||||||
|
# worker host weight to dispatch tasks, default value 100
|
||||||
|
host-weight: 100
|
||||||
|
server-load-protection:
|
||||||
|
# If set true, will open worker overload protection
|
||||||
|
enabled: true
|
||||||
|
# Worker max system cpu usage, when the worker's system cpu usage is smaller then this value, worker server can be dispatched tasks.
|
||||||
|
max-system-cpu-usage-percentage-thresholds: 0.7
|
||||||
|
# Worker max jvm cpu usage, when the worker's jvm cpu usage is smaller then this value, worker server can be dispatched tasks.
|
||||||
|
max-jvm-cpu-usage-percentage-thresholds: 0.7
|
||||||
|
# Worker max System memory usage , when the master's system memory usage is smaller then this value, master server can execute workflow.
|
||||||
|
max-system-memory-usage-percentage-thresholds: 0.7
|
||||||
|
# Worker max disk usage , when the worker's disk usage is smaller then this value, worker server can be dispatched tasks.
|
||||||
|
max-disk-usage-percentage-thresholds: 0.7
|
||||||
|
registry-disconnect-strategy:
|
||||||
|
# The disconnect strategy: stop, waiting
|
||||||
|
strategy: waiting
|
||||||
|
# The max waiting time to reconnect to registry if you set the strategy to waiting
|
||||||
|
max-waiting-time: 100s
|
||||||
|
task-execute-threads-full-policy: REJECT
|
||||||
|
tenant-config:
|
||||||
|
# tenant corresponds to the user of the system, which is used by the worker to submit the job. If system does not have this user, it will be automatically created after the parameter worker.tenant.auto.create is true.
|
||||||
|
auto-create-tenant-enabled: true
|
||||||
|
# Scenes to be used for distributed users. For example, users created by FreeIpa are stored in LDAP. This parameter only applies to Linux, When this parameter is true, auto-create-tenant-enabled has no effect and will not automatically create tenants.
|
||||||
|
distributed-tenant-enabled: false
|
||||||
|
# If set true, will use worker bootstrap user as the tenant to execute task when the tenant is `default`.
|
||||||
|
default-tenant-enabled: false
|
||||||
|
|
||||||
|
server:
|
||||||
|
port: 1235
|
||||||
|
|
||||||
|
management:
|
||||||
|
endpoints:
|
||||||
|
web:
|
||||||
|
exposure:
|
||||||
|
include: health,metrics,prometheus
|
||||||
|
endpoint:
|
||||||
|
health:
|
||||||
|
enabled: true
|
||||||
|
show-details: always
|
||||||
|
health:
|
||||||
|
db:
|
||||||
|
enabled: true
|
||||||
|
defaults:
|
||||||
|
enabled: false
|
||||||
|
metrics:
|
||||||
|
tags:
|
||||||
|
application: ${spring.application.name}
|
||||||
|
|
||||||
|
metrics:
|
||||||
|
enabled: true
|
||||||
|
{{- end }}
|
||||||
|
|
|
||||||
|
|
@ -115,11 +115,9 @@ spec:
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
mountPath: /opt/dolphinscheduler/conf/common.properties
|
mountPath: /opt/dolphinscheduler/conf/common.properties
|
||||||
subPath: common.properties
|
subPath: common.properties
|
||||||
{{- if .Values.alert.enableCustomizedConfig }}
|
|
||||||
- name: alert-config-volume
|
- name: alert-config-volume
|
||||||
mountPath: /opt/dolphinscheduler/conf/application.yaml
|
mountPath: /opt/dolphinscheduler/conf/application.yaml
|
||||||
subPath: application.yaml
|
subPath: application.yaml
|
||||||
{{- end }}
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: {{ include "dolphinscheduler.fullname" . }}-alert
|
- name: {{ include "dolphinscheduler.fullname" . }}-alert
|
||||||
{{- if .Values.alert.persistentVolumeClaim.enabled }}
|
{{- if .Values.alert.persistentVolumeClaim.enabled }}
|
||||||
|
|
@ -131,9 +129,7 @@ spec:
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ include "dolphinscheduler.fullname" . }}-configs
|
name: {{ include "dolphinscheduler.fullname" . }}-configs
|
||||||
{{- if .Values.alert.enableCustomizedConfig }}
|
|
||||||
- name: alert-config-volume
|
- name: alert-config-volume
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
||||||
|
|
@ -121,11 +121,9 @@ spec:
|
||||||
mountPath: /opt/dolphinscheduler/conf/task-type-config.yaml
|
mountPath: /opt/dolphinscheduler/conf/task-type-config.yaml
|
||||||
subPath: task-type-config.yaml
|
subPath: task-type-config.yaml
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.api.enableCustomizedConfig }}
|
|
||||||
- name: api-config-volume
|
- name: api-config-volume
|
||||||
mountPath: /opt/dolphinscheduler/conf/application.yaml
|
mountPath: /opt/dolphinscheduler/conf/application.yaml
|
||||||
subPath: application.yaml
|
subPath: application.yaml
|
||||||
{{- end }}
|
|
||||||
{{- include "dolphinscheduler.sharedStorage.volumeMount" . | nindent 12 }}
|
{{- include "dolphinscheduler.sharedStorage.volumeMount" . | nindent 12 }}
|
||||||
{{- include "dolphinscheduler.fsFileResource.volumeMount" . | nindent 12 }}
|
{{- include "dolphinscheduler.fsFileResource.volumeMount" . | nindent 12 }}
|
||||||
{{- include "dolphinscheduler.ldap.ssl.volumeMount" . | nindent 12 }}
|
{{- include "dolphinscheduler.ldap.ssl.volumeMount" . | nindent 12 }}
|
||||||
|
|
@ -141,11 +139,9 @@ spec:
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ include "dolphinscheduler.fullname" . }}-configs
|
name: {{ include "dolphinscheduler.fullname" . }}-configs
|
||||||
{{- if .Values.api.enableCustomizedConfig }}
|
|
||||||
- name: api-config-volume
|
- name: api-config-volume
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ include "dolphinscheduler.fullname" . }}-api
|
name: {{ include "dolphinscheduler.fullname" . }}-api
|
||||||
{{- end }}
|
|
||||||
{{- include "dolphinscheduler.sharedStorage.volume" . | nindent 8 }}
|
{{- include "dolphinscheduler.sharedStorage.volume" . | nindent 8 }}
|
||||||
{{- include "dolphinscheduler.fsFileResource.volume" . | nindent 8 }}
|
{{- include "dolphinscheduler.fsFileResource.volume" . | nindent 8 }}
|
||||||
{{- include "dolphinscheduler.ldap.ssl.volume" . | nindent 8 }}
|
{{- include "dolphinscheduler.ldap.ssl.volume" . | nindent 8 }}
|
||||||
|
|
|
||||||
|
|
@ -109,11 +109,9 @@ spec:
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: "/opt/dolphinscheduler/logs"
|
- mountPath: "/opt/dolphinscheduler/logs"
|
||||||
name: {{ include "dolphinscheduler.fullname" . }}-master
|
name: {{ include "dolphinscheduler.fullname" . }}-master
|
||||||
{{- if .Values.master.enableCustomizedConfig }}
|
|
||||||
- name: master-config-volume
|
- name: master-config-volume
|
||||||
mountPath: /opt/dolphinscheduler/conf/application.yaml
|
mountPath: /opt/dolphinscheduler/conf/application.yaml
|
||||||
subPath: application.yaml
|
subPath: application.yaml
|
||||||
{{- end }}
|
|
||||||
{{- include "dolphinscheduler.sharedStorage.volumeMount" . | nindent 12 }}
|
{{- include "dolphinscheduler.sharedStorage.volumeMount" . | nindent 12 }}
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
mountPath: /opt/dolphinscheduler/conf/common.properties
|
mountPath: /opt/dolphinscheduler/conf/common.properties
|
||||||
|
|
@ -127,11 +125,9 @@ spec:
|
||||||
{{- else }}
|
{{- else }}
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.master.enableCustomizedConfig }}
|
|
||||||
- name: master-config-volume
|
- name: master-config-volume
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ include "dolphinscheduler.fullname" . }}-master
|
name: {{ include "dolphinscheduler.fullname" . }}-master
|
||||||
{{- end }}
|
|
||||||
{{- include "dolphinscheduler.sharedStorage.volume" . | nindent 8 }}
|
{{- include "dolphinscheduler.sharedStorage.volume" . | nindent 8 }}
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
configMap:
|
configMap:
|
||||||
|
|
|
||||||
|
|
@ -111,11 +111,9 @@ spec:
|
||||||
name: {{ include "dolphinscheduler.fullname" . }}-worker-data
|
name: {{ include "dolphinscheduler.fullname" . }}-worker-data
|
||||||
- mountPath: "/opt/dolphinscheduler/logs"
|
- mountPath: "/opt/dolphinscheduler/logs"
|
||||||
name: {{ include "dolphinscheduler.fullname" . }}-worker-logs
|
name: {{ include "dolphinscheduler.fullname" . }}-worker-logs
|
||||||
{{- if .Values.worker.enableCustomizedConfig }}
|
|
||||||
- name: worker-config-volume
|
- name: worker-config-volume
|
||||||
mountPath: /opt/dolphinscheduler/conf/application.yaml
|
mountPath: /opt/dolphinscheduler/conf/application.yaml
|
||||||
subPath: application.yaml
|
subPath: application.yaml
|
||||||
{{- end }}
|
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
mountPath: /opt/dolphinscheduler/conf/common.properties
|
mountPath: /opt/dolphinscheduler/conf/common.properties
|
||||||
subPath: common.properties
|
subPath: common.properties
|
||||||
|
|
@ -144,11 +142,9 @@ spec:
|
||||||
- name: {{ include "dolphinscheduler.fullname" . }}-worker-logs
|
- name: {{ include "dolphinscheduler.fullname" . }}-worker-logs
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.worker.enableCustomizedConfig }}
|
|
||||||
- name: worker-config-volume
|
- name: worker-config-volume
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ include "dolphinscheduler.fullname" . }}-worker
|
name: {{ include "dolphinscheduler.fullname" . }}-worker
|
||||||
{{- end }}
|
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ include "dolphinscheduler.fullname" . }}-configs
|
name: {{ include "dolphinscheduler.fullname" . }}-configs
|
||||||
|
|
|
||||||
|
|
@ -449,19 +449,7 @@ master:
|
||||||
# requests:
|
# requests:
|
||||||
# memory: "2Gi"
|
# memory: "2Gi"
|
||||||
# cpu: "500m"
|
# cpu: "500m"
|
||||||
# -- enable configure custom config
|
|
||||||
enableCustomizedConfig: false
|
|
||||||
# -- configure aligned with https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-master/src/main/resources/application.yaml
|
|
||||||
customizedConfig: { }
|
|
||||||
# customizedConfig:
|
|
||||||
# application.yaml: |
|
|
||||||
# profiles:
|
|
||||||
# active: postgresql
|
|
||||||
# banner:
|
|
||||||
# charset: UTF-8
|
|
||||||
# jackson:
|
|
||||||
# time-zone: UTC
|
|
||||||
# date-format: "yyyy-MM-dd HH:mm:ss"
|
|
||||||
# -- Periodic probe of container liveness. Container will be restarted if the probe fails.
|
# -- Periodic probe of container liveness. Container will be restarted if the probe fails.
|
||||||
# More info: [container-probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes)
|
# More info: [container-probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes)
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
|
|
@ -590,17 +578,6 @@ worker:
|
||||||
|
|
||||||
# -- Periodic probe of container liveness. Container will be restarted if the probe fails.
|
# -- Periodic probe of container liveness. Container will be restarted if the probe fails.
|
||||||
# More info: [container-probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes)
|
# More info: [container-probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes)
|
||||||
# -- enable configure custom config
|
|
||||||
enableCustomizedConfig: false
|
|
||||||
# -- configure aligned with https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-worker/src/main/resources/application.yaml
|
|
||||||
customizedConfig: { }
|
|
||||||
# customizedConfig:
|
|
||||||
# application.yaml: |
|
|
||||||
# banner:
|
|
||||||
# charset: UTF-8
|
|
||||||
# jackson:
|
|
||||||
# time-zone: UTC
|
|
||||||
# date-format: "yyyy-MM-dd HH:mm:ss"
|
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
# -- Turn on and off liveness probe
|
# -- Turn on and off liveness probe
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
@ -763,19 +740,7 @@ alert:
|
||||||
# requests:
|
# requests:
|
||||||
# memory: "1Gi"
|
# memory: "1Gi"
|
||||||
# cpu: "500m"
|
# cpu: "500m"
|
||||||
# -- enable configure custom config
|
|
||||||
enableCustomizedConfig: false
|
|
||||||
# -- configure aligned with https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/resources/application.yaml
|
|
||||||
customizedConfig: { }
|
|
||||||
# customizedConfig:
|
|
||||||
# application.yaml: |
|
|
||||||
# profiles:
|
|
||||||
# active: postgresql
|
|
||||||
# banner:
|
|
||||||
# charset: UTF-8
|
|
||||||
# jackson:
|
|
||||||
# time-zone: UTC
|
|
||||||
# date-format: "yyyy-MM-dd HH:mm:ss"
|
|
||||||
# -- Periodic probe of container liveness. Container will be restarted if the probe fails.
|
# -- Periodic probe of container liveness. Container will be restarted if the probe fails.
|
||||||
# More info: [container-probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes)
|
# More info: [container-probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes)
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
|
|
@ -875,19 +840,7 @@ api:
|
||||||
# requests:
|
# requests:
|
||||||
# memory: "1Gi"
|
# memory: "1Gi"
|
||||||
# cpu: "500m"
|
# cpu: "500m"
|
||||||
# -- enable configure custom config
|
|
||||||
enableCustomizedConfig: false
|
|
||||||
# -- configure aligned with https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-api/src/main/resources/application.yaml
|
|
||||||
customizedConfig: { }
|
|
||||||
# customizedConfig:
|
|
||||||
# application.yaml: |
|
|
||||||
# profiles:
|
|
||||||
# active: postgresql
|
|
||||||
# banner:
|
|
||||||
# charset: UTF-8
|
|
||||||
# jackson:
|
|
||||||
# time-zone: UTC
|
|
||||||
# date-format: "yyyy-MM-dd HH:mm:ss"
|
|
||||||
# -- Periodic probe of container liveness. Container will be restarted if the probe fails.
|
# -- Periodic probe of container liveness. Container will be restarted if the probe fails.
|
||||||
# More info: [container-probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes)
|
# More info: [container-probes](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes)
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,10 @@ export default {
|
||||||
title: 'Sqoop',
|
title: 'Sqoop',
|
||||||
link: '/en-us/docs/dev/user_doc/guide/task/sqoop.html',
|
link: '/en-us/docs/dev/user_doc/guide/task/sqoop.html',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'Pigeon',
|
||||||
|
link: '/en-us/docs/dev/user_doc/guide/task/pigeon.html',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'Conditions',
|
title: 'Conditions',
|
||||||
link: '/en-us/docs/dev/user_doc/guide/task/conditions.html',
|
link: '/en-us/docs/dev/user_doc/guide/task/conditions.html',
|
||||||
|
|
@ -428,6 +432,10 @@ export default {
|
||||||
title: 'File Manage',
|
title: 'File Manage',
|
||||||
link: '/en-us/docs/dev/user_doc/guide/resource/file-manage.html'
|
link: '/en-us/docs/dev/user_doc/guide/resource/file-manage.html'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'UDF Manage',
|
||||||
|
link: '/en-us/docs/dev/user_doc/guide/resource/udf-manage.html'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'Task Group Manage',
|
title: 'Task Group Manage',
|
||||||
link: '/en-us/docs/dev/user_doc/guide/resource/task-group.html'
|
link: '/en-us/docs/dev/user_doc/guide/resource/task-group.html'
|
||||||
|
|
@ -873,6 +881,10 @@ export default {
|
||||||
title: 'Sqoop',
|
title: 'Sqoop',
|
||||||
link: '/zh-cn/docs/dev/user_doc/guide/task/sqoop.html',
|
link: '/zh-cn/docs/dev/user_doc/guide/task/sqoop.html',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'Pigeon',
|
||||||
|
link: '/zh-cn/docs/dev/user_doc/guide/task/pigeon.html',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'Conditions',
|
title: 'Conditions',
|
||||||
link: '/zh-cn/docs/dev/user_doc/guide/task/conditions.html',
|
link: '/zh-cn/docs/dev/user_doc/guide/task/conditions.html',
|
||||||
|
|
@ -1141,6 +1153,10 @@ export default {
|
||||||
title: '文件管理',
|
title: '文件管理',
|
||||||
link: '/zh-cn/docs/dev/user_doc/guide/resource/file-manage.html'
|
link: '/zh-cn/docs/dev/user_doc/guide/resource/file-manage.html'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'UDF 管理',
|
||||||
|
link: '/zh-cn/docs/dev/user_doc/guide/resource/udf-manage.html'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '任务组管理',
|
title: '任务组管理',
|
||||||
link: '/zh-cn/docs/dev/user_doc/guide/resource/task-group.html'
|
link: '/zh-cn/docs/dev/user_doc/guide/resource/task-group.html'
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,8 @@ see sql files in `dolphinscheduler/dolphinscheduler-dao/src/main/resources/sql`
|
||||||
|
|
||||||
- User can have multiple projects, user project authorization completes the relationship binding using `project_id` and `user_id` in `t_ds_relation_project_user` table.
|
- User can have multiple projects, user project authorization completes the relationship binding using `project_id` and `user_id` in `t_ds_relation_project_user` table.
|
||||||
- The `user_id` in the `t_ds_projcet` table represents the user who create the project, and the `user_id` in the `t_ds_relation_project_user` table represents users who have permission to the project.
|
- The `user_id` in the `t_ds_projcet` table represents the user who create the project, and the `user_id` in the `t_ds_relation_project_user` table represents users who have permission to the project.
|
||||||
|
- The `user_id` in the `t_ds_resources` table represents the user who create the resource, and the `user_id` in `t_ds_relation_resources_user` represents the user who has permissions to the resource.
|
||||||
|
- The `user_id` in the `t_ds_udfs` table represents the user who create the UDF, and the `user_id` in the `t_ds_relation_udfs_user` table represents a user who has permission to the UDF.
|
||||||
|
|
||||||
### Project - Tenant - ProcessDefinition - Schedule
|
### Project - Tenant - ProcessDefinition - Schedule
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -146,6 +146,7 @@ No.|parameter name||type|description |note
|
||||||
5| |type |String |database type
|
5| |type |String |database type
|
||||||
6| |datasource |Int |datasource id
|
6| |datasource |Int |datasource id
|
||||||
7| |sql |String |query SQL statement
|
7| |sql |String |query SQL statement
|
||||||
|
8| |udfs | String| udf functions|specify UDF function ids, separate by comma
|
||||||
9| |sqlType | String| SQL node type |0 for query and 1 for none-query SQL
|
9| |sqlType | String| SQL node type |0 for query and 1 for none-query SQL
|
||||||
10| |title |String | mail title
|
10| |title |String | mail title
|
||||||
11| |receivers |String |receivers
|
11| |receivers |String |receivers
|
||||||
|
|
@ -179,6 +180,7 @@ No.|parameter name||type|description |note
|
||||||
"type":"MYSQL",
|
"type":"MYSQL",
|
||||||
"datasource":1,
|
"datasource":1,
|
||||||
"sql":"select id , namge , age from emp where id = ${id}",
|
"sql":"select id , namge , age from emp where id = ${id}",
|
||||||
|
"udfs":"",
|
||||||
"sqlType":"0",
|
"sqlType":"0",
|
||||||
"title":"xxxx@xxx.com",
|
"title":"xxxx@xxx.com",
|
||||||
"receivers":"xxxx@xxx.com",
|
"receivers":"xxxx@xxx.com",
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,9 @@ Resource Management => `http://localhost:8888/#/resource/file`
|
||||||
|
|
||||||
```
|
```
|
||||||
| File Management
|
| File Management
|
||||||
|
| udf Management
|
||||||
|
- Resource Management
|
||||||
|
- Function management
|
||||||
```
|
```
|
||||||
|
|
||||||
Data Source Management => `http://localhost:8888/#/datasource/list`
|
Data Source Management => `http://localhost:8888/#/datasource/list`
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ The corresponding relationship between `Pull Request Type` and `Issue Type` is a
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center;">Bug</td>
|
<td style="text-align: center;">Bug</td>
|
||||||
<td style="text-align: center;">Fix</td>
|
<td style="text-align: center;">Fix</td>
|
||||||
<td style="text-align: center;">[Fix-3333][ui] Fix xxx</td>
|
<td style="text-align: center;">[Fix-3333][server] Fix xxx</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center;">Improvement</td>
|
<td style="text-align: center;">Improvement</td>
|
||||||
|
|
@ -44,24 +44,9 @@ The corresponding relationship between `Pull Request Type` and `Issue Type` is a
|
||||||
<td style="text-align: center;">[Test-3333][api] Add the e2e test of xxx</td>
|
<td style="text-align: center;">[Test-3333][api] Add the e2e test of xxx</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center;">Doc</td>
|
<td style="text-align: center;">Sub-Task</td>
|
||||||
<td style="text-align: center;">Doc</td>
|
<td style="text-align: center;">(Parent type corresponding to Sub-Task)</td>
|
||||||
<td style="text-align: center;">[Doc-3333] Improve xxx</td>
|
<td style="text-align: center;">[Feature-3333][server] Implement xxx</td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="text-align: center;">E2E</td>
|
|
||||||
<td style="text-align: center;">E2E</td>
|
|
||||||
<td style="text-align: center;">[E2E-3333] Implement xxx</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="text-align: center;">CI</td>
|
|
||||||
<td style="text-align: center;">CI</td>
|
|
||||||
<td style="text-align: center;">[CI] Improve xxx</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="text-align: center;">Chore</td>
|
|
||||||
<td style="text-align: center;">Chore</td>
|
|
||||||
<td style="text-align: center;">[Chore] Improve xxx</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,21 @@ Configure all the configurations refer to [pseudo-cluster deployment](pseudo-clu
|
||||||
|
|
||||||
### Modify Configuration
|
### Modify Configuration
|
||||||
|
|
||||||
This step differs quite a lot from [pseudo-cluster deployment](pseudo-cluster.md), please use `scp` or other methods to distribute the configuration files to each machine, then modify the configuration files.
|
This step differs quite a lot from [pseudo-cluster deployment](pseudo-cluster.md), because the deployment script transfers the required resources for installation to each deployment machine by using `scp`. So we only need to modify the configuration of the machine that runs `install.sh` script and configurations will dispatch to cluster by `scp`. The configuration file is under the path `bin/env/install_env.sh`, here we only need to modify section **INSTALL MACHINE**, **DolphinScheduler ENV, Database, Registry Server** and keep other sections the same as [pseudo-cluster deployment](pseudo-cluster.md), the following describes the parameters that must be modified:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# INSTALL MACHINE
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# Using IP or machine hostname for the server going to deploy master, worker, API server, the IP of the server
|
||||||
|
# If you using a hostname, make sure machines could connect each other by hostname
|
||||||
|
# As below, the hostname of the machine deploying DolphinScheduler is ds1, ds2, ds3, ds4, ds5, where ds1, ds2 install the master server, ds3, ds4, and ds5 installs worker server, the alert server is installed in ds4, and the API server is installed in ds5
|
||||||
|
ips="ds1,ds2,ds3,ds4,ds5"
|
||||||
|
masters="ds1,ds2"
|
||||||
|
workers="ds3:default,ds4:default,ds5:default"
|
||||||
|
alertServer="ds4"
|
||||||
|
apiServers="ds5"
|
||||||
|
```
|
||||||
|
|
||||||
## Start and Login DolphinScheduler
|
## Start and Login DolphinScheduler
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,31 @@ Go to the ZooKeeper installation directory, copy configure file `zoo_sample.cfg`
|
||||||
## Modify Configuration
|
## Modify Configuration
|
||||||
|
|
||||||
After completing the preparation of the basic environment, you need to modify the configuration file according to the
|
After completing the preparation of the basic environment, you need to modify the configuration file according to the
|
||||||
environment you used. Change the environment configurations via `export <ENV_NAME>=<VALUE>`. The configuration files are located in directory `bin/env` as `dolphinscheduler_env.sh`.
|
environment you used. Change the environment configurations via `export <ENV_NAME>=<VALUE>`. The configuration files are located in directory `bin/env` as `install_env.sh` and `dolphinscheduler_env.sh`.
|
||||||
|
|
||||||
|
### Modify `install_env.sh`
|
||||||
|
|
||||||
|
File `install_env.sh` describes which machines will be installed DolphinScheduler and what server will be installed on
|
||||||
|
each machine. You could find this file in the path `bin/env/install_env.sh` and the detail of the configuration as below.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# INSTALL MACHINE
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# Due to the master, worker, and API server being deployed on a single node, the IP of the server is the machine IP or localhost
|
||||||
|
ips="localhost"
|
||||||
|
sshPort="22"
|
||||||
|
masters="localhost"
|
||||||
|
workers="localhost:default"
|
||||||
|
alertServer="localhost"
|
||||||
|
apiServers="localhost"
|
||||||
|
|
||||||
|
# DolphinScheduler installation path, it will auto-create if not exists
|
||||||
|
installPath=~/dolphinscheduler
|
||||||
|
|
||||||
|
# Deploy user, use the user you create in section **Configure machine SSH password-free login**
|
||||||
|
deployUser="dolphinscheduler"
|
||||||
|
```
|
||||||
|
|
||||||
### Modify `dolphinscheduler_env.sh`
|
### Modify `dolphinscheduler_env.sh`
|
||||||
|
|
||||||
|
|
@ -122,7 +146,11 @@ Follow the instructions in [datasource-setting](../howto/datasource-setting.md)
|
||||||
|
|
||||||
## Start DolphinScheduler
|
## Start DolphinScheduler
|
||||||
|
|
||||||
Use **deployment user** you created above, running the command to complete the deployment, and the server log will be stored in the logs folder.
|
Use **deployment user** you created above, running the following command to complete the deployment, and the server log will be stored in the logs folder.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
bash ./bin/install.sh
|
||||||
|
```
|
||||||
|
|
||||||
> **_Note:_** For the first time deployment, there maybe occur five times of `sh: bin/dolphinscheduler-daemon.sh: No such file or directory` in the terminal,
|
> **_Note:_** For the first time deployment, there maybe occur five times of `sh: bin/dolphinscheduler-daemon.sh: No such file or directory` in the terminal,
|
||||||
> this is non-important information that you can ignore.
|
> this is non-important information that you can ignore.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Resource Center Configuration
|
# Resource Center Configuration
|
||||||
|
|
||||||
- You could use `Resource Center` to upload text files and other task-related files.
|
- You could use `Resource Center` to upload text files, UDFs and other task-related files.
|
||||||
- You could configure `Resource Center` to use distributed file system like [Hadoop](https://hadoop.apache.org/docs/r2.7.0/) (2.6+), [MinIO](https://github.com/minio/minio) cluster or remote storage products like [AWS S3](https://aws.amazon.com/s3/), [Alibaba Cloud OSS](https://www.aliyun.com/product/oss), [Huawei Cloud OBS](https://support.huaweicloud.com/obs/index.html) etc.
|
- You could configure `Resource Center` to use distributed file system like [Hadoop](https://hadoop.apache.org/docs/r2.7.0/) (2.6+), [MinIO](https://github.com/minio/minio) cluster or remote storage products like [AWS S3](https://aws.amazon.com/s3/), [Alibaba Cloud OSS](https://www.aliyun.com/product/oss), [Huawei Cloud OBS](https://support.huaweicloud.com/obs/index.html) etc.
|
||||||
- You could configure `Resource Center` to use local file system. If you deploy `DolphinScheduler` in `Standalone` mode, you could configure it to use local file system for `Resource Center` without the need of an external `HDFS` system or `S3`.
|
- You could configure `Resource Center` to use local file system. If you deploy `DolphinScheduler` in `Standalone` mode, you could configure it to use local file system for `Resource Center` without the need of an external `HDFS` system or `S3`.
|
||||||
- Furthermore, if you deploy `DolphinScheduler` in `Cluster` mode, you could use [S3FS-FUSE](https://github.com/s3fs-fuse/s3fs-fuse) to mount `S3` or [JINDO-FUSE](https://help.aliyun.com/document_detail/187410.html) to mount `OSS` to your machines and use the local file system for `Resource Center`. In this way, you could operate remote files as if on your local machines.
|
- Furthermore, if you deploy `DolphinScheduler` in `Cluster` mode, you could use [S3FS-FUSE](https://github.com/s3fs-fuse/s3fs-fuse) to mount `S3` or [JINDO-FUSE](https://help.aliyun.com/document_detail/187410.html) to mount `OSS` to your machines and use the local file system for `Resource Center`. In this way, you could operate remote files as if on your local machines.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# Resource Center Introduction
|
# Resource Center Introduction
|
||||||
|
|
||||||
The Resource Center is typically used for uploading files and task group management. For a stand-alone
|
The Resource Center is typically used for uploading files, UDF functions, and task group management. For a stand-alone
|
||||||
environment, you can select the local file directory as the upload folder (**this operation does not require Hadoop or HDFS deployment**).
|
environment, you can select the local file directory as the upload folder (**this operation does not require Hadoop or HDFS deployment**).
|
||||||
Of course, you can also choose to upload to Hadoop or MinIO cluster. In this case, you need to have Hadoop (2.6+) or MinIO and other related environments.
|
Of course, you can also choose to upload to Hadoop or MinIO cluster. In this case, you need to have Hadoop (2.6+) or MinIO and other related environments.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
# UDF Manage
|
||||||
|
|
||||||
|
## Resource Management
|
||||||
|
|
||||||
|
- The resource management and file management functions are similar. The difference is that the resource management is the UDF upload function, and the file management uploads the user programs, scripts and configuration files.
|
||||||
|
- It mainly includes the following operations: rename, download, delete, etc.
|
||||||
|
- Upload UDF resources: Same as uploading files.
|
||||||
|
|
||||||
|
## Function Management
|
||||||
|
|
||||||
|
### Create UDF function
|
||||||
|
|
||||||
|
Click `Create UDF Function`, enter the UDF function parameters, select the UDF resource, and click `Submit` to create the UDF function.
|
||||||
|
Currently only temporary UDF functions for HIVE are supported.
|
||||||
|
|
||||||
|
- UDF function name: Enter the name of the UDF function.
|
||||||
|
- Package name Class name: Enter the full path of the UDF function.
|
||||||
|
- UDF resource: Set the resource file corresponding to the created UDF function.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
### Write UDF functions
|
||||||
|
|
||||||
|
Users can customize the desired UDF function according to actual production requirements. Here's a function that appends "HelloWorld" to the end of any string. As shown below:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Configure the UDF function
|
||||||
|
|
||||||
|
Before configuring UDF functions, you need to upload the required function jar package through resource management. Then enter the function management and configure the relevant information. As shown below:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Use UDF functions
|
||||||
|
|
||||||
|
In the process of using UDF functions, users only need to pay attention to the specific function writing, and upload the configuration through the resource center. The system will automatically configure the create function statement, refer to the following: [SqlTask](https://github.com/apache/dolphinscheduler/blob/923f3f38e3271d7f1d22b3abc3497cecb6957e4a/dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java#L507-L531)
|
||||||
|
|
||||||
|
Enter the workflow to define an SQL node, the data source type is HIVE, and the data source instance type is HIVE/IMPALA.
|
||||||
|
|
||||||
|
- SQL statement: `select HwUdf("abc");` This function is used in the same way as the built-in functions, and can be accessed directly using the function name.
|
||||||
|
- UDF function: Select the one configured for the resource center.
|
||||||
|
|
||||||
|

|
||||||
|
|
@ -103,8 +103,8 @@ public void doPOSTParam()throws Exception{
|
||||||
|
|
||||||
## Granted Permissions
|
## Granted Permissions
|
||||||
|
|
||||||
* Granted permissions include project permissions, resource permissions, data source permissions.
|
* Granted permissions include project permissions, resource permissions, data source permissions, and UDF function permissions.
|
||||||
* Administrators can authorize projects, resources, data sources that ordinary users do not create. Because the authorization methods of projects, resources, data sources are all the same, the project authorization is used as an example to introduce.
|
* Administrators can authorize projects, resources, data sources, and UDF functions that ordinary users do not create. Because the authorization methods of projects, resources, data sources and UDF functions are all the same, the project authorization is used as an example to introduce.
|
||||||
* Note: For projects created by the user, the user has all permissions. Therefore, permission changes to projects created by users themselves are not valid.
|
* Note: For projects created by the user, the user has all permissions. Therefore, permission changes to projects created by users themselves are not valid.
|
||||||
- The administrator enters the `Security Center -> User Management` page, and clicks the "Authorize" button of the user to be authorized, as shown in the following figure:
|
- The administrator enters the `Security Center -> User Management` page, and clicks the "Authorize" button of the user to be authorized, as shown in the following figure:
|
||||||
|
|
||||||
|
|
@ -118,7 +118,7 @@ public void doPOSTParam()throws Exception{
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- Resources, data sources authorization are the same as project authorization.
|
- Resources, data sources, and UDF function authorization are the same as project authorization.
|
||||||
|
|
||||||
## Worker Grouping
|
## Worker Grouping
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
# Pigeon
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
Pigeon is a task used to trigger remote tasks, acquire logs or status by calling remote WebSocket service. It is DolphinScheduler uses a remote WebSocket service to call tasks.
|
||||||
|
|
||||||
|
## Create Task
|
||||||
|
|
||||||
|
- Click `Project Management -> Project Name -> Workflow Definition`, and click the `Create Workflow` button to enter the DAG editing page.
|
||||||
|
- Drag from the toolbar <img src="../../../../img/pigeon.png" width="20"/> to the canvas to create a new Pigeon task.
|
||||||
|
|
||||||
|
## Task Parameters
|
||||||
|
|
||||||
|
[//]: # (TODO: use the commented anchor below once our website template supports this syntax)
|
||||||
|
[//]: # (- Please refer to [DolphinScheduler Task Parameters Appendix](appendix.md#default-task-parameters) `Default Task Parameters` section for default parameters.)
|
||||||
|
|
||||||
|
- Please refer to [DolphinScheduler Task Parameters Appendix](appendix.md) `Default Task Parameters` section for default parameters.
|
||||||
|
|
||||||
|
| **Parameter** | **Description** |
|
||||||
|
|------------------|---------------------------------------|
|
||||||
|
| Target task name | Target task name of this Pigeon node. |
|
||||||
|
|
||||||
|
|
@ -21,11 +21,12 @@ Refer to [datasource-setting](../howto/datasource-setting.md) `DataSource Center
|
||||||
- Please refer to [DolphinScheduler Task Parameters Appendix](appendix.md) `Default Task Parameters` section for default parameters.
|
- Please refer to [DolphinScheduler Task Parameters Appendix](appendix.md) `Default Task Parameters` section for default parameters.
|
||||||
|
|
||||||
| **Parameter** | **Description** |
|
| **Parameter** | **Description** |
|
||||||
|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
|
|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| Data source | Select the corresponding DataSource. |
|
| Data source | Select the corresponding DataSource. |
|
||||||
| SQL type | Supports query and non-query. <ul><li>Query: supports `DML select` type commands, which return a result set. You can specify three templates for email notification as form, attachment or form attachment;</li><li>Non-query: support `DDL` all commands and `DML update, delete, insert` three types of commands;<ul><li>Segmented execution symbol: When the data source does not support executing multiple SQL statements at a time, the symbol for splitting SQL statements is provided to call the data source execution method multiple times. Example: 1. When the Hive data source is selected as the data source, please do not use `;\n` due to Hive JDBC does not support executing multiple SQL statements at one time; 2. When the MySQL data source is selected as the data source, and multi-segment SQL statements are to be executed, this parameter needs to be filled in with a semicolon `;. Because the MySQL data source does not support executing multiple SQL statements at one time.</li></ul></li></ul> |
|
| SQL type | Supports query and non-query. <ul><li>Query: supports `DML select` type commands, which return a result set. You can specify three templates for email notification as form, attachment or form attachment;</li><li>Non-query: support `DDL` all commands and `DML update, delete, insert` three types of commands;<ul><li>Segmented execution symbol: When the data source does not support executing multiple SQL statements at a time, the symbol for splitting SQL statements is provided to call the data source execution method multiple times. Example: 1. When the Hive data source is selected as the data source, please do not use `;\n` due to Hive JDBC does not support executing multiple SQL statements at one time; 2. When the MySQL data source is selected as the data source, and multi-segment SQL statements are to be executed, this parameter needs to be filled in with a semicolon `;. Because the MySQL data source does not support executing multiple SQL statements at one time.</li></ul></li></ul> |
|
||||||
| SQL parameter | The input parameter format is `key1=value1;key2=value2...`. |
|
| SQL parameter | The input parameter format is `key1=value1;key2=value2...`. |
|
||||||
| SQL statement | SQL statement. | |
|
| SQL statement | SQL statement. |
|
||||||
|
| UDF function | For Hive DataSources, you can refer to UDF functions created in the resource center, but other DataSource do not support UDF functions. |
|
||||||
| Custom parameters | SQL task type, and stored procedure is a custom parameter order, to set customized parameter type and data type for the method is the same as the stored procedure task type. The difference is that the custom parameter of the SQL task type replaces the `${variable}` in the SQL statement. |
|
| Custom parameters | SQL task type, and stored procedure is a custom parameter order, to set customized parameter type and data type for the method is the same as the stored procedure task type. The difference is that the custom parameter of the SQL task type replaces the `${variable}` in the SQL statement. |
|
||||||
| Pre-SQL | Pre-SQL executes before the SQL statement. |
|
| Pre-SQL | Pre-SQL executes before the SQL statement. |
|
||||||
| Post-SQL | Post-SQL executes after the SQL statement. |
|
| Post-SQL | Post-SQL executes after the SQL statement. |
|
||||||
|
|
@ -56,3 +57,5 @@ Table created in the Pre-SQL, after use in the SQL statement, cleaned in the Pos
|
||||||
## Note
|
## Note
|
||||||
|
|
||||||
Pay attention to the selection of SQL type. If it is an insert operation, need to change to "Non-Query" type.
|
Pay attention to the selection of SQL type. If it is an insert operation, need to change to "Non-Query" type.
|
||||||
|
|
||||||
|
To compatible with long session,UDF function are created by the syntax(CREATE OR REPLACE)
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,3 @@ This document records the incompatible updates between each version. You need to
|
||||||
|
|
||||||
* Add required field `database` in /datasources/tables && /datasources/tableColumns Api [#14406](https://github.com/apache/dolphinscheduler/pull/14406)
|
* Add required field `database` in /datasources/tables && /datasources/tableColumns Api [#14406](https://github.com/apache/dolphinscheduler/pull/14406)
|
||||||
|
|
||||||
## 3.3.0
|
|
||||||
|
|
||||||
* Remove the `udf-manage` function from the `resource center` ([#16209])
|
|
||||||
* Remove the `Pigeon` from the `Task Plugin` ([#16218])
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
- 一个用户可以有多个项目,用户项目授权通过`t_ds_relation_project_user`表完成project_id和user_id的关系绑定;<br />
|
- 一个用户可以有多个项目,用户项目授权通过`t_ds_relation_project_user`表完成project_id和user_id的关系绑定;<br />
|
||||||
- `t_ds_projcet`表中的`user_id`表示创建该项目的用户,`t_ds_relation_project_user`表中的`user_id`表示对项目有权限的用户;<br />
|
- `t_ds_projcet`表中的`user_id`表示创建该项目的用户,`t_ds_relation_project_user`表中的`user_id`表示对项目有权限的用户;<br />
|
||||||
|
- `t_ds_resources`表中的`user_id`表示创建该资源的用户,`t_ds_relation_resources_user`中的`user_id`表示对资源有权限的用户;<br />
|
||||||
|
- `t_ds_udfs`表中的`user_id`表示创建该UDF的用户,`t_ds_relation_udfs_user`表中的`user_id`表示对UDF有权限的用户;<br />
|
||||||
|
|
||||||
### 项目 - 租户 - 工作流定义 - 定时
|
### 项目 - 租户 - 工作流定义 - 定时
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,7 @@
|
||||||
5| |type |String | 数据库类型
|
5| |type |String | 数据库类型
|
||||||
6| |datasource |Int | 数据源id
|
6| |datasource |Int | 数据源id
|
||||||
7| |sql |String | 查询SQL语句
|
7| |sql |String | 查询SQL语句
|
||||||
|
8| |udfs | String| udf函数|UDF函数id,以逗号分隔.
|
||||||
9| |sqlType | String| SQL节点类型 |0 查询 , 1 非查询
|
9| |sqlType | String| SQL节点类型 |0 查询 , 1 非查询
|
||||||
10| |title |String | 邮件标题
|
10| |title |String | 邮件标题
|
||||||
11| |receivers |String | 收件人
|
11| |receivers |String | 收件人
|
||||||
|
|
@ -178,6 +179,7 @@
|
||||||
"type":"MYSQL",
|
"type":"MYSQL",
|
||||||
"datasource":1,
|
"datasource":1,
|
||||||
"sql":"select id , namge , age from emp where id = ${id}",
|
"sql":"select id , namge , age from emp where id = ${id}",
|
||||||
|
"udfs":"",
|
||||||
"sqlType":"0",
|
"sqlType":"0",
|
||||||
"title":"xxxx@xxx.com",
|
"title":"xxxx@xxx.com",
|
||||||
"receivers":"xxxx@xxx.com",
|
"receivers":"xxxx@xxx.com",
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,9 @@ npm install node-sass --unsafe-perm #单独安装node-sass依赖
|
||||||
|
|
||||||
```
|
```
|
||||||
| 文件管理
|
| 文件管理
|
||||||
|
| UDF管理
|
||||||
|
- 资源管理
|
||||||
|
- 函数管理
|
||||||
```
|
```
|
||||||
|
|
||||||
数据源管理 => `http://localhost:8888/#/datasource/list`
|
数据源管理 => `http://localhost:8888/#/datasource/list`
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ waste time。
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center;">Bug</td>
|
<td style="text-align: center;">Bug</td>
|
||||||
<td style="text-align: center;">Fix</td>
|
<td style="text-align: center;">Fix</td>
|
||||||
<td style="text-align: center;">[Fix-3333][ui] Fix xxx</td>
|
<td style="text-align: center;">[Fix-3333][server] Fix xxx</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center;">Improvement</td>
|
<td style="text-align: center;">Improvement</td>
|
||||||
|
|
@ -46,23 +46,9 @@ waste time。
|
||||||
<td style="text-align: center;">[Test-3333][api] Add the e2e test of xxx</td>
|
<td style="text-align: center;">[Test-3333][api] Add the e2e test of xxx</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center;">Doc</td>
|
<td style="text-align: center;">Sub-Task</td>
|
||||||
<td style="text-align: center;">Doc</td>
|
<td style="text-align: center;">Sub-Task 对应的父类型</td>
|
||||||
<td style="text-align: center;">[Doc-3333] Improve xxx</td>
|
<td style="text-align: center;">[Feature-3333][server] Implement xxx</td>
|
||||||
<tr>
|
|
||||||
<td style="text-align: center;">E2E</td>
|
|
||||||
<td style="text-align: center;">E2E</td>
|
|
||||||
<td style="text-align: center;">[E2E-3333] Implement xxx</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="text-align: center;">CI</td>
|
|
||||||
<td style="text-align: center;">CI</td>
|
|
||||||
<td style="text-align: center;">[CI] Improve xxx</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="text-align: center;">Chore</td>
|
|
||||||
<td style="text-align: center;">Chore</td>
|
|
||||||
<td style="text-align: center;">[Chore] Improve xxx</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,21 @@
|
||||||
|
|
||||||
### 修改相关配置
|
### 修改相关配置
|
||||||
|
|
||||||
这个是与[伪集群部署](pseudo-cluster.md)差异较大的一步,请使用 scp 等方式将配置文件分发到各台机器上,然后修改配置文件
|
这个是与[伪集群部署](pseudo-cluster.md)差异较大的一步,因为部署脚本会通过 `scp` 的方式将安装需要的资源传输到各个机器上,所以这一步我们仅需要修改运行`install.sh`脚本的所在机器的配置即可。配置文件在路径在`bin/env/install_env.sh`下,此处我们仅需修改**INSTALL MACHINE**,**DolphinScheduler ENV、Database、Registry Server**与伪集群部署保持一致,下面对必须修改参数进行说明
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# INSTALL MACHINE
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# 需要配置master、worker、API server,所在服务器的IP均为机器IP或者localhost
|
||||||
|
# 如果是配置hostname的话,需要保证机器间可以通过hostname相互链接
|
||||||
|
# 如下图所示,部署 DolphinScheduler 机器的 hostname 为 ds1,ds2,ds3,ds4,ds5,其中 ds1,ds2 安装 master 服务,ds3,ds4,ds5安装 worker 服务,alert server安装在ds4中,api server 安装在ds5中
|
||||||
|
ips="ds1,ds2,ds3,ds4,ds5"
|
||||||
|
masters="ds1,ds2"
|
||||||
|
workers="ds3:default,ds4:default,ds5:default"
|
||||||
|
alertServer="ds4"
|
||||||
|
apiServers="ds5"
|
||||||
|
```
|
||||||
|
|
||||||
## 启动 DolphinScheduler && 登录 DolphinScheduler && 启停服务
|
## 启动 DolphinScheduler && 登录 DolphinScheduler && 启停服务
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,30 @@ chmod 600 ~/.ssh/authorized_keys
|
||||||
|
|
||||||
## 修改相关配置
|
## 修改相关配置
|
||||||
|
|
||||||
完成基础环境的准备后,需要根据你的机器环境修改配置文件。配置文件可以在目录 `bin/env/dolphinscheduler_env.sh` 中找到。
|
完成基础环境的准备后,需要根据你的机器环境修改配置文件。配置文件可以在目录 `bin/env` 中找到,他们分别是 并命名为 `install_env.sh` 和 `dolphinscheduler_env.sh`。
|
||||||
|
|
||||||
|
### 修改 `install_env.sh` 文件
|
||||||
|
|
||||||
|
文件 `install_env.sh` 描述了哪些机器将被安装 DolphinScheduler 以及每台机器对应安装哪些服务。您可以在路径 `bin/env/install_env.sh` 中找到此文件,可通过以下方式更改 env 变量,export <ENV_NAME>=<VALUE>,配置详情如下。
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# INSTALL MACHINE
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# Due to the master, worker, and API server being deployed on a single node, the IP of the server is the machine IP or localhost
|
||||||
|
ips="localhost"
|
||||||
|
sshPort="22"
|
||||||
|
masters="localhost"
|
||||||
|
workers="localhost:default"
|
||||||
|
alertServer="localhost"
|
||||||
|
apiServers="localhost"
|
||||||
|
|
||||||
|
# DolphinScheduler installation path, it will auto-create if not exists
|
||||||
|
installPath=~/dolphinscheduler
|
||||||
|
|
||||||
|
# Deploy user, use the user you create in section **Configure machine SSH password-free login**
|
||||||
|
deployUser="dolphinscheduler"
|
||||||
|
```
|
||||||
|
|
||||||
### 修改 `dolphinscheduler_env.sh` 文件
|
### 修改 `dolphinscheduler_env.sh` 文件
|
||||||
|
|
||||||
|
|
@ -118,7 +141,11 @@ export PATH=$HADOOP_HOME/bin:$SPARK_HOME/bin:$PYTHON_LAUNCHER:$JAVA_HOME/bin:$HI
|
||||||
|
|
||||||
## 启动 DolphinScheduler
|
## 启动 DolphinScheduler
|
||||||
|
|
||||||
使用上面创建的**部署用户**运行命令完成部署,部署后的运行日志将存放在 logs 文件夹内
|
使用上面创建的**部署用户**运行以下命令完成部署,部署后的运行日志将存放在 logs 文件夹内
|
||||||
|
|
||||||
|
```shell
|
||||||
|
bash ./bin/install.sh
|
||||||
|
```
|
||||||
|
|
||||||
> **_注意:_** 第一次部署的话,可能出现 5 次`sh: bin/dolphinscheduler-daemon.sh: No such file or directory`相关信息,此为非重要信息直接忽略即可
|
> **_注意:_** 第一次部署的话,可能出现 5 次`sh: bin/dolphinscheduler-daemon.sh: No such file or directory`相关信息,此为非重要信息直接忽略即可
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# 资源中心配置详情
|
# 资源中心配置详情
|
||||||
|
|
||||||
- 资源中心通常用于上传文件以及任务组管理等操作。
|
- 资源中心通常用于上传文件、UDF 函数,以及任务组管理等操作。
|
||||||
- 资源中心可以对接分布式的文件存储系统,如[Hadoop](https://hadoop.apache.org/docs/r2.7.0/)(2.6+)或者[MinIO](https://github.com/minio/minio)集群,也可以对接远端的对象存储,如[AWS S3](https://aws.amazon.com/s3/)或者[阿里云 OSS](https://www.aliyun.com/product/oss),[华为云 OBS](https://support.huaweicloud.com/obs/index.html) 等。
|
- 资源中心可以对接分布式的文件存储系统,如[Hadoop](https://hadoop.apache.org/docs/r2.7.0/)(2.6+)或者[MinIO](https://github.com/minio/minio)集群,也可以对接远端的对象存储,如[AWS S3](https://aws.amazon.com/s3/)或者[阿里云 OSS](https://www.aliyun.com/product/oss),[华为云 OBS](https://support.huaweicloud.com/obs/index.html) 等。
|
||||||
- 资源中心也可以直接对接本地文件系统。在单机模式下,您无需依赖`Hadoop`或`S3`一类的外部存储系统,可以方便地对接本地文件系统进行体验。
|
- 资源中心也可以直接对接本地文件系统。在单机模式下,您无需依赖`Hadoop`或`S3`一类的外部存储系统,可以方便地对接本地文件系统进行体验。
|
||||||
- 除此之外,对于集群模式下的部署,您可以通过使用[S3FS-FUSE](https://github.com/s3fs-fuse/s3fs-fuse)将`S3`挂载到本地,或者使用[JINDO-FUSE](https://help.aliyun.com/document_detail/187410.html)将`OSS`挂载到本地等,再用资源中心对接本地文件系统方式来操作远端对象存储中的文件。
|
- 除此之外,对于集群模式下的部署,您可以通过使用[S3FS-FUSE](https://github.com/s3fs-fuse/s3fs-fuse)将`S3`挂载到本地,或者使用[JINDO-FUSE](https://help.aliyun.com/document_detail/187410.html)将`OSS`挂载到本地等,再用资源中心对接本地文件系统方式来操作远端对象存储中的文件。
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# 资源中心简介
|
# 资源中心简介
|
||||||
|
|
||||||
资源中心通常用于上传文件和任务组管理。 对于 standalone 环境,可以选择本地文件目录作为上传文件夹(此操作不需要Hadoop部署)。当然,你也可以
|
资源中心通常用于上传文件、UDF 函数和任务组管理。 对于 standalone 环境,可以选择本地文件目录作为上传文件夹(此操作不需要Hadoop部署)。当然,你也可以
|
||||||
选择上传到 Hadoop 或者 MinIO 集群。 在这种情况下,您需要有 Hadoop(2.6+)或 MinIO 等相关环境。
|
选择上传到 Hadoop 或者 MinIO 集群。 在这种情况下,您需要有 Hadoop(2.6+)或 MinIO 等相关环境。
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
# UDF 管理
|
||||||
|
|
||||||
|
- 资源管理和文件管理功能类似,不同之处是资源管理是上传的 UDF 函数,文件管理上传的是用户程序,脚本及配置文件。
|
||||||
|
- 主要包括以下操作:重命名、下载、删除等。
|
||||||
|
* 上传 UDF 资源
|
||||||
|
|
||||||
|
> 和上传文件相同。
|
||||||
|
|
||||||
|
## 函数管理
|
||||||
|
|
||||||
|
* 创建 UDF 函数
|
||||||
|
|
||||||
|
> 点击“创建 UDF 函数”,输入 UDF 函数参数,选择udf资源,点击“提交”,创建 UDF 函数。
|
||||||
|
> 目前只支持 HIVE 的临时 UDF 函数
|
||||||
|
|
||||||
|
- UDF 函数名称:输入 UDF 函数时的名称
|
||||||
|
- 包名类名:输入 UDF 函数的全路径
|
||||||
|
- UDF 资源:设置创建的 UDF 对应的资源文件
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 任务样例
|
||||||
|
|
||||||
|
### 编写 UDF 函数
|
||||||
|
|
||||||
|
用户可以根据实际生产需求,自定义想要的 UDF 函数。这里编写一个在任意字符串的末尾添加 "HelloWorld" 的函数。如下图所示:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### 配置 UDF 函数
|
||||||
|
|
||||||
|
配置 UDF 函数前,需要先通过资源管理上传所需的函数 jar 包。然后进入函数管理,配置相关信息即可。如下图所示:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### 使用 UDF 函数
|
||||||
|
|
||||||
|
在使用 UDF 函数过程中,用户只需关注具体的函数编写,通过资源中心上传配置完成即可。系统会自动配置 create function 语句,参考如下:[SqlTask](https://github.com/apache/dolphinscheduler/blob/923f3f38e3271d7f1d22b3abc3497cecb6957e4a/dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java#L507-L531)
|
||||||
|
|
||||||
|
进入工作流定义一个 SQL 节点,数据源类型选择为 HIVE,数据源实例类型为 HIVE/IMPALA。
|
||||||
|
|
||||||
|
- SQL 语句:`select HwUdf("abc");` 该函数与内置函数使用方式一样,直接使用函数名称即可访问。
|
||||||
|
- UDF 函数:选择资源中心所配置的即可。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
@ -97,8 +97,8 @@
|
||||||
|
|
||||||
## 授予权限
|
## 授予权限
|
||||||
|
|
||||||
* 授予权限包括项目权限,数据源权限和k8s命名空间。
|
* 授予权限包括项目权限,资源权限,数据源权限,UDF函数权限,k8s命名空间。
|
||||||
* 管理员可以对普通用户进行非其创建的项目、数据源k8s命名空间。因为项目、数据源、k8s命名空间授权方式都是一样的,所以以项目授权为例介绍。
|
* 管理员可以对普通用户进行非其创建的项目、资源、数据源、UDF函数、k8s命名空间。因为项目、资源、数据源、UDF函数、k8s命名空间授权方式都是一样的,所以以项目授权为例介绍。
|
||||||
* 注意:对于用户自己创建的项目,该用户默认拥有所有的权限,因此对用户自己创建的项目进行权限变更是无效的。
|
* 注意:对于用户自己创建的项目,该用户默认拥有所有的权限,因此对用户自己创建的项目进行权限变更是无效的。
|
||||||
- 管理员进入`安全中心->用户管理页面`,点击需授权用户的“授权”按钮,如下图所示:
|
- 管理员进入`安全中心->用户管理页面`,点击需授权用户的“授权”按钮,如下图所示:
|
||||||
|
|
||||||
|
|
@ -112,7 +112,7 @@
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- 数据源授权同项目授权。
|
- 资源、数据源、UDF 函数授权同项目授权。
|
||||||
|
|
||||||
## Worker 分组
|
## Worker 分组
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Pigeon
|
||||||
|
|
||||||
|
Pigeon任务类型是通过调用远程websocket服务,实现远程任务的触发,状态、日志的获取,是 DolphinScheduler 通用远程 websocket 服务调用任务
|
||||||
|
|
||||||
|
## 创建任务
|
||||||
|
|
||||||
|
拖动工具栏中的<img src="../../../../img/pigeon.png" width="20"/>任务节点到画板中即能完成任务创建
|
||||||
|
|
||||||
|
## 任务参数
|
||||||
|
|
||||||
|
[//]: # (TODO: use the commented anchor below once our website template supports this syntax)
|
||||||
|
[//]: # (- 默认参数说明请参考[DolphinScheduler任务参数附录](appendix.md#默认任务参数)`默认任务参数`一栏。)
|
||||||
|
|
||||||
|
- 默认参数说明请参考[DolphinScheduler任务参数附录](appendix.md)`默认任务参数`一栏。
|
||||||
|
|
||||||
|
| **任务参数** | **描述** |
|
||||||
|
|----------|-------------------|
|
||||||
|
| 目标任务名 | 输入Pigeon任务的目标任务名称 |
|
||||||
|
|
||||||
|
|
@ -26,6 +26,7 @@ SQL任务类型,用于连接数据库并执行相应SQL。
|
||||||
- 默认采用`;\n`作为SQL分隔符,拆分成多段SQL语句执行。Hive的JDBC不支持一次执行多段SQL语句,请不要使用`;\n`。
|
- 默认采用`;\n`作为SQL分隔符,拆分成多段SQL语句执行。Hive的JDBC不支持一次执行多段SQL语句,请不要使用`;\n`。
|
||||||
- sql参数:输入参数格式为key1=value1;key2=value2…
|
- sql参数:输入参数格式为key1=value1;key2=value2…
|
||||||
- sql语句:SQL语句
|
- sql语句:SQL语句
|
||||||
|
- UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。
|
||||||
- 自定义参数:SQL任务类型,而存储过程是自定义参数顺序,给方法设置值自定义参数类型和数据类型,同存储过程任务类型一样。区别在于SQL任务类型自定义参数会替换sql语句中${变量}。
|
- 自定义参数:SQL任务类型,而存储过程是自定义参数顺序,给方法设置值自定义参数类型和数据类型,同存储过程任务类型一样。区别在于SQL任务类型自定义参数会替换sql语句中${变量}。
|
||||||
- 前置sql:前置sql在sql语句之前执行。
|
- 前置sql:前置sql在sql语句之前执行。
|
||||||
- 后置sql:后置sql在sql语句之后执行。
|
- 后置sql:后置sql在sql语句之后执行。
|
||||||
|
|
@ -56,4 +57,5 @@ SQL任务类型,用于连接数据库并执行相应SQL。
|
||||||
## 注意事项
|
## 注意事项
|
||||||
|
|
||||||
* 注意SQL类型的选择,如果是INSERT等操作需要选择非查询类型。
|
* 注意SQL类型的选择,如果是INSERT等操作需要选择非查询类型。
|
||||||
|
* 为了兼容长会话情况,UDF函数的创建是通过CREATE OR REPLACE语句
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,3 @@
|
||||||
|
|
||||||
* 在 /datasources/tables && /datasources/tableColumns 接口中添加了必选字段`database` [#14406](https://github.com/apache/dolphinscheduler/pull/14406)
|
* 在 /datasources/tables && /datasources/tableColumns 接口中添加了必选字段`database` [#14406](https://github.com/apache/dolphinscheduler/pull/14406)
|
||||||
|
|
||||||
## 3.3.0
|
|
||||||
|
|
||||||
* 从 `资源中心` 中移除了 `udf-manage` 功能 ([#16209])
|
|
||||||
* 从 `任务插件` 中移除了 `Pigeon` 类型 ([#16218])
|
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 132 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
|
|
@ -82,12 +82,12 @@ registry:
|
||||||
namespace: dolphinscheduler
|
namespace: dolphinscheduler
|
||||||
connect-string: localhost:2181
|
connect-string: localhost:2181
|
||||||
retry-policy:
|
retry-policy:
|
||||||
base-sleep-time: 1s
|
base-sleep-time: 60ms
|
||||||
max-sleep: 3s
|
max-sleep: 300ms
|
||||||
max-retries: 5
|
max-retries: 5
|
||||||
session-timeout: 60s
|
session-timeout: 30s
|
||||||
connection-timeout: 15s
|
connection-timeout: 9s
|
||||||
block-until-connected: 15s
|
block-until-connected: 600ms
|
||||||
digest: ~
|
digest: ~
|
||||||
|
|
||||||
metrics:
|
metrics:
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,17 @@ import org.apache.dolphinscheduler.common.enums.FailureStrategy;
|
||||||
import org.apache.dolphinscheduler.common.enums.ReleaseState;
|
import org.apache.dolphinscheduler.common.enums.ReleaseState;
|
||||||
import org.apache.dolphinscheduler.common.enums.UserType;
|
import org.apache.dolphinscheduler.common.enums.UserType;
|
||||||
import org.apache.dolphinscheduler.common.enums.WarningType;
|
import org.apache.dolphinscheduler.common.enums.WarningType;
|
||||||
|
import org.apache.dolphinscheduler.dao.entity.Project;
|
||||||
import org.apache.dolphinscheduler.dao.entity.User;
|
import org.apache.dolphinscheduler.dao.entity.User;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.AfterAll;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
|
import org.junit.jupiter.api.Order;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.http.util.EntityUtils;
|
||||||
|
|
||||||
|
|
@ -42,14 +51,6 @@ import java.util.Date;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.AfterAll;
|
|
||||||
import org.junit.jupiter.api.Assertions;
|
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
|
||||||
import org.junit.jupiter.api.Order;
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
|
|
||||||
//TODO: Some test cases rely on ProcessInstance APIs. Should complete remaining cases after ProcessInstance related API tests done.
|
//TODO: Some test cases rely on ProcessInstance APIs. Should complete remaining cases after ProcessInstance related API tests done.
|
||||||
@DolphinScheduler(composeFiles = "docker/basic/docker-compose.yaml")
|
@DolphinScheduler(composeFiles = "docker/basic/docker-compose.yaml")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|
@ -79,8 +80,7 @@ public class ExecutorAPITest {
|
||||||
public static void setup() {
|
public static void setup() {
|
||||||
LoginPage loginPage = new LoginPage();
|
LoginPage loginPage = new LoginPage();
|
||||||
HttpResponse loginHttpResponse = loginPage.login(username, password);
|
HttpResponse loginHttpResponse = loginPage.login(username, password);
|
||||||
sessionId =
|
sessionId = JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId();
|
||||||
JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId();
|
|
||||||
executorPage = new ExecutorPage(sessionId);
|
executorPage = new ExecutorPage(sessionId);
|
||||||
processDefinitionPage = new ProcessDefinitionPage(sessionId);
|
processDefinitionPage = new ProcessDefinitionPage(sessionId);
|
||||||
projectPage = new ProjectPage(sessionId);
|
projectPage = new ProjectPage(sessionId);
|
||||||
|
|
@ -103,30 +103,24 @@ public class ExecutorAPITest {
|
||||||
HttpResponse createProjectResponse = projectPage.createProject(loginUser, "project-test");
|
HttpResponse createProjectResponse = projectPage.createProject(loginUser, "project-test");
|
||||||
HttpResponse queryAllProjectListResponse = projectPage.queryAllProjectList(loginUser);
|
HttpResponse queryAllProjectListResponse = projectPage.queryAllProjectList(loginUser);
|
||||||
Assertions.assertTrue(queryAllProjectListResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryAllProjectListResponse.getBody().getSuccess());
|
||||||
projectCode = (long) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProjectListResponse
|
projectCode = (long) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProjectListResponse.getBody().getData()).get(0)).get("code");
|
||||||
.getBody().getData()).get(0)).get("code");
|
|
||||||
|
|
||||||
// upload test workflow definition json
|
// upload test workflow definition json
|
||||||
ClassLoader classLoader = getClass().getClassLoader();
|
ClassLoader classLoader = getClass().getClassLoader();
|
||||||
File file = new File(classLoader.getResource("workflow-json/test.json").getFile());
|
File file = new File(classLoader.getResource("workflow-json/test.json").getFile());
|
||||||
CloseableHttpResponse importProcessDefinitionResponse = processDefinitionPage
|
CloseableHttpResponse importProcessDefinitionResponse = processDefinitionPage
|
||||||
.importProcessDefinition(loginUser, projectCode, file);
|
.importProcessDefinition(loginUser, projectCode, file);
|
||||||
String data = EntityUtils.toString(importProcessDefinitionResponse.getEntity());
|
String data = EntityUtils.toString(importProcessDefinitionResponse.getEntity());
|
||||||
Assertions.assertTrue(data.contains("\"success\":true"));
|
Assertions.assertTrue(data.contains("\"success\":true"));
|
||||||
|
|
||||||
// get workflow definition code
|
// get workflow definition code
|
||||||
HttpResponse queryAllProcessDefinitionByProjectCodeResponse =
|
HttpResponse queryAllProcessDefinitionByProjectCodeResponse = processDefinitionPage.queryAllProcessDefinitionByProjectCode(loginUser, projectCode);
|
||||||
processDefinitionPage.queryAllProcessDefinitionByProjectCode(loginUser, projectCode);
|
|
||||||
Assertions.assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getSuccess());
|
||||||
Assertions.assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getData().toString()
|
Assertions.assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getData().toString().contains("hello world"));
|
||||||
.contains("hello world"));
|
processDefinitionCode = (long) ((LinkedHashMap<String, Object>) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProcessDefinitionByProjectCodeResponse.getBody().getData()).get(0)).get("processDefinition")).get("code");
|
||||||
processDefinitionCode =
|
|
||||||
(long) ((LinkedHashMap<String, Object>) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProcessDefinitionByProjectCodeResponse
|
|
||||||
.getBody().getData()).get(0)).get("processDefinition")).get("code");
|
|
||||||
|
|
||||||
// release test workflow
|
// release test workflow
|
||||||
HttpResponse releaseProcessDefinitionResponse = processDefinitionPage.releaseProcessDefinition(loginUser,
|
HttpResponse releaseProcessDefinitionResponse = processDefinitionPage.releaseProcessDefinition(loginUser, projectCode, processDefinitionCode, ReleaseState.ONLINE);
|
||||||
projectCode, processDefinitionCode, ReleaseState.ONLINE);
|
|
||||||
Assertions.assertTrue(releaseProcessDefinitionResponse.getBody().getSuccess());
|
Assertions.assertTrue(releaseProcessDefinitionResponse.getBody().getSuccess());
|
||||||
|
|
||||||
// trigger workflow instance
|
// trigger workflow instance
|
||||||
|
|
@ -134,12 +128,11 @@ public class ExecutorAPITest {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
String scheduleTime = String.format("%s,%s", formatter.format(date), formatter.format(date));
|
String scheduleTime = String.format("%s,%s", formatter.format(date), formatter.format(date));
|
||||||
log.info("use current time {} as scheduleTime", scheduleTime);
|
log.info("use current time {} as scheduleTime", scheduleTime);
|
||||||
HttpResponse startProcessInstanceResponse = executorPage.startProcessInstance(loginUser, projectCode,
|
HttpResponse startProcessInstanceResponse = executorPage.startProcessInstance(loginUser, projectCode, processDefinitionCode, scheduleTime, FailureStrategy.END, WarningType.NONE);
|
||||||
processDefinitionCode, scheduleTime, FailureStrategy.END, WarningType.NONE);
|
|
||||||
Assertions.assertTrue(startProcessInstanceResponse.getBody().getSuccess());
|
Assertions.assertTrue(startProcessInstanceResponse.getBody().getSuccess());
|
||||||
|
|
||||||
triggerCode = (long) startProcessInstanceResponse.getBody().getData();
|
triggerCode = (long) startProcessInstanceResponse.getBody().getData();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("failed", e);
|
log.error("failed", e);
|
||||||
Assertions.fail();
|
Assertions.fail();
|
||||||
}
|
}
|
||||||
|
|
@ -148,8 +141,7 @@ public class ExecutorAPITest {
|
||||||
@Test
|
@Test
|
||||||
@Order(2)
|
@Order(2)
|
||||||
public void testStartCheckProcessDefinition() {
|
public void testStartCheckProcessDefinition() {
|
||||||
HttpResponse testStartCheckProcessDefinitionResponse =
|
HttpResponse testStartCheckProcessDefinitionResponse = executorPage.startCheckProcessDefinition(loginUser, projectCode, processDefinitionCode);
|
||||||
executorPage.startCheckProcessDefinition(loginUser, projectCode, processDefinitionCode);
|
|
||||||
Assertions.assertTrue(testStartCheckProcessDefinitionResponse.getBody().getSuccess());
|
Assertions.assertTrue(testStartCheckProcessDefinitionResponse.getBody().getSuccess());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,21 +30,21 @@ import org.apache.dolphinscheduler.common.enums.ReleaseState;
|
||||||
import org.apache.dolphinscheduler.common.enums.UserType;
|
import org.apache.dolphinscheduler.common.enums.UserType;
|
||||||
import org.apache.dolphinscheduler.dao.entity.User;
|
import org.apache.dolphinscheduler.dao.entity.User;
|
||||||
|
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
import java.io.File;;
|
||||||
import org.apache.http.util.EntityUtils;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.AfterAll;
|
import org.junit.jupiter.api.AfterAll;
|
||||||
import org.junit.jupiter.api.Assertions;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.Order;
|
import org.junit.jupiter.api.Order;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||||
|
import org.apache.http.util.EntityUtils;
|
||||||
|
|
||||||
@DolphinScheduler(composeFiles = "docker/basic/docker-compose.yaml")
|
@DolphinScheduler(composeFiles = "docker/basic/docker-compose.yaml")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class ProcessDefinitionAPITest {
|
public class ProcessDefinitionAPITest {
|
||||||
|
|
@ -67,12 +67,12 @@ public class ProcessDefinitionAPITest {
|
||||||
|
|
||||||
private static String processDefinitionName;
|
private static String processDefinitionName;
|
||||||
|
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
public static void setup() {
|
public static void setup() {
|
||||||
LoginPage loginPage = new LoginPage();
|
LoginPage loginPage = new LoginPage();
|
||||||
HttpResponse loginHttpResponse = loginPage.login(username, password);
|
HttpResponse loginHttpResponse = loginPage.login(username, password);
|
||||||
sessionId =
|
sessionId = JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId();
|
||||||
JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId();
|
|
||||||
processDefinitionPage = new ProcessDefinitionPage(sessionId);
|
processDefinitionPage = new ProcessDefinitionPage(sessionId);
|
||||||
projectPage = new ProjectPage(sessionId);
|
projectPage = new ProjectPage(sessionId);
|
||||||
loginUser = new User();
|
loginUser = new User();
|
||||||
|
|
@ -93,15 +93,14 @@ public class ProcessDefinitionAPITest {
|
||||||
HttpResponse queryAllProjectListResponse = projectPage.queryAllProjectList(loginUser);
|
HttpResponse queryAllProjectListResponse = projectPage.queryAllProjectList(loginUser);
|
||||||
Assertions.assertTrue(queryAllProjectListResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryAllProjectListResponse.getBody().getSuccess());
|
||||||
|
|
||||||
projectCode = (long) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProjectListResponse
|
projectCode = (long) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProjectListResponse.getBody().getData()).get(0)).get("code");
|
||||||
.getBody().getData()).get(0)).get("code");
|
|
||||||
ClassLoader classLoader = getClass().getClassLoader();
|
ClassLoader classLoader = getClass().getClassLoader();
|
||||||
File file = new File(classLoader.getResource("workflow-json/test.json").getFile());
|
File file = new File(classLoader.getResource("workflow-json/test.json").getFile());
|
||||||
CloseableHttpResponse importProcessDefinitionResponse = processDefinitionPage
|
CloseableHttpResponse importProcessDefinitionResponse = processDefinitionPage
|
||||||
.importProcessDefinition(loginUser, projectCode, file);
|
.importProcessDefinition(loginUser, projectCode, file);
|
||||||
String data = EntityUtils.toString(importProcessDefinitionResponse.getEntity());
|
String data = EntityUtils.toString(importProcessDefinitionResponse.getEntity());
|
||||||
Assertions.assertTrue(data.contains("\"success\":true"));
|
Assertions.assertTrue(data.contains("\"success\":true"));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("failed", e);
|
log.error("failed", e);
|
||||||
Assertions.fail();
|
Assertions.fail();
|
||||||
}
|
}
|
||||||
|
|
@ -110,92 +109,72 @@ public class ProcessDefinitionAPITest {
|
||||||
@Test
|
@Test
|
||||||
@Order(2)
|
@Order(2)
|
||||||
public void testQueryAllProcessDefinitionByProjectCode() {
|
public void testQueryAllProcessDefinitionByProjectCode() {
|
||||||
HttpResponse queryAllProcessDefinitionByProjectCodeResponse =
|
HttpResponse queryAllProcessDefinitionByProjectCodeResponse = processDefinitionPage.queryAllProcessDefinitionByProjectCode(loginUser, projectCode);
|
||||||
processDefinitionPage.queryAllProcessDefinitionByProjectCode(loginUser, projectCode);
|
|
||||||
Assertions.assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getSuccess());
|
||||||
Assertions.assertTrue(
|
Assertions.assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getData().toString().contains("hello world"));
|
||||||
queryAllProcessDefinitionByProjectCodeResponse.getBody().getData().toString().contains("hello world"));
|
processDefinitionCode = (long) ((LinkedHashMap<String, Object>) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProcessDefinitionByProjectCodeResponse.getBody().getData()).get(0)).get("processDefinition")).get("code");
|
||||||
processDefinitionCode =
|
processDefinitionName = (String) ((LinkedHashMap<String, Object>) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProcessDefinitionByProjectCodeResponse.getBody().getData()).get(0)).get("processDefinition")).get("name");
|
||||||
(long) ((LinkedHashMap<String, Object>) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProcessDefinitionByProjectCodeResponse
|
|
||||||
.getBody().getData()).get(0)).get("processDefinition")).get("code");
|
|
||||||
processDefinitionName =
|
|
||||||
(String) ((LinkedHashMap<String, Object>) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProcessDefinitionByProjectCodeResponse
|
|
||||||
.getBody().getData()).get(0)).get("processDefinition")).get("name");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Order(3)
|
@Order(3)
|
||||||
public void testQueryProcessDefinitionByCode() {
|
public void testQueryProcessDefinitionByCode() {
|
||||||
HttpResponse queryProcessDefinitionByCodeResponse =
|
HttpResponse queryProcessDefinitionByCodeResponse = processDefinitionPage.queryProcessDefinitionByCode(loginUser, projectCode, processDefinitionCode);
|
||||||
processDefinitionPage.queryProcessDefinitionByCode(loginUser, projectCode, processDefinitionCode);
|
|
||||||
Assertions.assertTrue(queryProcessDefinitionByCodeResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryProcessDefinitionByCodeResponse.getBody().getSuccess());
|
||||||
Assertions.assertTrue(
|
Assertions.assertTrue(queryProcessDefinitionByCodeResponse.getBody().getData().toString().contains("hello world"));
|
||||||
queryProcessDefinitionByCodeResponse.getBody().getData().toString().contains("hello world"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Order(4)
|
@Order(4)
|
||||||
public void testgetProcessListByProjectCode() {
|
public void testgetProcessListByProjectCode() {
|
||||||
HttpResponse getProcessListByProjectCodeResponse =
|
HttpResponse getProcessListByProjectCodeResponse = processDefinitionPage.getProcessListByProjectCode(loginUser, projectCode);
|
||||||
processDefinitionPage.getProcessListByProjectCode(loginUser, projectCode);
|
|
||||||
Assertions.assertTrue(getProcessListByProjectCodeResponse.getBody().getSuccess());
|
Assertions.assertTrue(getProcessListByProjectCodeResponse.getBody().getSuccess());
|
||||||
Assertions
|
Assertions.assertTrue(getProcessListByProjectCodeResponse.getBody().getData().toString().contains("test_import"));
|
||||||
.assertTrue(getProcessListByProjectCodeResponse.getBody().getData().toString().contains("test_import"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Order(5)
|
@Order(5)
|
||||||
public void testQueryProcessDefinitionByName() {
|
public void testQueryProcessDefinitionByName() {
|
||||||
HttpResponse queryProcessDefinitionByNameResponse =
|
HttpResponse queryProcessDefinitionByNameResponse = processDefinitionPage.queryProcessDefinitionByName(loginUser, projectCode, processDefinitionName);
|
||||||
processDefinitionPage.queryProcessDefinitionByName(loginUser, projectCode, processDefinitionName);
|
|
||||||
Assertions.assertTrue(queryProcessDefinitionByNameResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryProcessDefinitionByNameResponse.getBody().getSuccess());
|
||||||
Assertions.assertTrue(
|
Assertions.assertTrue(queryProcessDefinitionByNameResponse.getBody().getData().toString().contains("hello world"));
|
||||||
queryProcessDefinitionByNameResponse.getBody().getData().toString().contains("hello world"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Order(6)
|
@Order(6)
|
||||||
public void testQueryProcessDefinitionList() {
|
public void testQueryProcessDefinitionList() {
|
||||||
HttpResponse queryProcessDefinitionListResponse =
|
HttpResponse queryProcessDefinitionListResponse = processDefinitionPage.queryProcessDefinitionList(loginUser, projectCode);
|
||||||
processDefinitionPage.queryProcessDefinitionList(loginUser, projectCode);
|
|
||||||
Assertions.assertTrue(queryProcessDefinitionListResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryProcessDefinitionListResponse.getBody().getSuccess());
|
||||||
Assertions
|
Assertions.assertTrue(queryProcessDefinitionListResponse.getBody().getData().toString().contains("hello world"));
|
||||||
.assertTrue(queryProcessDefinitionListResponse.getBody().getData().toString().contains("hello world"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Order(7)
|
@Order(7)
|
||||||
public void testReleaseProcessDefinition() {
|
public void testReleaseProcessDefinition() {
|
||||||
HttpResponse releaseProcessDefinitionResponse = processDefinitionPage.releaseProcessDefinition(loginUser,
|
HttpResponse releaseProcessDefinitionResponse = processDefinitionPage.releaseProcessDefinition(loginUser, projectCode, processDefinitionCode, ReleaseState.ONLINE);
|
||||||
projectCode, processDefinitionCode, ReleaseState.ONLINE);
|
|
||||||
Assertions.assertTrue(releaseProcessDefinitionResponse.getBody().getSuccess());
|
Assertions.assertTrue(releaseProcessDefinitionResponse.getBody().getSuccess());
|
||||||
|
|
||||||
HttpResponse queryProcessDefinitionByCodeResponse =
|
HttpResponse queryProcessDefinitionByCodeResponse = processDefinitionPage.queryProcessDefinitionByCode(loginUser, projectCode, processDefinitionCode);
|
||||||
processDefinitionPage.queryProcessDefinitionByCode(loginUser, projectCode, processDefinitionCode);
|
|
||||||
Assertions.assertTrue(queryProcessDefinitionByCodeResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryProcessDefinitionByCodeResponse.getBody().getSuccess());
|
||||||
Assertions.assertTrue(
|
Assertions.assertTrue(queryProcessDefinitionByCodeResponse.getBody().getData().toString().contains("releaseState=ONLINE"));
|
||||||
queryProcessDefinitionByCodeResponse.getBody().getData().toString().contains("releaseState=ONLINE"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Order(8)
|
@Order(8)
|
||||||
public void testDeleteProcessDefinitionByCode() {
|
public void testDeleteProcessDefinitionByCode() {
|
||||||
HttpResponse deleteProcessDefinitionByCodeResponse =
|
HttpResponse deleteProcessDefinitionByCodeResponse = processDefinitionPage.deleteProcessDefinitionByCode(loginUser, projectCode, processDefinitionCode);
|
||||||
processDefinitionPage.deleteProcessDefinitionByCode(loginUser, projectCode, processDefinitionCode);
|
|
||||||
Assertions.assertFalse(deleteProcessDefinitionByCodeResponse.getBody().getSuccess());
|
Assertions.assertFalse(deleteProcessDefinitionByCodeResponse.getBody().getSuccess());
|
||||||
|
|
||||||
HttpResponse releaseProcessDefinitionResponse = processDefinitionPage.releaseProcessDefinition(loginUser,
|
HttpResponse releaseProcessDefinitionResponse = processDefinitionPage.releaseProcessDefinition(loginUser, projectCode, processDefinitionCode, ReleaseState.OFFLINE);
|
||||||
projectCode, processDefinitionCode, ReleaseState.OFFLINE);
|
|
||||||
Assertions.assertTrue(releaseProcessDefinitionResponse.getBody().getSuccess());
|
Assertions.assertTrue(releaseProcessDefinitionResponse.getBody().getSuccess());
|
||||||
|
|
||||||
deleteProcessDefinitionByCodeResponse =
|
deleteProcessDefinitionByCodeResponse = processDefinitionPage.deleteProcessDefinitionByCode(loginUser, projectCode, processDefinitionCode);
|
||||||
processDefinitionPage.deleteProcessDefinitionByCode(loginUser, projectCode, processDefinitionCode);
|
|
||||||
Assertions.assertTrue(deleteProcessDefinitionByCodeResponse.getBody().getSuccess());
|
Assertions.assertTrue(deleteProcessDefinitionByCodeResponse.getBody().getSuccess());
|
||||||
|
|
||||||
HttpResponse queryProcessDefinitionListResponse =
|
HttpResponse queryProcessDefinitionListResponse = processDefinitionPage.queryProcessDefinitionList(loginUser, projectCode);
|
||||||
processDefinitionPage.queryProcessDefinitionList(loginUser, projectCode);
|
|
||||||
Assertions.assertTrue(queryProcessDefinitionListResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryProcessDefinitionListResponse.getBody().getSuccess());
|
||||||
Assertions
|
Assertions.assertFalse(queryProcessDefinitionListResponse.getBody().getData().toString().contains("hello world"));
|
||||||
.assertFalse(queryProcessDefinitionListResponse.getBody().getData().toString().contains("hello world"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,8 +48,6 @@ import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.AfterAll;
|
import org.junit.jupiter.api.AfterAll;
|
||||||
import org.junit.jupiter.api.Assertions;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
|
|
@ -57,6 +55,8 @@ import org.junit.jupiter.api.Order;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.testcontainers.shaded.org.awaitility.Awaitility;
|
import org.testcontainers.shaded.org.awaitility.Awaitility;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
@DolphinScheduler(composeFiles = "docker/basic/docker-compose.yaml")
|
@DolphinScheduler(composeFiles = "docker/basic/docker-compose.yaml")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class ProcessInstanceAPITest {
|
public class ProcessInstanceAPITest {
|
||||||
|
|
@ -89,8 +89,7 @@ public class ProcessInstanceAPITest {
|
||||||
public static void setup() {
|
public static void setup() {
|
||||||
LoginPage loginPage = new LoginPage();
|
LoginPage loginPage = new LoginPage();
|
||||||
HttpResponse loginHttpResponse = loginPage.login(username, password);
|
HttpResponse loginHttpResponse = loginPage.login(username, password);
|
||||||
sessionId =
|
sessionId = JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId();
|
||||||
JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId();
|
|
||||||
processInstancePage = new ProcessInstancePage(sessionId);
|
processInstancePage = new ProcessInstancePage(sessionId);
|
||||||
executorPage = new ExecutorPage(sessionId);
|
executorPage = new ExecutorPage(sessionId);
|
||||||
processDefinitionPage = new ProcessDefinitionPage(sessionId);
|
processDefinitionPage = new ProcessDefinitionPage(sessionId);
|
||||||
|
|
@ -114,30 +113,24 @@ public class ProcessInstanceAPITest {
|
||||||
HttpResponse createProjectResponse = projectPage.createProject(loginUser, "project-test");
|
HttpResponse createProjectResponse = projectPage.createProject(loginUser, "project-test");
|
||||||
HttpResponse queryAllProjectListResponse = projectPage.queryAllProjectList(loginUser);
|
HttpResponse queryAllProjectListResponse = projectPage.queryAllProjectList(loginUser);
|
||||||
assertTrue(queryAllProjectListResponse.getBody().getSuccess());
|
assertTrue(queryAllProjectListResponse.getBody().getSuccess());
|
||||||
projectCode = (long) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProjectListResponse
|
projectCode = (long) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProjectListResponse.getBody().getData()).get(0)).get("code");
|
||||||
.getBody().getData()).get(0)).get("code");
|
|
||||||
|
|
||||||
// upload test workflow definition json
|
// upload test workflow definition json
|
||||||
ClassLoader classLoader = getClass().getClassLoader();
|
ClassLoader classLoader = getClass().getClassLoader();
|
||||||
File file = new File(classLoader.getResource("workflow-json/test.json").getFile());
|
File file = new File(classLoader.getResource("workflow-json/test.json").getFile());
|
||||||
CloseableHttpResponse importProcessDefinitionResponse = processDefinitionPage
|
CloseableHttpResponse importProcessDefinitionResponse = processDefinitionPage
|
||||||
.importProcessDefinition(loginUser, projectCode, file);
|
.importProcessDefinition(loginUser, projectCode, file);
|
||||||
String data = EntityUtils.toString(importProcessDefinitionResponse.getEntity());
|
String data = EntityUtils.toString(importProcessDefinitionResponse.getEntity());
|
||||||
assertTrue(data.contains("\"success\":true"));
|
assertTrue(data.contains("\"success\":true"));
|
||||||
|
|
||||||
// get workflow definition code
|
// get workflow definition code
|
||||||
HttpResponse queryAllProcessDefinitionByProjectCodeResponse =
|
HttpResponse queryAllProcessDefinitionByProjectCodeResponse = processDefinitionPage.queryAllProcessDefinitionByProjectCode(loginUser, projectCode);
|
||||||
processDefinitionPage.queryAllProcessDefinitionByProjectCode(loginUser, projectCode);
|
|
||||||
assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getSuccess());
|
assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getSuccess());
|
||||||
assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getData().toString()
|
assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getData().toString().contains("hello world"));
|
||||||
.contains("hello world"));
|
processDefinitionCode = (long) ((LinkedHashMap<String, Object>) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProcessDefinitionByProjectCodeResponse.getBody().getData()).get(0)).get("processDefinition")).get("code");
|
||||||
processDefinitionCode =
|
|
||||||
(long) ((LinkedHashMap<String, Object>) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProcessDefinitionByProjectCodeResponse
|
|
||||||
.getBody().getData()).get(0)).get("processDefinition")).get("code");
|
|
||||||
|
|
||||||
// release test workflow
|
// release test workflow
|
||||||
HttpResponse releaseProcessDefinitionResponse = processDefinitionPage.releaseProcessDefinition(loginUser,
|
HttpResponse releaseProcessDefinitionResponse = processDefinitionPage.releaseProcessDefinition(loginUser, projectCode, processDefinitionCode, ReleaseState.ONLINE);
|
||||||
projectCode, processDefinitionCode, ReleaseState.ONLINE);
|
|
||||||
assertTrue(releaseProcessDefinitionResponse.getBody().getSuccess());
|
assertTrue(releaseProcessDefinitionResponse.getBody().getSuccess());
|
||||||
|
|
||||||
// trigger workflow instance
|
// trigger workflow instance
|
||||||
|
|
@ -145,27 +138,23 @@ public class ProcessInstanceAPITest {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
String scheduleTime = String.format("%s,%s", formatter.format(date), formatter.format(date));
|
String scheduleTime = String.format("%s,%s", formatter.format(date), formatter.format(date));
|
||||||
log.info("use current time {} as scheduleTime", scheduleTime);
|
log.info("use current time {} as scheduleTime", scheduleTime);
|
||||||
HttpResponse startProcessInstanceResponse = executorPage.startProcessInstance(loginUser, projectCode,
|
HttpResponse startProcessInstanceResponse = executorPage.startProcessInstance(loginUser, projectCode, processDefinitionCode, scheduleTime, FailureStrategy.END, WarningType.NONE);
|
||||||
processDefinitionCode, scheduleTime, FailureStrategy.END, WarningType.NONE);
|
|
||||||
assertTrue(startProcessInstanceResponse.getBody().getSuccess());
|
assertTrue(startProcessInstanceResponse.getBody().getSuccess());
|
||||||
|
|
||||||
// make sure process instance has completed and successfully persisted into db
|
// make sure process instance has completed and successfully persisted into db
|
||||||
Awaitility.await()
|
Awaitility.await()
|
||||||
.atMost(30, TimeUnit.SECONDS)
|
.atMost(30, TimeUnit.SECONDS)
|
||||||
.untilAsserted(() -> {
|
.untilAsserted(() -> {
|
||||||
// query workflow instance by trigger code
|
// query workflow instance by trigger code
|
||||||
triggerCode = (long) startProcessInstanceResponse.getBody().getData();
|
triggerCode = (long) startProcessInstanceResponse.getBody().getData();
|
||||||
HttpResponse queryProcessInstancesByTriggerCodeResponse = processInstancePage
|
HttpResponse queryProcessInstancesByTriggerCodeResponse = processInstancePage.queryProcessInstancesByTriggerCode(loginUser, projectCode, triggerCode);
|
||||||
.queryProcessInstancesByTriggerCode(loginUser, projectCode, triggerCode);
|
assertTrue(queryProcessInstancesByTriggerCodeResponse.getBody().getSuccess());
|
||||||
assertTrue(queryProcessInstancesByTriggerCodeResponse.getBody().getSuccess());
|
List<LinkedHashMap<String, Object>> body = (List<LinkedHashMap<String, Object>>) queryProcessInstancesByTriggerCodeResponse.getBody().getData();
|
||||||
List<LinkedHashMap<String, Object>> body =
|
assertTrue(CollectionUtils.isNotEmpty(body));
|
||||||
(List<LinkedHashMap<String, Object>>) queryProcessInstancesByTriggerCodeResponse
|
assertEquals("SUCCESS", body.get(0).get("state"));
|
||||||
.getBody().getData();
|
processInstanceId = (int) body.get(0).get("id");
|
||||||
assertTrue(CollectionUtils.isNotEmpty(body));
|
});
|
||||||
assertEquals("SUCCESS", body.get(0).get("state"));
|
} catch (Exception e) {
|
||||||
processInstanceId = (int) body.get(0).get("id");
|
|
||||||
});
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("failed", e);
|
log.error("failed", e);
|
||||||
Assertions.fail();
|
Assertions.fail();
|
||||||
}
|
}
|
||||||
|
|
@ -174,8 +163,7 @@ public class ProcessInstanceAPITest {
|
||||||
@Test
|
@Test
|
||||||
@Order(2)
|
@Order(2)
|
||||||
public void testQueryProcessInstanceList() {
|
public void testQueryProcessInstanceList() {
|
||||||
HttpResponse queryProcessInstanceListResponse =
|
HttpResponse queryProcessInstanceListResponse = processInstancePage.queryProcessInstanceList(loginUser, projectCode, 1, 10);
|
||||||
processInstancePage.queryProcessInstanceList(loginUser, projectCode, 1, 10);
|
|
||||||
assertTrue(queryProcessInstanceListResponse.getBody().getSuccess());
|
assertTrue(queryProcessInstanceListResponse.getBody().getSuccess());
|
||||||
assertTrue(queryProcessInstanceListResponse.getBody().getData().toString().contains("test_import"));
|
assertTrue(queryProcessInstanceListResponse.getBody().getData().toString().contains("test_import"));
|
||||||
}
|
}
|
||||||
|
|
@ -183,8 +171,7 @@ public class ProcessInstanceAPITest {
|
||||||
@Test
|
@Test
|
||||||
@Order(3)
|
@Order(3)
|
||||||
public void testQueryTaskListByProcessId() {
|
public void testQueryTaskListByProcessId() {
|
||||||
HttpResponse queryTaskListByProcessIdResponse =
|
HttpResponse queryTaskListByProcessIdResponse = processInstancePage.queryTaskListByProcessId(loginUser, projectCode, processInstanceId);
|
||||||
processInstancePage.queryTaskListByProcessId(loginUser, projectCode, processInstanceId);
|
|
||||||
assertTrue(queryTaskListByProcessIdResponse.getBody().getSuccess());
|
assertTrue(queryTaskListByProcessIdResponse.getBody().getSuccess());
|
||||||
assertTrue(queryTaskListByProcessIdResponse.getBody().getData().toString().contains("test_import"));
|
assertTrue(queryTaskListByProcessIdResponse.getBody().getData().toString().contains("test_import"));
|
||||||
}
|
}
|
||||||
|
|
@ -192,8 +179,7 @@ public class ProcessInstanceAPITest {
|
||||||
@Test
|
@Test
|
||||||
@Order(4)
|
@Order(4)
|
||||||
public void testQueryProcessInstanceById() {
|
public void testQueryProcessInstanceById() {
|
||||||
HttpResponse queryProcessInstanceByIdResponse =
|
HttpResponse queryProcessInstanceByIdResponse = processInstancePage.queryProcessInstanceById(loginUser, projectCode, processInstanceId);
|
||||||
processInstancePage.queryProcessInstanceById(loginUser, projectCode, processInstanceId);
|
|
||||||
assertTrue(queryProcessInstanceByIdResponse.getBody().getSuccess());
|
assertTrue(queryProcessInstanceByIdResponse.getBody().getSuccess());
|
||||||
assertTrue(queryProcessInstanceByIdResponse.getBody().getData().toString().contains("test_import"));
|
assertTrue(queryProcessInstanceByIdResponse.getBody().getData().toString().contains("test_import"));
|
||||||
}
|
}
|
||||||
|
|
@ -201,12 +187,10 @@ public class ProcessInstanceAPITest {
|
||||||
@Test
|
@Test
|
||||||
@Order(5)
|
@Order(5)
|
||||||
public void testDeleteProcessInstanceById() {
|
public void testDeleteProcessInstanceById() {
|
||||||
HttpResponse deleteProcessInstanceByIdResponse =
|
HttpResponse deleteProcessInstanceByIdResponse = processInstancePage.deleteProcessInstanceById(loginUser, projectCode, processInstanceId);
|
||||||
processInstancePage.deleteProcessInstanceById(loginUser, projectCode, processInstanceId);
|
|
||||||
assertTrue(deleteProcessInstanceByIdResponse.getBody().getSuccess());
|
assertTrue(deleteProcessInstanceByIdResponse.getBody().getSuccess());
|
||||||
|
|
||||||
HttpResponse queryProcessInstanceListResponse =
|
HttpResponse queryProcessInstanceListResponse = processInstancePage.queryProcessInstanceList(loginUser, projectCode, 1, 10);
|
||||||
processInstancePage.queryProcessInstanceList(loginUser, projectCode, 1, 10);
|
|
||||||
assertTrue(queryProcessInstanceListResponse.getBody().getSuccess());
|
assertTrue(queryProcessInstanceListResponse.getBody().getSuccess());
|
||||||
Assertions.assertFalse(queryProcessInstanceListResponse.getBody().getData().toString().contains("test_import"));
|
Assertions.assertFalse(queryProcessInstanceListResponse.getBody().getData().toString().contains("test_import"));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,17 +29,17 @@ import org.apache.dolphinscheduler.common.enums.UserType;
|
||||||
import org.apache.dolphinscheduler.dao.entity.Project;
|
import org.apache.dolphinscheduler.dao.entity.Project;
|
||||||
import org.apache.dolphinscheduler.dao.entity.User;
|
import org.apache.dolphinscheduler.dao.entity.User;
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.AfterAll;
|
import org.junit.jupiter.api.AfterAll;
|
||||||
import org.junit.jupiter.api.Assertions;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.Order;
|
import org.junit.jupiter.api.Order;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@DolphinScheduler(composeFiles = "docker/basic/docker-compose.yaml")
|
@DolphinScheduler(composeFiles = "docker/basic/docker-compose.yaml")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
// TODO: Add more detailed permission control related cases after userPage test cases completed
|
// TODO: Add more detailed permission control related cases after userPage test cases completed
|
||||||
|
|
@ -59,8 +59,7 @@ public class ProjectAPITest {
|
||||||
public static void setup() {
|
public static void setup() {
|
||||||
LoginPage loginPage = new LoginPage();
|
LoginPage loginPage = new LoginPage();
|
||||||
HttpResponse loginHttpResponse = loginPage.login(username, password);
|
HttpResponse loginHttpResponse = loginPage.login(username, password);
|
||||||
sessionId =
|
sessionId = JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId();
|
||||||
JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId();
|
|
||||||
projectPage = new ProjectPage(sessionId);
|
projectPage = new ProjectPage(sessionId);
|
||||||
loginUser = new User();
|
loginUser = new User();
|
||||||
loginUser.setUserName("admin");
|
loginUser.setUserName("admin");
|
||||||
|
|
@ -99,8 +98,7 @@ public class ProjectAPITest {
|
||||||
List<LinkedHashMap> projects = (List<LinkedHashMap>) queryAllProjectListResponse.getBody().getData();
|
List<LinkedHashMap> projects = (List<LinkedHashMap>) queryAllProjectListResponse.getBody().getData();
|
||||||
Long code = (Long) projects.get(0).get("code");
|
Long code = (Long) projects.get(0).get("code");
|
||||||
|
|
||||||
HttpResponse updateProjectResponse =
|
HttpResponse updateProjectResponse = projectPage.updateProject(loginUser, code,"project-new", loginUser.getUserName());
|
||||||
projectPage.updateProject(loginUser, code, "project-new", loginUser.getUserName());
|
|
||||||
Assertions.assertTrue(updateProjectResponse.getBody().getSuccess());
|
Assertions.assertTrue(updateProjectResponse.getBody().getSuccess());
|
||||||
|
|
||||||
queryAllProjectListResponse = projectPage.queryAllProjectList(loginUser);
|
queryAllProjectListResponse = projectPage.queryAllProjectList(loginUser);
|
||||||
|
|
@ -135,21 +133,17 @@ public class ProjectAPITest {
|
||||||
@Test
|
@Test
|
||||||
@Order(6)
|
@Order(6)
|
||||||
public void testQueryProjectWithAuthorizedLevelListPaging() {
|
public void testQueryProjectWithAuthorizedLevelListPaging() {
|
||||||
HttpResponse queryProjectWithAuthorizedLevelListPagingResponse =
|
HttpResponse queryProjectWithAuthorizedLevelListPagingResponse = projectPage.queryProjectWithAuthorizedLevelListPaging(loginUser, loginUser.getId(),1, 1);
|
||||||
projectPage.queryProjectWithAuthorizedLevelListPaging(loginUser, loginUser.getId(), 1, 1);
|
|
||||||
Assertions.assertTrue(queryProjectWithAuthorizedLevelListPagingResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryProjectWithAuthorizedLevelListPagingResponse.getBody().getSuccess());
|
||||||
Assertions.assertTrue(queryProjectWithAuthorizedLevelListPagingResponse.getBody().getData().toString()
|
Assertions.assertTrue(queryProjectWithAuthorizedLevelListPagingResponse.getBody().getData().toString().contains("project-new"));
|
||||||
.contains("project-new"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Order(7)
|
@Order(7)
|
||||||
public void testQueryUnauthorizedProject() {
|
public void testQueryUnauthorizedProject() {
|
||||||
HttpResponse queryUnauthorizedProjectResponse =
|
HttpResponse queryUnauthorizedProjectResponse = projectPage.queryUnauthorizedProject(loginUser, loginUser.getId());
|
||||||
projectPage.queryUnauthorizedProject(loginUser, loginUser.getId());
|
|
||||||
Assertions.assertTrue(queryUnauthorizedProjectResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryUnauthorizedProjectResponse.getBody().getSuccess());
|
||||||
// project-new was created by instead of authorized to this user, therefore, it should be in the unauthorized
|
// project-new was created by instead of authorized to this user, therefore, it should be in the unauthorized list
|
||||||
// list
|
|
||||||
Assertions.assertTrue(queryUnauthorizedProjectResponse.getBody().getData().toString().contains("project-new"));
|
Assertions.assertTrue(queryUnauthorizedProjectResponse.getBody().getData().toString().contains("project-new"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -158,21 +152,17 @@ public class ProjectAPITest {
|
||||||
public void testQueryAuthorizedProject() {
|
public void testQueryAuthorizedProject() {
|
||||||
HttpResponse queryAuthorizedProjectResponse = projectPage.queryAuthorizedProject(loginUser, loginUser.getId());
|
HttpResponse queryAuthorizedProjectResponse = projectPage.queryAuthorizedProject(loginUser, loginUser.getId());
|
||||||
Assertions.assertTrue(queryAuthorizedProjectResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryAuthorizedProjectResponse.getBody().getSuccess());
|
||||||
// project-new was created by instead of authorized to this user, therefore, it should not be in the authorized
|
// project-new was created by instead of authorized to this user, therefore, it should not be in the authorized list
|
||||||
// list
|
|
||||||
Assertions.assertFalse(queryAuthorizedProjectResponse.getBody().getData().toString().contains("project-new"));
|
Assertions.assertFalse(queryAuthorizedProjectResponse.getBody().getData().toString().contains("project-new"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Order(9)
|
@Order(9)
|
||||||
public void testQueryProjectWithAuthorizedLevel() {
|
public void testQueryProjectWithAuthorizedLevel() {
|
||||||
HttpResponse queryProjectWithAuthorizedLevelResponse =
|
HttpResponse queryProjectWithAuthorizedLevelResponse = projectPage.queryProjectWithAuthorizedLevel(loginUser, loginUser.getId());
|
||||||
projectPage.queryProjectWithAuthorizedLevel(loginUser, loginUser.getId());
|
|
||||||
Assertions.assertTrue(queryProjectWithAuthorizedLevelResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryProjectWithAuthorizedLevelResponse.getBody().getSuccess());
|
||||||
// queryProjectWithAuthorizedLevel api returns a joint-set of projects both created by and authorized to the
|
// queryProjectWithAuthorizedLevel api returns a joint-set of projects both created by and authorized to the user
|
||||||
// user
|
Assertions.assertTrue(queryProjectWithAuthorizedLevelResponse.getBody().getData().toString().contains("project-new"));
|
||||||
Assertions.assertTrue(
|
|
||||||
queryProjectWithAuthorizedLevelResponse.getBody().getData().toString().contains("project-new"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
@ -191,13 +181,10 @@ public class ProjectAPITest {
|
||||||
@Test
|
@Test
|
||||||
@Order(11)
|
@Order(11)
|
||||||
public void testQueryProjectCreatedAndAuthorizedByUser() {
|
public void testQueryProjectCreatedAndAuthorizedByUser() {
|
||||||
HttpResponse queryProjectCreatedAndAuthorizedByUserResponse =
|
HttpResponse queryProjectCreatedAndAuthorizedByUserResponse = projectPage.queryProjectCreatedAndAuthorizedByUser(loginUser);
|
||||||
projectPage.queryProjectCreatedAndAuthorizedByUser(loginUser);
|
|
||||||
Assertions.assertTrue(queryProjectCreatedAndAuthorizedByUserResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryProjectCreatedAndAuthorizedByUserResponse.getBody().getSuccess());
|
||||||
// queryProjectCreatedAndAuthorizedByUser api returns a joint-set of projects both created by and authorized to
|
// queryProjectCreatedAndAuthorizedByUser api returns a joint-set of projects both created by and authorized to the user
|
||||||
// the user
|
Assertions.assertTrue(queryProjectCreatedAndAuthorizedByUserResponse.getBody().getData().toString().contains("project-new"));
|
||||||
Assertions.assertTrue(
|
|
||||||
queryProjectCreatedAndAuthorizedByUserResponse.getBody().getData().toString().contains("project-new"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
@ -205,8 +192,7 @@ public class ProjectAPITest {
|
||||||
public void testQueryAllProjectListForDependent() {
|
public void testQueryAllProjectListForDependent() {
|
||||||
HttpResponse queryAllProjectListForDependentResponse = projectPage.queryAllProjectListForDependent(loginUser);
|
HttpResponse queryAllProjectListForDependentResponse = projectPage.queryAllProjectListForDependent(loginUser);
|
||||||
Assertions.assertTrue(queryAllProjectListForDependentResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryAllProjectListForDependentResponse.getBody().getSuccess());
|
||||||
Assertions.assertTrue(
|
Assertions.assertTrue(queryAllProjectListForDependentResponse.getBody().getData().toString().contains("project-new"));
|
||||||
queryAllProjectListForDependentResponse.getBody().getData().toString().contains("project-new"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
@ -217,7 +203,8 @@ public class ProjectAPITest {
|
||||||
Long code = (Long) projects.get(0).get("code");
|
Long code = (Long) projects.get(0).get("code");
|
||||||
HttpResponse queryAllProjectListForDependentResponse = projectPage.deleteProject(loginUser, code);
|
HttpResponse queryAllProjectListForDependentResponse = projectPage.deleteProject(loginUser, code);
|
||||||
Assertions.assertTrue(queryAllProjectListForDependentResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryAllProjectListForDependentResponse.getBody().getSuccess());
|
||||||
Assertions.assertFalse(
|
Assertions.assertFalse(queryAllProjectListForDependentResponse.getBody().getData().toString().contains("project-new"));
|
||||||
queryAllProjectListForDependentResponse.getBody().getData().toString().contains("project-new"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,14 +35,14 @@ import java.io.File;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.AfterAll;
|
import org.junit.jupiter.api.AfterAll;
|
||||||
import org.junit.jupiter.api.Assertions;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.Order;
|
import org.junit.jupiter.api.Order;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
@DolphinScheduler(composeFiles = "docker/basic/docker-compose.yaml")
|
@DolphinScheduler(composeFiles = "docker/basic/docker-compose.yaml")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class SchedulerAPITest {
|
public class SchedulerAPITest {
|
||||||
|
|
@ -67,12 +67,12 @@ public class SchedulerAPITest {
|
||||||
|
|
||||||
private static int scheduleId;
|
private static int scheduleId;
|
||||||
|
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
public static void setup() {
|
public static void setup() {
|
||||||
LoginPage loginPage = new LoginPage();
|
LoginPage loginPage = new LoginPage();
|
||||||
HttpResponse loginHttpResponse = loginPage.login(username, password);
|
HttpResponse loginHttpResponse = loginPage.login(username, password);
|
||||||
sessionId =
|
sessionId = JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId();
|
||||||
JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId();
|
|
||||||
projectPage = new ProjectPage(sessionId);
|
projectPage = new ProjectPage(sessionId);
|
||||||
schedulerPage = new SchedulerPage(sessionId);
|
schedulerPage = new SchedulerPage(sessionId);
|
||||||
processDefinitionPage = new ProcessDefinitionPage(sessionId);
|
processDefinitionPage = new ProcessDefinitionPage(sessionId);
|
||||||
|
|
@ -94,24 +94,17 @@ public class SchedulerAPITest {
|
||||||
HttpResponse queryAllProjectListResponse = projectPage.queryAllProjectList(loginUser);
|
HttpResponse queryAllProjectListResponse = projectPage.queryAllProjectList(loginUser);
|
||||||
Assertions.assertTrue(queryAllProjectListResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryAllProjectListResponse.getBody().getSuccess());
|
||||||
|
|
||||||
projectCode = (long) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProjectListResponse
|
projectCode = (long) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProjectListResponse.getBody().getData()).get(0)).get("code");
|
||||||
.getBody().getData()).get(0)).get("code");
|
|
||||||
ClassLoader classLoader = getClass().getClassLoader();
|
ClassLoader classLoader = getClass().getClassLoader();
|
||||||
File file = new File(classLoader.getResource("workflow-json/test.json").getFile());
|
File file = new File(classLoader.getResource("workflow-json/test.json").getFile());
|
||||||
processDefinitionPage.importProcessDefinition(loginUser, projectCode, file);
|
processDefinitionPage.importProcessDefinition(loginUser, projectCode, file);
|
||||||
HttpResponse queryAllProcessDefinitionByProjectCodeResponse =
|
HttpResponse queryAllProcessDefinitionByProjectCodeResponse = processDefinitionPage.queryAllProcessDefinitionByProjectCode(loginUser, projectCode);
|
||||||
processDefinitionPage.queryAllProcessDefinitionByProjectCode(loginUser, projectCode);
|
|
||||||
Assertions.assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getSuccess());
|
||||||
processDefinitionCode =
|
processDefinitionCode = (long) ((LinkedHashMap<String, Object>) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProcessDefinitionByProjectCodeResponse.getBody().getData()).get(0)).get("processDefinition")).get("code");
|
||||||
(long) ((LinkedHashMap<String, Object>) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProcessDefinitionByProjectCodeResponse
|
|
||||||
.getBody().getData()).get(0)).get("processDefinition")).get("code");
|
|
||||||
|
|
||||||
processDefinitionPage.releaseProcessDefinition(loginUser, projectCode, processDefinitionCode,
|
processDefinitionPage.releaseProcessDefinition(loginUser, projectCode, processDefinitionCode, ReleaseState.ONLINE);
|
||||||
ReleaseState.ONLINE);
|
final String schedule = "{\"startTime\":\"2019-08-08 00:00:00\",\"endTime\":\"2100-08-08 00:00:00\",\"timezoneId\":\"America/Phoenix\",\"crontab\":\"0 0 3/6 * * ? *\"}" ;
|
||||||
final String schedule =
|
HttpResponse createScheduleResponse = schedulerPage.createSchedule(loginUser, projectCode, processDefinitionCode, schedule);
|
||||||
"{\"startTime\":\"2019-08-08 00:00:00\",\"endTime\":\"2100-08-08 00:00:00\",\"timezoneId\":\"America/Phoenix\",\"crontab\":\"0 0 3/6 * * ? *\"}";
|
|
||||||
HttpResponse createScheduleResponse =
|
|
||||||
schedulerPage.createSchedule(loginUser, projectCode, processDefinitionCode, schedule);
|
|
||||||
Assertions.assertTrue(createScheduleResponse.getBody().getSuccess());
|
Assertions.assertTrue(createScheduleResponse.getBody().getSuccess());
|
||||||
Assertions.assertTrue(createScheduleResponse.getBody().getData().toString().contains("2019-08-08"));
|
Assertions.assertTrue(createScheduleResponse.getBody().getData().toString().contains("2019-08-08"));
|
||||||
}
|
}
|
||||||
|
|
@ -122,15 +115,13 @@ public class SchedulerAPITest {
|
||||||
HttpResponse queryScheduleListResponse = schedulerPage.queryScheduleList(loginUser, projectCode);
|
HttpResponse queryScheduleListResponse = schedulerPage.queryScheduleList(loginUser, projectCode);
|
||||||
Assertions.assertTrue(queryScheduleListResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryScheduleListResponse.getBody().getSuccess());
|
||||||
Assertions.assertTrue(queryScheduleListResponse.getBody().getData().toString().contains("2019-08-08"));
|
Assertions.assertTrue(queryScheduleListResponse.getBody().getData().toString().contains("2019-08-08"));
|
||||||
scheduleId = (int) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryScheduleListResponse.getBody()
|
scheduleId = (int) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryScheduleListResponse.getBody().getData()).get(0)).get("id");
|
||||||
.getData()).get(0)).get("id");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Order(3)
|
@Order(3)
|
||||||
public void testPublishScheduleOnline() {
|
public void testPublishScheduleOnline() {
|
||||||
HttpResponse publishScheduleOnlineResponse =
|
HttpResponse publishScheduleOnlineResponse = schedulerPage.publishScheduleOnline(loginUser, projectCode, scheduleId);
|
||||||
schedulerPage.publishScheduleOnline(loginUser, projectCode, scheduleId);
|
|
||||||
Assertions.assertTrue(publishScheduleOnlineResponse.getBody().getSuccess());
|
Assertions.assertTrue(publishScheduleOnlineResponse.getBody().getSuccess());
|
||||||
|
|
||||||
HttpResponse queryScheduleListResponse = schedulerPage.queryScheduleList(loginUser, projectCode);
|
HttpResponse queryScheduleListResponse = schedulerPage.queryScheduleList(loginUser, projectCode);
|
||||||
|
|
@ -146,17 +137,14 @@ public class SchedulerAPITest {
|
||||||
|
|
||||||
HttpResponse queryScheduleListResponse = schedulerPage.queryScheduleList(loginUser, projectCode);
|
HttpResponse queryScheduleListResponse = schedulerPage.queryScheduleList(loginUser, projectCode);
|
||||||
Assertions.assertTrue(queryScheduleListResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryScheduleListResponse.getBody().getSuccess());
|
||||||
Assertions
|
Assertions.assertTrue(queryScheduleListResponse.getBody().getData().toString().contains("releaseState=OFFLINE"));
|
||||||
.assertTrue(queryScheduleListResponse.getBody().getData().toString().contains("releaseState=OFFLINE"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Order(5)
|
@Order(5)
|
||||||
public void testUpdateSchedule() {
|
public void testUpdateSchedule() {
|
||||||
final String schedule =
|
final String schedule = "{\"startTime\":\"1996-08-08 00:00:00\",\"endTime\":\"2200-08-08 00:00:00\",\"timezoneId\":\"America/Phoenix\",\"crontab\":\"0 0 3/6 * * ? *\"}";
|
||||||
"{\"startTime\":\"1996-08-08 00:00:00\",\"endTime\":\"2200-08-08 00:00:00\",\"timezoneId\":\"America/Phoenix\",\"crontab\":\"0 0 3/6 * * ? *\"}";
|
HttpResponse updateScheduleResponse = schedulerPage.updateSchedule(loginUser, projectCode, scheduleId, schedule);
|
||||||
HttpResponse updateScheduleResponse =
|
|
||||||
schedulerPage.updateSchedule(loginUser, projectCode, scheduleId, schedule);
|
|
||||||
Assertions.assertTrue(updateScheduleResponse.getBody().getSuccess());
|
Assertions.assertTrue(updateScheduleResponse.getBody().getSuccess());
|
||||||
|
|
||||||
HttpResponse queryScheduleListResponse = schedulerPage.queryScheduleList(loginUser, projectCode);
|
HttpResponse queryScheduleListResponse = schedulerPage.queryScheduleList(loginUser, projectCode);
|
||||||
|
|
@ -175,3 +163,5 @@ public class SchedulerAPITest {
|
||||||
Assertions.assertFalse(queryScheduleListResponse.getBody().getData().toString().contains("1996-08-08"));
|
Assertions.assertFalse(queryScheduleListResponse.getBody().getData().toString().contains("1996-08-08"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,18 +28,17 @@ import org.apache.dolphinscheduler.api.test.pages.LoginPage;
|
||||||
import org.apache.dolphinscheduler.api.test.pages.security.TenantPage;
|
import org.apache.dolphinscheduler.api.test.pages.security.TenantPage;
|
||||||
import org.apache.dolphinscheduler.api.test.utils.JSONUtils;
|
import org.apache.dolphinscheduler.api.test.utils.JSONUtils;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.AfterAll;
|
import org.junit.jupiter.api.AfterAll;
|
||||||
import org.junit.jupiter.api.Assertions;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.Order;
|
import org.junit.jupiter.api.Order;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
@DolphinScheduler(composeFiles = "docker/basic/docker-compose.yaml")
|
@DolphinScheduler(composeFiles = "docker/basic/docker-compose.yaml")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class TenantAPITest {
|
public class TenantAPITest {
|
||||||
|
|
||||||
private static final String tenant = System.getProperty("user.name");
|
private static final String tenant = System.getProperty("user.name");
|
||||||
|
|
||||||
private static final String user = "admin";
|
private static final String user = "admin";
|
||||||
|
|
@ -55,8 +54,7 @@ public class TenantAPITest {
|
||||||
LoginPage loginPage = new LoginPage();
|
LoginPage loginPage = new LoginPage();
|
||||||
HttpResponse loginHttpResponse = loginPage.login(user, password);
|
HttpResponse loginHttpResponse = loginPage.login(user, password);
|
||||||
|
|
||||||
sessionId =
|
sessionId = JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId();
|
||||||
JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterAll
|
@AfterAll
|
||||||
|
|
@ -92,9 +90,7 @@ public class TenantAPITest {
|
||||||
HttpResponse createTenantHttpResponse = tenantPage.getTenantListPaging(sessionId, 1, 10, "");
|
HttpResponse createTenantHttpResponse = tenantPage.getTenantListPaging(sessionId, 1, 10, "");
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
|
|
||||||
for (TenantListPagingResponseTotalList tenantListPagingResponseTotalList : JSONUtils
|
for (TenantListPagingResponseTotalList tenantListPagingResponseTotalList : JSONUtils.convertValue(createTenantHttpResponse.getBody().getData(), TenantListPagingResponseData.class).getTotalList()) {
|
||||||
.convertValue(createTenantHttpResponse.getBody().getData(), TenantListPagingResponseData.class)
|
|
||||||
.getTotalList()) {
|
|
||||||
if (tenantListPagingResponseTotalList.getTenantCode().equals(tenant)) {
|
if (tenantListPagingResponseTotalList.getTenantCode().equals(tenant)) {
|
||||||
result = true;
|
result = true;
|
||||||
existTenantId = tenantListPagingResponseTotalList.getId();
|
existTenantId = tenantListPagingResponseTotalList.getId();
|
||||||
|
|
|
||||||
|
|
@ -33,14 +33,14 @@ import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.AfterAll;
|
import org.junit.jupiter.api.AfterAll;
|
||||||
import org.junit.jupiter.api.Assertions;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.Order;
|
import org.junit.jupiter.api.Order;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
@DolphinScheduler(composeFiles = "docker/basic/docker-compose.yaml")
|
@DolphinScheduler(composeFiles = "docker/basic/docker-compose.yaml")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class WorkerGroupAPITest {
|
public class WorkerGroupAPITest {
|
||||||
|
|
@ -59,8 +59,7 @@ public class WorkerGroupAPITest {
|
||||||
public static void setup() {
|
public static void setup() {
|
||||||
LoginPage loginPage = new LoginPage();
|
LoginPage loginPage = new LoginPage();
|
||||||
HttpResponse loginHttpResponse = loginPage.login(username, password);
|
HttpResponse loginHttpResponse = loginPage.login(username, password);
|
||||||
sessionId =
|
sessionId = JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId();
|
||||||
JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId();
|
|
||||||
workerGroupPage = new WorkerGroupPage(sessionId);
|
workerGroupPage = new WorkerGroupPage(sessionId);
|
||||||
loginUser = new User();
|
loginUser = new User();
|
||||||
loginUser.setId(123);
|
loginUser.setId(123);
|
||||||
|
|
@ -76,7 +75,7 @@ public class WorkerGroupAPITest {
|
||||||
@Order(1)
|
@Order(1)
|
||||||
public void testSaveWorkerGroup() {
|
public void testSaveWorkerGroup() {
|
||||||
HttpResponse saveWorkerGroupHttpResponse = workerGroupPage
|
HttpResponse saveWorkerGroupHttpResponse = workerGroupPage
|
||||||
.saveWorkerGroup(loginUser, 1, "test_worker_group", "10.5.0.5:1234", "test", null);
|
.saveWorkerGroup(loginUser, 1, "test_worker_group", "10.5.0.5:1234", "test", null);
|
||||||
Assertions.assertTrue(saveWorkerGroupHttpResponse.getBody().getSuccess());
|
Assertions.assertTrue(saveWorkerGroupHttpResponse.getBody().getSuccess());
|
||||||
|
|
||||||
HttpResponse queryAllWorkerGroupsResponse = workerGroupPage.queryAllWorkerGroups(loginUser);
|
HttpResponse queryAllWorkerGroupsResponse = workerGroupPage.queryAllWorkerGroups(loginUser);
|
||||||
|
|
@ -89,10 +88,9 @@ public class WorkerGroupAPITest {
|
||||||
@Test
|
@Test
|
||||||
@Order(2)
|
@Order(2)
|
||||||
public void testQueryAllWorkerGroupsPaging() {
|
public void testQueryAllWorkerGroupsPaging() {
|
||||||
HttpResponse queryAllWorkerGroupsPagingResponse =
|
HttpResponse queryAllWorkerGroupsPagingResponse = workerGroupPage.queryAllWorkerGroupsPaging(loginUser, 1, 2, null);
|
||||||
workerGroupPage.queryAllWorkerGroupsPaging(loginUser, 1, 2, null);
|
|
||||||
Assertions.assertTrue(queryAllWorkerGroupsPagingResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryAllWorkerGroupsPagingResponse.getBody().getSuccess());
|
||||||
String workerGroupPageInfoData = queryAllWorkerGroupsPagingResponse.getBody().getData().toString();
|
String workerGroupPageInfoData = queryAllWorkerGroupsPagingResponse.getBody().getData().toString();
|
||||||
Assertions.assertTrue(workerGroupPageInfoData.contains("test_worker_group"));
|
Assertions.assertTrue(workerGroupPageInfoData.contains("test_worker_group"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -102,7 +100,7 @@ public class WorkerGroupAPITest {
|
||||||
HttpResponse queryAllWorkerGroupsResponse = workerGroupPage.queryAllWorkerGroups(loginUser);
|
HttpResponse queryAllWorkerGroupsResponse = workerGroupPage.queryAllWorkerGroups(loginUser);
|
||||||
Assertions.assertTrue(queryAllWorkerGroupsResponse.getBody().getSuccess());
|
Assertions.assertTrue(queryAllWorkerGroupsResponse.getBody().getSuccess());
|
||||||
|
|
||||||
String workerGroupPageInfoData = queryAllWorkerGroupsResponse.getBody().getData().toString();
|
String workerGroupPageInfoData = queryAllWorkerGroupsResponse.getBody().getData().toString();
|
||||||
Assertions.assertTrue(workerGroupPageInfoData.contains("test_worker_group"));
|
Assertions.assertTrue(workerGroupPageInfoData.contains("test_worker_group"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ import lombok.NoArgsConstructor;
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Data
|
@Data
|
||||||
public class TenantListPagingResponseData {
|
public class TenantListPagingResponseData {
|
||||||
|
|
||||||
private Integer currentPage;
|
private Integer currentPage;
|
||||||
|
|
||||||
private Integer pageSize;
|
private Integer pageSize;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ import lombok.NoArgsConstructor;
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Data
|
@Data
|
||||||
public class TenantListPagingResponseTotalList {
|
public class TenantListPagingResponseTotalList {
|
||||||
|
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public final class LoginPage {
|
public final class LoginPage {
|
||||||
|
|
||||||
public HttpResponse login(String username, String password) {
|
public HttpResponse login(String username, String password) {
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@
|
||||||
|
|
||||||
package org.apache.dolphinscheduler.api.test.pages.project;
|
package org.apache.dolphinscheduler.api.test.pages.project;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
|
||||||
import org.apache.dolphinscheduler.api.test.core.Constants;
|
import org.apache.dolphinscheduler.api.test.core.Constants;
|
||||||
import org.apache.dolphinscheduler.api.test.entity.HttpResponse;
|
import org.apache.dolphinscheduler.api.test.entity.HttpResponse;
|
||||||
import org.apache.dolphinscheduler.api.test.utils.RequestClient;
|
import org.apache.dolphinscheduler.api.test.utils.RequestClient;
|
||||||
|
|
@ -27,11 +29,8 @@ import org.apache.dolphinscheduler.dao.entity.User;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
|
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public final class ProjectPage {
|
public final class ProjectPage {
|
||||||
|
|
||||||
private String sessionId;
|
private String sessionId;
|
||||||
|
|
||||||
public HttpResponse createProject(User loginUser, String projectName) {
|
public HttpResponse createProject(User loginUser, String projectName) {
|
||||||
|
|
@ -91,8 +90,7 @@ public final class ProjectPage {
|
||||||
return requestClient.get("/projects", headers, params);
|
return requestClient.get("/projects", headers, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
public HttpResponse queryProjectWithAuthorizedLevelListPaging(User loginUser, Integer userId, Integer pageSize,
|
public HttpResponse queryProjectWithAuthorizedLevelListPaging(User loginUser, Integer userId, Integer pageSize, Integer pageNo) {
|
||||||
Integer pageNo) {
|
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put("loginUser", loginUser);
|
params.put("loginUser", loginUser);
|
||||||
params.put("userId", userId);
|
params.put("userId", userId);
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public final class TenantPage {
|
public final class TenantPage {
|
||||||
|
|
||||||
public HttpResponse createTenant(String sessionId, String tenant, Integer queueId, String description) {
|
public HttpResponse createTenant(String sessionId, String tenant, Integer queueId, String description) {
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put("tenantCode", tenant);
|
params.put("tenantCode", tenant);
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@
|
||||||
|
|
||||||
package org.apache.dolphinscheduler.api.test.pages.security;
|
package org.apache.dolphinscheduler.api.test.pages.security;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
|
||||||
import org.apache.dolphinscheduler.api.test.core.Constants;
|
import org.apache.dolphinscheduler.api.test.core.Constants;
|
||||||
import org.apache.dolphinscheduler.api.test.entity.HttpResponse;
|
import org.apache.dolphinscheduler.api.test.entity.HttpResponse;
|
||||||
import org.apache.dolphinscheduler.api.test.utils.RequestClient;
|
import org.apache.dolphinscheduler.api.test.utils.RequestClient;
|
||||||
|
|
@ -27,15 +29,13 @@ import org.apache.dolphinscheduler.dao.entity.User;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
|
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class WorkerGroupPage {
|
public class WorkerGroupPage {
|
||||||
|
|
||||||
private String sessionId;
|
private String sessionId;
|
||||||
|
|
||||||
public HttpResponse saveWorkerGroup(User loginUser, int id, String name, String addrList, String description,
|
public HttpResponse saveWorkerGroup(User loginUser, int id, String name, String addrList, String description, String otherParamsJson) {
|
||||||
String otherParamsJson) {
|
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put("loginUser", loginUser);
|
params.put("loginUser", loginUser);
|
||||||
params.put("id", id);
|
params.put("id", id);
|
||||||
|
|
@ -96,4 +96,5 @@ public class WorkerGroupPage {
|
||||||
return requestClient.get("/worker-groups/worker-address-list", headers, params);
|
return requestClient.get("/worker-groups/worker-address-list", headers, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,15 +34,14 @@ import java.util.Map;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class ExecutorPage {
|
public class ExecutorPage {
|
||||||
|
|
||||||
private String sessionId;
|
private String sessionId;
|
||||||
|
|
||||||
public HttpResponse startProcessInstance(User loginUser, long projectCode, long processDefinitionCode,
|
public HttpResponse startProcessInstance(User loginUser, long projectCode, long processDefinitionCode, String scheduleTime, FailureStrategy failureStrategy, WarningType warningType) {
|
||||||
String scheduleTime, FailureStrategy failureStrategy,
|
|
||||||
WarningType warningType) {
|
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put("loginUser", loginUser);
|
params.put("loginUser", loginUser);
|
||||||
params.put("processDefinitionCode", processDefinitionCode);
|
params.put("processDefinitionCode", processDefinitionCode);
|
||||||
|
|
@ -94,8 +93,7 @@ public class ExecutorPage {
|
||||||
return requestClient.post(url, headers, params);
|
return requestClient.post(url, headers, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
public HttpResponse executeTask(User loginUser, long projectCode, int processInstanceId, String startNodeList,
|
public HttpResponse executeTask(User loginUser, long projectCode, int processInstanceId, String startNodeList, TaskDependType taskDependType) {
|
||||||
TaskDependType taskDependType) {
|
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put("loginUser", loginUser);
|
params.put("loginUser", loginUser);
|
||||||
params.put("processInstanceId", processInstanceId);
|
params.put("processInstanceId", processInstanceId);
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,6 @@ import org.apache.dolphinscheduler.api.test.utils.RequestClient;
|
||||||
import org.apache.dolphinscheduler.common.enums.ReleaseState;
|
import org.apache.dolphinscheduler.common.enums.ReleaseState;
|
||||||
import org.apache.dolphinscheduler.dao.entity.User;
|
import org.apache.dolphinscheduler.dao.entity.User;
|
||||||
|
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -34,6 +32,9 @@ import java.util.Map;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||||
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class ProcessDefinitionPage {
|
public class ProcessDefinitionPage {
|
||||||
|
|
@ -106,8 +107,7 @@ public class ProcessDefinitionPage {
|
||||||
return requestClient.get(url, headers, params);
|
return requestClient.get(url, headers, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
public HttpResponse releaseProcessDefinition(User loginUser, long projectCode, long code,
|
public HttpResponse releaseProcessDefinition(User loginUser, long projectCode, long code, ReleaseState releaseState) {
|
||||||
ReleaseState releaseState) {
|
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put("loginUser", loginUser);
|
params.put("loginUser", loginUser);
|
||||||
params.put("code", code);
|
params.put("code", code);
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,13 @@
|
||||||
|
|
||||||
package org.apache.dolphinscheduler.api.test.pages.workflow;
|
package org.apache.dolphinscheduler.api.test.pages.workflow;
|
||||||
|
|
||||||
|
import org.apache.dolphinscheduler.api.enums.ExecuteType;
|
||||||
import org.apache.dolphinscheduler.api.test.core.Constants;
|
import org.apache.dolphinscheduler.api.test.core.Constants;
|
||||||
import org.apache.dolphinscheduler.api.test.entity.HttpResponse;
|
import org.apache.dolphinscheduler.api.test.entity.HttpResponse;
|
||||||
import org.apache.dolphinscheduler.api.test.utils.RequestClient;
|
import org.apache.dolphinscheduler.api.test.utils.RequestClient;
|
||||||
|
import org.apache.dolphinscheduler.common.enums.FailureStrategy;
|
||||||
|
import org.apache.dolphinscheduler.common.enums.TaskDependType;
|
||||||
|
import org.apache.dolphinscheduler.common.enums.WarningType;
|
||||||
import org.apache.dolphinscheduler.dao.entity.User;
|
import org.apache.dolphinscheduler.dao.entity.User;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
@ -30,6 +34,7 @@ import java.util.Map;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class ProcessInstancePage {
|
public class ProcessInstancePage {
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ import java.util.Map;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class SchedulerPage {
|
public class SchedulerPage {
|
||||||
|
|
@ -62,6 +63,7 @@ public class SchedulerPage {
|
||||||
return requestClient.post(url, headers, params);
|
return requestClient.post(url, headers, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public HttpResponse publishScheduleOnline(User loginUser, long projectCode, int scheduleId) {
|
public HttpResponse publishScheduleOnline(User loginUser, long projectCode, int scheduleId) {
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put("loginUser", loginUser);
|
params.put("loginUser", loginUser);
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,12 @@
|
||||||
|
|
||||||
package org.apache.dolphinscheduler.api.test.utils;
|
package org.apache.dolphinscheduler.api.test.utils;
|
||||||
|
|
||||||
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
|
|
||||||
import static com.fasterxml.jackson.databind.DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT;
|
import static com.fasterxml.jackson.databind.DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT;
|
||||||
import static com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES;
|
import static com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES;
|
||||||
import static com.fasterxml.jackson.databind.DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL;
|
import static com.fasterxml.jackson.databind.DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL;
|
||||||
import static com.fasterxml.jackson.databind.MapperFeature.REQUIRE_SETTERS_FOR_GETTERS;
|
import static com.fasterxml.jackson.databind.MapperFeature.REQUIRE_SETTERS_FOR_GETTERS;
|
||||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
|
||||||
|
|
||||||
import org.apache.dolphinscheduler.api.test.core.Constants;
|
import org.apache.dolphinscheduler.api.test.core.Constants;
|
||||||
|
|
||||||
|
|
@ -71,11 +72,8 @@ public class JSONUtils {
|
||||||
* can use static singleton, inject: just make sure to reuse!
|
* can use static singleton, inject: just make sure to reuse!
|
||||||
*/
|
*/
|
||||||
private static final ObjectMapper objectMapper =
|
private static final ObjectMapper objectMapper =
|
||||||
new ObjectMapper().configure(FAIL_ON_UNKNOWN_PROPERTIES, false)
|
new ObjectMapper().configure(FAIL_ON_UNKNOWN_PROPERTIES, false).configure(ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT, true).configure(READ_UNKNOWN_ENUM_VALUES_AS_NULL, true)
|
||||||
.configure(ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT, true)
|
.configure(REQUIRE_SETTERS_FOR_GETTERS, true).setTimeZone(TimeZone.getDefault()).setDateFormat(new SimpleDateFormat(Constants.YYYY_MM_DD_HH_MM_SS));
|
||||||
.configure(READ_UNKNOWN_ENUM_VALUES_AS_NULL, true)
|
|
||||||
.configure(REQUIRE_SETTERS_FOR_GETTERS, true).setTimeZone(TimeZone.getDefault())
|
|
||||||
.setDateFormat(new SimpleDateFormat(Constants.YYYY_MM_DD_HH_MM_SS));
|
|
||||||
|
|
||||||
private JSONUtils() {
|
private JSONUtils() {
|
||||||
throw new UnsupportedOperationException("Construct JSONUtils");
|
throw new UnsupportedOperationException("Construct JSONUtils");
|
||||||
|
|
|
||||||
|
|
@ -23,15 +23,6 @@ import org.apache.dolphinscheduler.api.test.core.Constants;
|
||||||
import org.apache.dolphinscheduler.api.test.entity.HttpResponse;
|
import org.apache.dolphinscheduler.api.test.entity.HttpResponse;
|
||||||
import org.apache.dolphinscheduler.api.test.entity.HttpResponseBody;
|
import org.apache.dolphinscheduler.api.test.entity.HttpResponseBody;
|
||||||
|
|
||||||
import org.apache.http.HttpEntity;
|
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
|
||||||
import org.apache.http.client.methods.HttpPost;
|
|
||||||
import org.apache.http.entity.ContentType;
|
|
||||||
import org.apache.http.entity.mime.MultipartEntityBuilder;
|
|
||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
|
||||||
import org.apache.http.impl.client.HttpClients;
|
|
||||||
import org.apache.http.message.BasicHeader;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
@ -48,6 +39,17 @@ import okhttp3.Request;
|
||||||
import okhttp3.RequestBody;
|
import okhttp3.RequestBody;
|
||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
|
|
||||||
|
import org.apache.http.HttpEntity;
|
||||||
|
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||||
|
import org.apache.http.client.methods.HttpPost;
|
||||||
|
import org.apache.http.entity.ContentType;
|
||||||
|
import org.apache.http.entity.mime.MultipartEntityBuilder;
|
||||||
|
import org.apache.http.impl.client.CloseableHttpClient;
|
||||||
|
import org.apache.http.impl.client.HttpClients;
|
||||||
|
import org.apache.http.message.BasicHeader;
|
||||||
|
import org.apache.http.util.EntityUtils;
|
||||||
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class RequestClient {
|
public class RequestClient {
|
||||||
|
|
||||||
|
|
@ -68,10 +70,10 @@ public class RequestClient {
|
||||||
|
|
||||||
log.info("GET request to {}, Headers: {}", requestUrl, headersBuilder);
|
log.info("GET request to {}, Headers: {}", requestUrl, headersBuilder);
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(requestUrl)
|
.url(requestUrl)
|
||||||
.headers(headersBuilder)
|
.headers(headersBuilder)
|
||||||
.get()
|
.get()
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
Response response = this.httpClient.newCall(request).execute();
|
Response response = this.httpClient.newCall(request).execute();
|
||||||
|
|
||||||
|
|
@ -119,10 +121,10 @@ public class RequestClient {
|
||||||
RequestBody requestBody = FormBody.create(MediaType.parse(Constants.REQUEST_CONTENT_TYPE), getParams(params));
|
RequestBody requestBody = FormBody.create(MediaType.parse(Constants.REQUEST_CONTENT_TYPE), getParams(params));
|
||||||
log.info("POST request to {}, Headers: {}, Params: {}", requestUrl, headersBuilder, params);
|
log.info("POST request to {}, Headers: {}, Params: {}", requestUrl, headersBuilder, params);
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.headers(headersBuilder)
|
.headers(headersBuilder)
|
||||||
.url(requestUrl)
|
.url(requestUrl)
|
||||||
.post(requestBody)
|
.post(requestBody)
|
||||||
.build();
|
.build();
|
||||||
Response response = this.httpClient.newCall(request).execute();
|
Response response = this.httpClient.newCall(request).execute();
|
||||||
int responseCode = response.code();
|
int responseCode = response.code();
|
||||||
HttpResponseBody responseData = null;
|
HttpResponseBody responseData = null;
|
||||||
|
|
@ -150,10 +152,10 @@ public class RequestClient {
|
||||||
RequestBody requestBody = FormBody.create(MediaType.parse(Constants.REQUEST_CONTENT_TYPE), getParams(params));
|
RequestBody requestBody = FormBody.create(MediaType.parse(Constants.REQUEST_CONTENT_TYPE), getParams(params));
|
||||||
log.info("PUT request to {}, Headers: {}, Params: {}", requestUrl, headersBuilder, params);
|
log.info("PUT request to {}, Headers: {}, Params: {}", requestUrl, headersBuilder, params);
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.headers(headersBuilder)
|
.headers(headersBuilder)
|
||||||
.url(requestUrl)
|
.url(requestUrl)
|
||||||
.put(requestBody)
|
.put(requestBody)
|
||||||
.build();
|
.build();
|
||||||
Response response = this.httpClient.newCall(request).execute();
|
Response response = this.httpClient.newCall(request).execute();
|
||||||
int responseCode = response.code();
|
int responseCode = response.code();
|
||||||
HttpResponseBody responseData = null;
|
HttpResponseBody responseData = null;
|
||||||
|
|
@ -169,17 +171,17 @@ public class RequestClient {
|
||||||
return httpResponse;
|
return httpResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CloseableHttpResponse postWithFile(String url, Map<String, String> headers, Map<String, Object> params,
|
public CloseableHttpResponse postWithFile(String url, Map<String, String> headers, Map<String, Object> params, File file) {
|
||||||
File file) {
|
|
||||||
try {
|
try {
|
||||||
Headers headersBuilder = Headers.of(headers);
|
Headers headersBuilder = Headers.of(headers);
|
||||||
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
|
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
|
||||||
builder.addTextBody("json", getParams(params), ContentType.MULTIPART_FORM_DATA);
|
builder.addTextBody("json", getParams(params), ContentType.MULTIPART_FORM_DATA);
|
||||||
builder.addBinaryBody(
|
builder.addBinaryBody(
|
||||||
"file",
|
"file",
|
||||||
new FileInputStream(file),
|
new FileInputStream(file),
|
||||||
ContentType.APPLICATION_OCTET_STREAM,
|
ContentType.APPLICATION_OCTET_STREAM,
|
||||||
file.getName());
|
file.getName()
|
||||||
|
);
|
||||||
HttpEntity multipart = builder.build();
|
HttpEntity multipart = builder.build();
|
||||||
String requestUrl = String.format("%s%s", Constants.DOLPHINSCHEDULER_API_URL, url);
|
String requestUrl = String.format("%s%s", Constants.DOLPHINSCHEDULER_API_URL, url);
|
||||||
log.info("POST request to {}, Headers: {}, Params: {}", requestUrl, headersBuilder, params);
|
log.info("POST request to {}, Headers: {}, Params: {}", requestUrl, headersBuilder, params);
|
||||||
|
|
@ -197,6 +199,7 @@ public class RequestClient {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
public HttpResponse delete(String url, Map<String, String> headers, Map<String, Object> params) {
|
public HttpResponse delete(String url, Map<String, String> headers, Map<String, Object> params) {
|
||||||
if (headers == null) {
|
if (headers == null) {
|
||||||
|
|
@ -211,10 +214,10 @@ public class RequestClient {
|
||||||
|
|
||||||
log.info("DELETE request to {}, Headers: {}, Params: {}", requestUrl, headersBuilder, params);
|
log.info("DELETE request to {}, Headers: {}, Params: {}", requestUrl, headersBuilder, params);
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.headers(headersBuilder)
|
.headers(headersBuilder)
|
||||||
.url(requestUrl)
|
.url(requestUrl)
|
||||||
.delete()
|
.delete()
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
Response response = this.httpClient.newCall(request).execute();
|
Response response = this.httpClient.newCall(request).execute();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ services:
|
||||||
dolphinscheduler:
|
dolphinscheduler:
|
||||||
image: apache/dolphinscheduler-standalone-server:ci
|
image: apache/dolphinscheduler-standalone-server:ci
|
||||||
environment:
|
environment:
|
||||||
|
MASTER_MAX_CPU_LOAD_AVG: 100
|
||||||
WORKER_TENANT_AUTO_CREATE: 'true'
|
WORKER_TENANT_AUTO_CREATE: 'true'
|
||||||
ports:
|
ports:
|
||||||
- "12345:12345"
|
- "12345:12345"
|
||||||
|
|
@ -28,7 +29,7 @@ services:
|
||||||
network:
|
network:
|
||||||
ipv4_address: 10.5.0.5
|
ipv4_address: 10.5.0.5
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
|
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 60s
|
timeout: 60s
|
||||||
retries: 120
|
retries: 120
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,14 @@ services:
|
||||||
dolphinscheduler:
|
dolphinscheduler:
|
||||||
image: apache/dolphinscheduler-standalone-server:ci
|
image: apache/dolphinscheduler-standalone-server:ci
|
||||||
environment:
|
environment:
|
||||||
|
MASTER_MAX_CPU_LOAD_AVG: 100
|
||||||
WORKER_TENANT_AUTO_CREATE: 'true'
|
WORKER_TENANT_AUTO_CREATE: 'true'
|
||||||
ports:
|
ports:
|
||||||
- "12345:12345"
|
- "12345:12345"
|
||||||
networks:
|
networks:
|
||||||
- api-test
|
- api-test
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
|
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 60s
|
timeout: 60s
|
||||||
retries: 120
|
retries: 120
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,14 @@ services:
|
||||||
dolphinscheduler:
|
dolphinscheduler:
|
||||||
image: apache/dolphinscheduler-standalone-server:ci
|
image: apache/dolphinscheduler-standalone-server:ci
|
||||||
environment:
|
environment:
|
||||||
|
MASTER_MAX_CPU_LOAD_AVG: 100
|
||||||
WORKER_TENANT_AUTO_CREATE: 'true'
|
WORKER_TENANT_AUTO_CREATE: 'true'
|
||||||
ports:
|
ports:
|
||||||
- "12345:12345"
|
- "12345:12345"
|
||||||
networks:
|
networks:
|
||||||
- api-test
|
- api-test
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
|
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 60s
|
timeout: 60s
|
||||||
retries: 120
|
retries: 120
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ services:
|
||||||
dolphinscheduler:
|
dolphinscheduler:
|
||||||
image: apache/dolphinscheduler-standalone-server:ci
|
image: apache/dolphinscheduler-standalone-server:ci
|
||||||
environment:
|
environment:
|
||||||
|
MASTER_MAX_CPU_LOAD_AVG: 100
|
||||||
WORKER_TENANT_AUTO_CREATE: 'true'
|
WORKER_TENANT_AUTO_CREATE: 'true'
|
||||||
ports:
|
ports:
|
||||||
- "12345:12345"
|
- "12345:12345"
|
||||||
|
|
@ -30,7 +31,7 @@ services:
|
||||||
- ./download-mysql.sh:/tmp/download-mysql.sh
|
- ./download-mysql.sh:/tmp/download-mysql.sh
|
||||||
entrypoint: [ 'bash', '-c', '/bin/bash /tmp/download-mysql.sh && /opt/dolphinscheduler/bin/start.sh && tail -f /dev/null' ]
|
entrypoint: [ 'bash', '-c', '/bin/bash /tmp/download-mysql.sh && /opt/dolphinscheduler/bin/start.sh && tail -f /dev/null' ]
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
|
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 60s
|
timeout: 60s
|
||||||
retries: 120
|
retries: 120
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,14 @@ services:
|
||||||
dolphinscheduler:
|
dolphinscheduler:
|
||||||
image: apache/dolphinscheduler-standalone-server:ci
|
image: apache/dolphinscheduler-standalone-server:ci
|
||||||
environment:
|
environment:
|
||||||
|
MASTER_MAX_CPU_LOAD_AVG: 100
|
||||||
WORKER_TENANT_AUTO_CREATE: 'true'
|
WORKER_TENANT_AUTO_CREATE: 'true'
|
||||||
ports:
|
ports:
|
||||||
- "12345:12345"
|
- "12345:12345"
|
||||||
networks:
|
networks:
|
||||||
- api-test
|
- api-test
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
|
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 60s
|
timeout: 60s
|
||||||
retries: 120
|
retries: 120
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,14 @@ services:
|
||||||
dolphinscheduler:
|
dolphinscheduler:
|
||||||
image: apache/dolphinscheduler-standalone-server:ci
|
image: apache/dolphinscheduler-standalone-server:ci
|
||||||
environment:
|
environment:
|
||||||
|
MASTER_MAX_CPU_LOAD_AVG: 100
|
||||||
WORKER_TENANT_AUTO_CREATE: 'true'
|
WORKER_TENANT_AUTO_CREATE: 'true'
|
||||||
ports:
|
ports:
|
||||||
- "12345:12345"
|
- "12345:12345"
|
||||||
networks:
|
networks:
|
||||||
- api-test
|
- api-test
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
|
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 60s
|
timeout: 60s
|
||||||
retries: 120
|
retries: 120
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,14 @@ services:
|
||||||
dolphinscheduler:
|
dolphinscheduler:
|
||||||
image: apache/dolphinscheduler-standalone-server:ci
|
image: apache/dolphinscheduler-standalone-server:ci
|
||||||
environment:
|
environment:
|
||||||
|
MASTER_MAX_CPU_LOAD_AVG: 100
|
||||||
WORKER_TENANT_AUTO_CREATE: 'true'
|
WORKER_TENANT_AUTO_CREATE: 'true'
|
||||||
ports:
|
ports:
|
||||||
- "12345:12345"
|
- "12345:12345"
|
||||||
networks:
|
networks:
|
||||||
- api-test
|
- api-test
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
|
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 60s
|
timeout: 60s
|
||||||
retries: 120
|
retries: 120
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,5 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||||
@TestMethodOrder(OrderAnnotation.class)
|
@TestMethodOrder(OrderAnnotation.class)
|
||||||
@ExtendWith(DolphinSchedulerExtension.class)
|
@ExtendWith(DolphinSchedulerExtension.class)
|
||||||
public @interface DolphinScheduler {
|
public @interface DolphinScheduler {
|
||||||
|
|
||||||
String[] composeFiles();
|
String[] composeFiles();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,18 +27,17 @@ import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.extension.AfterAllCallback;
|
import org.junit.jupiter.api.extension.AfterAllCallback;
|
||||||
import org.junit.jupiter.api.extension.BeforeAllCallback;
|
import org.junit.jupiter.api.extension.BeforeAllCallback;
|
||||||
import org.junit.jupiter.api.extension.ExtensionContext;
|
import org.junit.jupiter.api.extension.ExtensionContext;
|
||||||
import org.testcontainers.containers.ContainerState;
|
import org.slf4j.Logger;
|
||||||
import org.testcontainers.containers.DockerComposeContainer;
|
import org.testcontainers.containers.DockerComposeContainer;
|
||||||
import org.testcontainers.containers.wait.strategy.Wait;
|
import org.testcontainers.containers.wait.strategy.Wait;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
final class DolphinSchedulerExtension implements BeforeAllCallback, AfterAllCallback {
|
final class DolphinSchedulerExtension implements BeforeAllCallback, AfterAllCallback {
|
||||||
|
|
||||||
private final boolean localMode = Objects.equals(System.getProperty("local"), "true");
|
private final boolean localMode = Objects.equals(System.getProperty("local"), "true");
|
||||||
|
|
||||||
private final String serviceName = "dolphinscheduler_1";
|
private final String serviceName = "dolphinscheduler_1";
|
||||||
|
|
@ -50,9 +49,6 @@ final class DolphinSchedulerExtension implements BeforeAllCallback, AfterAllCall
|
||||||
if (!localMode) {
|
if (!localMode) {
|
||||||
compose = createDockerCompose(context);
|
compose = createDockerCompose(context);
|
||||||
compose.start();
|
compose.start();
|
||||||
compose.getContainerByServiceName(serviceName)
|
|
||||||
.map(ContainerState::isHealthy)
|
|
||||||
.orElseThrow(() -> new IllegalStateException("DolphinScheduler service is not healthy"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -67,18 +63,17 @@ final class DolphinSchedulerExtension implements BeforeAllCallback, AfterAllCall
|
||||||
final Class<?> clazz = context.getRequiredTestClass();
|
final Class<?> clazz = context.getRequiredTestClass();
|
||||||
final DolphinScheduler annotation = clazz.getAnnotation(DolphinScheduler.class);
|
final DolphinScheduler annotation = clazz.getAnnotation(DolphinScheduler.class);
|
||||||
final List<File> files = Stream.of(annotation.composeFiles())
|
final List<File> files = Stream.of(annotation.composeFiles())
|
||||||
.map(it -> DolphinScheduler.class.getClassLoader().getResource(it))
|
.map(it -> DolphinScheduler.class.getClassLoader().getResource(it))
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.map(URL::getPath)
|
.map(URL::getPath)
|
||||||
.map(File::new)
|
.map(File::new)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
compose = new DockerComposeContainer<>(files)
|
compose = new DockerComposeContainer<>(files)
|
||||||
.withPull(true)
|
.withPull(true)
|
||||||
.withTailChildContainers(true)
|
.withTailChildContainers(true)
|
||||||
.withLogConsumer(serviceName, outputFrame -> log.info(outputFrame.getUtf8String()))
|
.withLogConsumer(serviceName, outputFrame -> log.info(outputFrame.getUtf8String()))
|
||||||
.waitingFor(serviceName, Wait.forHealthcheck()
|
.waitingFor(serviceName, Wait.forHealthcheck().withStartupTimeout(Duration.ofSeconds(Constants.DOCKER_COMPOSE_DEFAULT_TIMEOUT)));
|
||||||
.withStartupTimeout(Duration.ofSeconds(Constants.DOCKER_COMPOSE_DEFAULT_TIMEOUT)));
|
|
||||||
|
|
||||||
return compose;
|
return compose;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,14 +19,22 @@ package org.apache.dolphinscheduler.api;
|
||||||
|
|
||||||
import org.apache.dolphinscheduler.api.metrics.ApiServerMetrics;
|
import org.apache.dolphinscheduler.api.metrics.ApiServerMetrics;
|
||||||
import org.apache.dolphinscheduler.common.CommonConfiguration;
|
import org.apache.dolphinscheduler.common.CommonConfiguration;
|
||||||
|
import org.apache.dolphinscheduler.common.enums.PluginType;
|
||||||
import org.apache.dolphinscheduler.common.thread.DefaultUncaughtExceptionHandler;
|
import org.apache.dolphinscheduler.common.thread.DefaultUncaughtExceptionHandler;
|
||||||
import org.apache.dolphinscheduler.dao.DaoConfiguration;
|
import org.apache.dolphinscheduler.dao.DaoConfiguration;
|
||||||
import org.apache.dolphinscheduler.dao.PluginDao;
|
import org.apache.dolphinscheduler.dao.PluginDao;
|
||||||
|
import org.apache.dolphinscheduler.dao.entity.PluginDefine;
|
||||||
import org.apache.dolphinscheduler.plugin.datasource.api.plugin.DataSourceProcessorProvider;
|
import org.apache.dolphinscheduler.plugin.datasource.api.plugin.DataSourceProcessorProvider;
|
||||||
import org.apache.dolphinscheduler.plugin.storage.api.StorageConfiguration;
|
import org.apache.dolphinscheduler.plugin.storage.api.StorageConfiguration;
|
||||||
|
import org.apache.dolphinscheduler.plugin.task.api.TaskChannelFactory;
|
||||||
import org.apache.dolphinscheduler.plugin.task.api.TaskPluginManager;
|
import org.apache.dolphinscheduler.plugin.task.api.TaskPluginManager;
|
||||||
import org.apache.dolphinscheduler.registry.api.RegistryConfiguration;
|
import org.apache.dolphinscheduler.registry.api.RegistryConfiguration;
|
||||||
import org.apache.dolphinscheduler.service.ServiceConfiguration;
|
import org.apache.dolphinscheduler.service.ServiceConfiguration;
|
||||||
|
import org.apache.dolphinscheduler.spi.params.PluginParamsTransfer;
|
||||||
|
import org.apache.dolphinscheduler.spi.params.base.PluginParams;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
|
@ -60,7 +68,17 @@ public class ApiApplicationServer {
|
||||||
@EventListener
|
@EventListener
|
||||||
public void run(ApplicationReadyEvent readyEvent) {
|
public void run(ApplicationReadyEvent readyEvent) {
|
||||||
log.info("Received spring application context ready event will load taskPlugin and write to DB");
|
log.info("Received spring application context ready event will load taskPlugin and write to DB");
|
||||||
|
// install task plugin
|
||||||
|
TaskPluginManager.loadPlugin();
|
||||||
DataSourceProcessorProvider.initialize();
|
DataSourceProcessorProvider.initialize();
|
||||||
TaskPluginManager.loadTaskPlugin();
|
for (Map.Entry<String, TaskChannelFactory> entry : TaskPluginManager.getTaskChannelFactoryMap().entrySet()) {
|
||||||
|
String taskPluginName = entry.getKey();
|
||||||
|
TaskChannelFactory taskChannelFactory = entry.getValue();
|
||||||
|
List<PluginParams> params = taskChannelFactory.getParams();
|
||||||
|
String paramsJson = PluginParamsTransfer.transferParamsToJson(params);
|
||||||
|
|
||||||
|
PluginDefine pluginDefine = new PluginDefine(taskPluginName, PluginType.TASK.getDesc(), paramsJson);
|
||||||
|
pluginDao.addOrUpdatePluginDefine(pluginDefine);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ import org.apache.dolphinscheduler.common.enums.AuditOperationType;
|
||||||
import org.apache.dolphinscheduler.common.enums.ReleaseState;
|
import org.apache.dolphinscheduler.common.enums.ReleaseState;
|
||||||
import org.apache.dolphinscheduler.dao.entity.AuditLog;
|
import org.apache.dolphinscheduler.dao.entity.AuditLog;
|
||||||
import org.apache.dolphinscheduler.dao.entity.User;
|
import org.apache.dolphinscheduler.dao.entity.User;
|
||||||
|
import org.apache.dolphinscheduler.spi.enums.ResourceType;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -171,13 +172,23 @@ public class OperatorUtils {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isUdfResource(Map<String, Object> paramsMap) {
|
||||||
|
ResourceType resourceType = (ResourceType) paramsMap.get(Constants.STRING_PLUGIN_PARAM_TYPE);
|
||||||
|
return resourceType != null && resourceType.equals(ResourceType.UDF);
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isFolder(String name) {
|
public static boolean isFolder(String name) {
|
||||||
return name != null && name.endsWith("/");
|
return name != null && name.endsWith("/");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getFileAuditObject(AuditType auditType, Map<String, Object> paramsMap, String name) {
|
public static String getFileAuditObject(AuditType auditType, Map<String, Object> paramsMap, String name) {
|
||||||
|
boolean isUdfResource = isUdfResource(paramsMap);
|
||||||
boolean isFolder = auditType == AuditType.FOLDER_CREATE || isFolder(name);
|
boolean isFolder = auditType == AuditType.FOLDER_CREATE || isFolder(name);
|
||||||
return isFolder ? AuditModelType.FOLDER.getName() : AuditModelType.FILE.getName();
|
if (isUdfResource) {
|
||||||
|
return isFolder ? AuditModelType.UDF_FOLDER.getName() : AuditModelType.UDF_FILE.getName();
|
||||||
|
} else {
|
||||||
|
return isFolder ? AuditModelType.FOLDER.getName() : AuditModelType.FILE.getName();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,5 +43,6 @@ public final class AuditLogConstants {
|
||||||
public static final String FILE_NAME = "fileName";
|
public static final String FILE_NAME = "fileName";
|
||||||
public static final String FULL_NAME = "fullName";
|
public static final String FULL_NAME = "fullName";
|
||||||
public static final String FUNC_NAME = "funcName";
|
public static final String FUNC_NAME = "funcName";
|
||||||
|
public static final String UDF_FUNC_ID = "udfFuncId";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.
|
||||||
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.ENVIRONMENT_CODE;
|
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.ENVIRONMENT_CODE;
|
||||||
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.FILE_NAME;
|
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.FILE_NAME;
|
||||||
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.FULL_NAME;
|
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.FULL_NAME;
|
||||||
|
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.FUNC_NAME;
|
||||||
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.ID;
|
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.ID;
|
||||||
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.NAME;
|
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.NAME;
|
||||||
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.PRIORITY;
|
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.PRIORITY;
|
||||||
|
|
@ -33,6 +34,7 @@ import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.
|
||||||
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.PROCESS_INSTANCE_IDS;
|
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.PROCESS_INSTANCE_IDS;
|
||||||
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.QUEUE_ID;
|
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.QUEUE_ID;
|
||||||
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.TYPE;
|
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.TYPE;
|
||||||
|
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.UDF_FUNC_ID;
|
||||||
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.USER_ID;
|
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.USER_ID;
|
||||||
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.VERSION;
|
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.VERSION;
|
||||||
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.WORKFLOW_DEFINITION_CODE;
|
import static org.apache.dolphinscheduler.api.audit.constants.AuditLogConstants.WORKFLOW_DEFINITION_CODE;
|
||||||
|
|
@ -53,6 +55,7 @@ import static org.apache.dolphinscheduler.common.enums.AuditModelType.TASK_GROUP
|
||||||
import static org.apache.dolphinscheduler.common.enums.AuditModelType.TASK_INSTANCE;
|
import static org.apache.dolphinscheduler.common.enums.AuditModelType.TASK_INSTANCE;
|
||||||
import static org.apache.dolphinscheduler.common.enums.AuditModelType.TENANT;
|
import static org.apache.dolphinscheduler.common.enums.AuditModelType.TENANT;
|
||||||
import static org.apache.dolphinscheduler.common.enums.AuditModelType.TOKEN;
|
import static org.apache.dolphinscheduler.common.enums.AuditModelType.TOKEN;
|
||||||
|
import static org.apache.dolphinscheduler.common.enums.AuditModelType.UDF_FUNCTION;
|
||||||
import static org.apache.dolphinscheduler.common.enums.AuditModelType.USER;
|
import static org.apache.dolphinscheduler.common.enums.AuditModelType.USER;
|
||||||
import static org.apache.dolphinscheduler.common.enums.AuditModelType.WORKER_GROUP;
|
import static org.apache.dolphinscheduler.common.enums.AuditModelType.WORKER_GROUP;
|
||||||
import static org.apache.dolphinscheduler.common.enums.AuditModelType.YARN_QUEUE;
|
import static org.apache.dolphinscheduler.common.enums.AuditModelType.YARN_QUEUE;
|
||||||
|
|
@ -93,6 +96,7 @@ import org.apache.dolphinscheduler.api.audit.operator.impl.TaskGroupAuditOperato
|
||||||
import org.apache.dolphinscheduler.api.audit.operator.impl.TaskInstancesAuditOperatorImpl;
|
import org.apache.dolphinscheduler.api.audit.operator.impl.TaskInstancesAuditOperatorImpl;
|
||||||
import org.apache.dolphinscheduler.api.audit.operator.impl.TenantAuditOperatorImpl;
|
import org.apache.dolphinscheduler.api.audit.operator.impl.TenantAuditOperatorImpl;
|
||||||
import org.apache.dolphinscheduler.api.audit.operator.impl.TokenAuditOperatorImpl;
|
import org.apache.dolphinscheduler.api.audit.operator.impl.TokenAuditOperatorImpl;
|
||||||
|
import org.apache.dolphinscheduler.api.audit.operator.impl.UdfFunctionAuditOperatorImpl;
|
||||||
import org.apache.dolphinscheduler.api.audit.operator.impl.UserAuditOperatorImpl;
|
import org.apache.dolphinscheduler.api.audit.operator.impl.UserAuditOperatorImpl;
|
||||||
import org.apache.dolphinscheduler.api.audit.operator.impl.WorkerGroupAuditOperatorImpl;
|
import org.apache.dolphinscheduler.api.audit.operator.impl.WorkerGroupAuditOperatorImpl;
|
||||||
import org.apache.dolphinscheduler.api.audit.operator.impl.YarnQueueAuditOperatorImpl;
|
import org.apache.dolphinscheduler.api.audit.operator.impl.YarnQueueAuditOperatorImpl;
|
||||||
|
|
@ -159,6 +163,13 @@ public enum AuditType {
|
||||||
FILE_UPDATE(FILE, UPDATE, ResourceAuditOperatorImpl.class, new String[]{TYPE, FILE_NAME, ALIAS}, new String[]{}),
|
FILE_UPDATE(FILE, UPDATE, ResourceAuditOperatorImpl.class, new String[]{TYPE, FILE_NAME, ALIAS}, new String[]{}),
|
||||||
FILE_DELETE(FILE, DELETE, ResourceAuditOperatorImpl.class, new String[]{FULL_NAME}, new String[]{}),
|
FILE_DELETE(FILE, DELETE, ResourceAuditOperatorImpl.class, new String[]{FULL_NAME}, new String[]{}),
|
||||||
|
|
||||||
|
UDF_FUNCTION_CREATE(UDF_FUNCTION, CREATE, UdfFunctionAuditOperatorImpl.class, new String[]{FUNC_NAME},
|
||||||
|
new String[]{}),
|
||||||
|
UDF_FUNCTION_UPDATE(UDF_FUNCTION, UPDATE, UdfFunctionAuditOperatorImpl.class, new String[]{FUNC_NAME},
|
||||||
|
new String[]{}),
|
||||||
|
UDF_FUNCTION_DELETE(UDF_FUNCTION, DELETE, UdfFunctionAuditOperatorImpl.class, new String[]{UDF_FUNC_ID},
|
||||||
|
new String[]{}),
|
||||||
|
|
||||||
TASK_GROUP_CREATE(TASK_GROUP, CREATE, TaskGroupAuditOperatorImpl.class, new String[]{NAME}, new String[]{}),
|
TASK_GROUP_CREATE(TASK_GROUP, CREATE, TaskGroupAuditOperatorImpl.class, new String[]{NAME}, new String[]{}),
|
||||||
TASK_GROUP_UPDATE(TASK_GROUP, UPDATE, TaskGroupAuditOperatorImpl.class, new String[]{}, new String[]{ID}),
|
TASK_GROUP_UPDATE(TASK_GROUP, UPDATE, TaskGroupAuditOperatorImpl.class, new String[]{}, new String[]{ID}),
|
||||||
TASK_GROUP_CLOSE(TASK_GROUP, CLOSE, TaskGroupAuditOperatorImpl.class, new String[]{ID}, new String[]{}),
|
TASK_GROUP_CLOSE(TASK_GROUP, CLOSE, TaskGroupAuditOperatorImpl.class, new String[]{ID}, new String[]{}),
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
/*
|
||||||
|
* 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.audit.operator.impl;
|
||||||
|
|
||||||
|
import org.apache.dolphinscheduler.api.audit.operator.BaseAuditOperator;
|
||||||
|
import org.apache.dolphinscheduler.dao.entity.UdfFunc;
|
||||||
|
import org.apache.dolphinscheduler.dao.mapper.UdfFuncMapper;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.math.NumberUtils;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class UdfFunctionAuditOperatorImpl extends BaseAuditOperator {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UdfFuncMapper udfFuncMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getObjectNameFromIdentity(Object identity) {
|
||||||
|
int objId = NumberUtils.toInt(identity.toString(), -1);
|
||||||
|
if (objId == -1) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
UdfFunc obj = udfFuncMapper.selectUdfById(objId);
|
||||||
|
return obj == null ? "" : obj.getFuncName();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue