Compare commits

...

34 Commits

Author SHA1 Message Date
Wenjun Ruan 8338815a8c
Force check ci on prapare/release branch (#16216) 2024-07-01 09:20:56 +08:00
xiangzihao 565a91790a
[Chore] [CI] Add api-test and e2e-test to spotless check (#16242) 2024-06-30 22:39:12 +08:00
Wenjun Ruan 177a001392
Remove unused dependentResult in TaskInstance (#16236) 2024-06-30 18:56:53 +08:00
blink d42ac96c55
[Fix-16211] Remove ExecutePath in buildJarCommand to fix Java Task in Jar Mode (#16238) 2024-06-29 14:34:30 +08:00
xiangzihao 225e969d2d
[DSIP-51][Task] Remove unused pigeon task plugin (#16219) 2024-06-28 09:51:02 +08:00
Wenjun Ruan 0e2d0fb81e
[Fix-16228] Fix E2E health check url is not correct (#16227) 2024-06-27 21:49:21 +08:00
Wenjun Ruan 46eff34e69
[Fix-16224] Add Shell using file E2E case (#16220)
* Add Shell E2E case

* Add shell using resource file e2e case

* Upgrade checkout from v2 to v4

* Change interval to 500ms

* Upgrade actions/upload-artifact

---------

Co-authored-by: xiangzihao <460888207@qq.com>
2024-06-27 16:04:03 +08:00
Wenjun Ruan 02bef74296
Fix worker overload will casue task failed (#16221) 2024-06-27 13:37:13 +08:00
xiangzihao e8566818b0
[DSIP-50][UDF Manage] Remove unused udf manage function (#16212)
* Remove unused udf manage function
2024-06-26 21:08:48 +08:00
xiangzihao c7a0994fb0
[Chore] Add mergeable check (#16217)
* add mergeable check
2024-06-26 20:05:49 +08:00
xiangzihao c3d3a14cfc
[Fix-16174] Incorrect cluster installation guide. (#16208) 2024-06-26 10:34:37 +08:00
xiangzihao d0229663f9
improve pr title check (#16213) 2024-06-25 21:16:07 +08:00
Wenjun Ruan ec6a3e0727
[DSIP-46] Unify the logic task params data structure between front-end and back-end (#16193) 2024-06-25 13:32:13 +08:00
Wenjun Ruan f69e06408f
Remove unused SQLIntegrityConstraintViolationException in JdbcOperator (#16200)
Co-authored-by: xiangzihao <460888207@qq.com>
2024-06-25 10:18:42 +08:00
Wenjun Ruan b34fe46044
Fix task cannot use workflow's environment (#16199) 2024-06-24 20:27:25 +08:00
xiangzihao 9a823c4b98
bump up owasp version (#16187) 2024-06-24 15:08:51 +08:00
Wenjun Ruan f0e0395b36
[Chore] Use testcontainer origin exposed port rather than generate random port (#16195) 2024-06-21 22:19:54 +08:00
JohnHuang 4a76a07c9c
[Improvement][Helm] Make configmap of api/master/worker/alert configuration (#16058)
Update deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml

* Update deploy/kubernetes/dolphinscheduler/values.yaml
2024-06-21 16:37:19 +08:00
Wenjun Ruan 2ab5f7dd54
Increase zk connect timeout (#16180) 2024-06-21 15:58:48 +08:00
Wenjun Ruan 3f3f0cd4cb
[Chore] Disable composite indicator (#16172) 2024-06-20 10:09:02 +08:00
tinglink 9bfc10d348
Fix admin login tenant unspecified issue after upgrade to v3.2.1 (#16064) 2024-06-19 16:31:39 +08:00
Wenjun Ruan e18ed376ac
Fix CommandDaoImplTest might failed (#16175) 2024-06-19 15:09:01 +08:00
Wenjun Ruan 6644abd5f7
Fix HdfsStorageOperatorTest NPE (#16178) 2024-06-19 14:32:21 +08:00
Wenjun Ruan 4c5dacf4ac
Fix DelayEntryTest might failed (#16176)
Co-authored-by: xiangzihao <460888207@qq.com>
2024-06-19 13:42:32 +08:00
Wenjun Ruan 5df4b1cbc3
Fix condition task will cause workflow instance failed (#16152) 2024-06-19 11:28:35 +08:00
Gallardot 17fdd7a152
[Chore] Add issue link tempate for IDEA (#16158)
* chore: add issue link tempate for IDEA

Signed-off-by: Gallardot <gallardot@apache.org>

* chore: add issue link tempate for IDEA

Signed-off-by: Gallardot <gallardot@apache.org>

---------

Signed-off-by: Gallardot <gallardot@apache.org>
Co-authored-by: xiangzihao <460888207@qq.com>
2024-06-18 21:02:15 +08:00
xiangzihao 469c19be08
[CI] Fix ci auto assign error (#16171)
* fix ci auto assign error
* labeler and codeowner improvement
2024-06-18 11:13:03 +08:00
caishunfeng fc927cea73
update code owner (#16163)
Co-authored-by: xiangzihao <460888207@qq.com>
2024-06-17 20:35:27 +08:00
xiangzihao a472d68c5f
[Chore ] CI add auto-assign-action (#16165)
* add .github/actions/auto-assign-action

* add auto assign-action to fix ci error
2024-06-17 17:16:24 +08:00
xiangzihao 6736115f58
[Chore] Improve ci check (#16161)
* improve ci check
2024-06-17 16:18:45 +08:00
Wenjun Ruan edeb1b2458
[DSIP-45] Polish the Storage SPI (#16141) 2024-06-17 15:24:56 +08:00
Cancai Cai 61a6bd0b30
[Fix] Fix typo: tpc -> tcp (#16160) 2024-06-17 12:06:50 +08:00
Cancai Cai 834c320d72
[Imporve][Master] Refine the doselect annotation of the distribution policy (#16149) 2024-06-14 11:57:21 +08:00
xiangzihao 8d0202ccaf
[CI][UT] Fix flaky unit test (#16151) 2024-06-14 10:47:29 +08:00
612 changed files with 11775 additions and 19845 deletions

View File

@ -46,7 +46,8 @@ 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

45
.github/CODEOWNERS vendored
View File

@ -16,30 +16,39 @@
# #
/.github/ @SbloodyS /.github/ @SbloodyS
/deploy/ @caishunfeng /deploy/ @SbloodyS
/dolphinscheduler-alert/ @caishunfeng /dolphinscheduler-alert/ @SbloodyS
/dolphinscheduler-e2e/ @SbloodyS
/dolphinscheduler-api-test/ @SbloodyS
/dolphinscheduler-registry/ @caishunfeng @ruanwenjun
/dolphinscheduler-api/ @caishunfeng @SbloodyS /dolphinscheduler-api/ @caishunfeng @SbloodyS
/dolphinscheduler-dao/ @caishunfeng @SbloodyS /dolphinscheduler-api-test/ @SbloodyS
/dolphinscheduler-dao/src/main/resources/sql/ @EricGao888 /dolphinscheduler-authentication/ @ruanwenjun
/dolphinscheduler-common/ @caishunfeng /dolphinscheduler-bom/ @ruanwenjun
/dolphinscheduler-standalone-server/ @caishunfeng /dolphinscheduler-common/ @SbloodyS
/dolphinscheduler-datasource-plugin/ @caishunfeng /dolphinscheduler-dao/ @SbloodyS @ruanwenjun
/dolphinscheduler-dist/ @caishunfeng /dolphinscheduler-dao-plugin/ @SbloodyS @ruanwenjun
/dolphinscheduler-meter/ @caishunfeng @ruanwenjun @EricGao888 /dolphinscheduler-data-quality/ @SbloodyS
/dolphinscheduler-scheduler-plugin/ @caishunfeng /dolphinscheduler-datasource-plugin/ @SbloodyS
/dolphinscheduler-dist/ @SbloodyS
/dolphinscheduler-e2e/ @SbloodyS
/dolphinscheduler-extract/ @ruanwenjun
/dolphinscheduler-master/ @caishunfeng @SbloodyS @ruanwenjun /dolphinscheduler-master/ @caishunfeng @SbloodyS @ruanwenjun
/dolphinscheduler-worker/ @caishunfeng @SbloodyS @ruanwenjun /dolphinscheduler-meter/ @ruanwenjun @EricGao888
/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
/docs/ @EricGao888 /dolphinscheduler-worker/ @caishunfeng @SbloodyS @ruanwenjun
/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/ @caishunfeng /style/ @SbloodyS @EricGao888

View File

@ -31,4 +31,7 @@ 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
.github/actions/auto-assign-action vendored Submodule

@ -0,0 +1 @@
Subproject commit 288f36f8cea1dded676b9c4477a64ff91e50c104

View File

@ -15,12 +15,8 @@
# limitations under the License. # limitations under the License.
# #
job.trigger.url=http://%s/tjs/coredefine/coredefine.ajax # Set addAssignees to 'author' to set the PR creator as the assignee.
job.trigger.post.body=action=datax_action&emethod=trigger_fullbuild_task addAssignees: author
job.cancel.post.body=action=core_action&event_submit_do_cancel_task=y&taskid=%s # Enable it to run on drafts
runOnDraft: true
job.status.url=http://%s/tjs/config/config.ajax?action=collection_action&emethod=get_task_status
job.status.post.body={\n taskid: %s\n, log: false }
job.logs.fetch.url=ws://%s/tjs/download/logfeedback?logtype=full&collection=%s&taskid=%s

View File

@ -18,37 +18,54 @@
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-master/**/*'
- 'dolphinscheduler-registry/**/*'
- 'dolphinscheduler-extract/**/*' - 'dolphinscheduler-extract/**/*'
- 'dolphinscheduler-master/**/*'
- 'dolphinscheduler-meter/**/*'
- 'dolphinscheduler-microbench/**/*'
- 'dolphinscheduler-registry/**/*'
- '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/**/*'] - any: ['deploy/docker/**/*']
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: ['dolphinscheduler-api-test/**/*'] - any: ['**/test/**/*']
kubernetes:
- any: ['deploy/kubernetes/**/*']

72
.github/boring-cyborg.yml vendored Normal file
View File

@ -0,0 +1,72 @@
################################################################################
# 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!

View File

@ -20,6 +20,8 @@ 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
@ -35,7 +37,7 @@ jobs:
outputs: outputs:
not-ignore: ${{ steps.filter.outputs.not-ignore }} not-ignore: ${{ steps.filter.outputs.not-ignore }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721 - uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
id: filter id: filter
with: with:
@ -49,7 +51,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 20 timeout-minutes: 20
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with: with:
submodules: true submodules: true
- name: Sanity Check - name: Sanity Check
@ -73,7 +75,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@v2 - uses: actions/upload-artifact@v4
name: Upload Docker Images name: Upload Docker Images
with: with:
name: standalone-image name: standalone-image
@ -104,7 +106,7 @@ jobs:
env: env:
RECORDING_PATH: /tmp/recording-${{ matrix.case.name }} RECORDING_PATH: /tmp/recording-${{ matrix.case.name }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with: with:
submodules: true submodules: true
- name: Cache local Maven repository - name: Cache local Maven repository
@ -113,7 +115,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@v2 - uses: actions/download-artifact@v4
name: Download Docker Images name: Download Docker Images
with: with:
name: standalone-image name: standalone-image
@ -125,9 +127,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=false \ -Dspotless.skip=true \
-Dtest=${{ matrix.case.class }} test -Dtest=${{ matrix.case.class }} test
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v4
if: always() if: always()
name: Upload Recording name: Upload Recording
with: with:

View File

@ -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@v2 - uses: actions/checkout@v4
- 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@v2 - uses: actions/checkout@v4
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@v2 - uses: actions/upload-artifact@v4
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@v2 - uses: actions/checkout@v4
with: with:
submodules: true submodules: true
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v4
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@v2 uses: actions/download-artifact@v4
with: with:
name: binary-package-8 name: binary-package-8
path: dolphinscheduler/dev path: dolphinscheduler/dev

View File

@ -23,6 +23,8 @@ 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 }}

View File

@ -30,7 +30,7 @@ jobs:
timeout-minutes: 10 timeout-minutes: 10
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- 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@v2 - uses: actions/checkout@v4
- 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@v2 - uses: actions/checkout@v4
- 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@v2 - uses: actions/checkout@v4
- 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@v2 - uses: actions/checkout@v4
with: with:
submodules: true submodules: true
- name: Generating helm-doc - name: Generating helm-doc

View File

@ -20,6 +20,8 @@ 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
@ -35,7 +37,7 @@ jobs:
outputs: outputs:
not-ignore: ${{ steps.filter.outputs.not-ignore }} not-ignore: ${{ steps.filter.outputs.not-ignore }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721 - uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
id: filter id: filter
with: with:
@ -49,7 +51,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 20 timeout-minutes: 20
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with: with:
submodules: true submodules: true
- name: Build Image - name: Build Image

View File

@ -20,6 +20,8 @@ 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
@ -35,7 +37,7 @@ jobs:
outputs: outputs:
not-ignore: ${{ steps.filter.outputs.not-ignore }} not-ignore: ${{ steps.filter.outputs.not-ignore }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721 - uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
id: filter id: filter
with: with:
@ -49,7 +51,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 20 timeout-minutes: 20
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with: with:
submodules: true submodules: true
- name: Sanity Check - name: Sanity Check
@ -74,7 +76,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@v2 - uses: actions/upload-artifact@v4
name: Upload Docker Images name: Upload Docker Images
with: with:
name: standalone-image name: standalone-image
@ -114,20 +116,18 @@ 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@v2 - uses: actions/checkout@v4
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@v2 - uses: actions/download-artifact@v4
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@v2 - uses: actions/upload-artifact@v4
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@v2 - uses: actions/checkout@v4
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@v2 - uses: actions/download-artifact@v4
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@v2 - uses: actions/upload-artifact@v4
if: always() if: always()
name: Upload Recording name: Upload Recording
with: with:

View File

@ -20,7 +20,8 @@ name: Frontend
on: on:
push: push:
branches: branches:
- dev - '[0-9]+.[0-9]+.[0-9]+-prepare'
- '[0-9]+.[0-9]+.[0-9]+-release'
paths: paths:
- '.github/workflows/frontend.yml' - '.github/workflows/frontend.yml'
- 'dolphinscheduler-ui/**' - 'dolphinscheduler-ui/**'
@ -41,7 +42,7 @@ jobs:
outputs: outputs:
not-ignore: ${{ steps.filter.outputs.not-ignore }} not-ignore: ${{ steps.filter.outputs.not-ignore }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721 - uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
id: filter id: filter
with: with:
@ -58,7 +59,7 @@ jobs:
matrix: matrix:
os: [ ubuntu-latest, macos-latest ] os: [ ubuntu-latest, macos-latest ]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with: with:
submodules: true submodules: true
- if: matrix.os == 'ubuntu-latest' - if: matrix.os == 'ubuntu-latest'
@ -82,7 +83,7 @@ jobs:
needs: [ build, paths-filter ] needs: [ build, paths-filter ]
if: always() if: always()
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- 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

View File

@ -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@v2 uses: actions/checkout@v4
with: with:
persist-credentials: false persist-credentials: false
submodules: true submodules: true

View File

@ -14,65 +14,50 @@
# 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: 30 timeout-minutes: 10
steps: steps:
- name: Status - name: Check milestone and labels
run: | uses: actions/github-script@v7
echo "Temporary skipping this check" with:
script: |
#mergeable: const { data } = await github.request("GET /repos/{owner}/{repo}/pulls/{pr}", {
# # we can not use `pull_request.*` which including event `pull_request.labeled`, according to https://github.com/mergeability/mergeable/issues/643, owner: context.repo.owner,
# # otherwise mergeable will keep add or remove label endless, we just need this CI act like the default behavior as repo: context.repo.repo,
# # GitHub action workflow `pull_requests` https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request like, pr: context.payload.pull_request.number
# # which only trigger runs when a pull_request event's activity type is opened, synchronize, or reopened });
# - when: pull_request.opened, pull_request.reopened, pull_request.synchronize if (data.milestone) {
# name: sync-sql-ddl core.info(`This pull request has a milestone: ${data.milestone.title}`);
# validate: } else {
# # Sql files must change synchronize core.setFailed(`A maintainer needs to set the milestone for this pull request.`);
# - do: dependent }
# files: let labeledFlag = false;
# - 'dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql' for (const label of data.labels) {
# - 'dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql' if (['feature', 'bug', 'improvement', 'document', 'chore', 'DSIP', 'CI&CD', 'revert'].includes(label.name)) {
# - 'dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql' core.info(`This pull request has a valid label: ${label.name}`);
# message: 'Sql files not change synchronize' labeledFlag = true;
# # Add labels 'sql not sync' and comment to reviewers if Sql files not change synchronize break;
# fail: }
# - do: comment }
# payload: if (!labeledFlag) {
# body: > core.setFailed(`A maintainer needs to set a valid label for this pull request.`);
# :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.'

View File

@ -20,7 +20,8 @@ name: OWASP Dependency Check
on: on:
push: push:
branches: branches:
- dev - '[0-9]+.[0-9]+.[0-9]+-prepare'
- '[0-9]+.[0-9]+.[0-9]+-release'
pull_request: pull_request:
paths: paths:
- '**/pom.xml' - '**/pom.xml'
@ -30,8 +31,9 @@ env:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 120
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with: with:
submodules: true submodules: true
- name: Set up JDK 8 - name: Set up JDK 8
@ -42,9 +44,9 @@ 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@v3 uses: actions/upload-artifact@v4
if: ${{ cancelled() || failure() }} if: ${{ cancelled() || failure() }}
continue-on-error: true continue-on-error: true
with: with:
name: dependency report name: dependency report
path: target/dependency-check-report.html path: target/dependency-check-report.html

View File

@ -33,7 +33,7 @@ jobs:
packages: write packages: write
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- name: Cache local Maven repository - name: Cache local Maven repository
uses: actions/cache@v3 uses: actions/cache@v3
with: with:

View File

@ -33,7 +33,7 @@ jobs:
packages: write packages: write
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- name: Set environment variables - name: Set environment variables
run: | run: |
if [[ ${{ github.event_name }} == "release" ]]; then if [[ ${{ github.event_name }} == "release" ]]; then

View File

@ -15,20 +15,21 @@
# limitations under the License. # limitations under the License.
# #
name: "pull-request-robot" name: "pull-request-target-robot"
on: on:
pull_request_target: pull_request_target:
jobs: jobs:
labelRobot: pullRequestTargetRobot:
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@v2 uses: actions/checkout@v4
with: with:
persist-credentials: false persist-credentials: false
submodules: true submodules: true
@ -39,3 +40,8 @@ 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

View File

@ -24,7 +24,8 @@ on:
- '**/*.md' - '**/*.md'
- 'dolphinscheduler-ui' - 'dolphinscheduler-ui'
branches: branches:
- dev - '[0-9]+.[0-9]+.[0-9]+-prepare'
- '[0-9]+.[0-9]+.[0-9]+-release'
env: env:
LOG_DIR: /tmp/dolphinscheduler LOG_DIR: /tmp/dolphinscheduler
@ -40,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@v2 - uses: actions/checkout@v4
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721 - uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
id: filter id: filter
with: with:
@ -57,7 +58,7 @@ jobs:
java: ['8', '11'] java: ['8', '11']
timeout-minutes: 45 timeout-minutes: 45
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with: with:
submodules: true submodules: true
- name: Sanity Check - name: Sanity Check

1
.gitignore vendored
View File

@ -7,6 +7,7 @@
.target .target
.idea/ .idea/
!.idea/icon.png !.idea/icon.png
!.idea/vcs.xml
.run/ .run/
target/ target/
dist/ dist/

4
.gitmodules vendored
View File

@ -21,3 +21,7 @@
[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

16
.idea/vcs.xml Normal file
View File

@ -0,0 +1,16 @@
<?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>

View File

@ -51,5 +51,6 @@ 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

View File

@ -14,6 +14,8 @@ 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) |
@ -52,6 +54,8 @@ 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) |
@ -191,6 +195,8 @@ 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 |
@ -297,6 +303,8 @@ 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 |
@ -315,7 +323,6 @@ 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 |

View File

@ -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 and .Values.alert.enabled }} {{- if .Values.alert.enableCustomizedConfig }}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
@ -23,93 +23,8 @@ 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:
application.yaml: | {{- range $path, $config := .Values.alert.customizedConfig }}
spring: {{ $path }}: |
profiles: {{ $config | indent 4 -}}
active: {{ .Values.datasource.profile }} {{- end -}}
jackson: {{- end -}}
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 }}

View File

@ -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 and .Values.api.enabled }} {{- if .Values.api.enableCustomizedConfig }}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
@ -23,236 +23,8 @@ 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:
application.yaml: | {{- range $path, $config := .Values.api.customizedConfig }}
server: {{ $path }}: |
port: 12345 {{ $config | indent 4 -}}
servlet: {{- end -}}
session: {{- end -}}
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 }}

View File

@ -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 and .Values.master.enabled }} {{- if .Values.master.enableCustomizedConfig }}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
@ -23,151 +23,8 @@ 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:
application.yaml: | {{- range $path, $config := .Values.master.customizedConfig }}
spring: {{ $path }}: |
profiles: {{ $config | indent 4 -}}
active: {{ .Values.datasource.profile }} {{- end -}}
banner: {{- end -}}
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 }}

View File

@ -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 and .Values.worker.enabled }} {{- if .Values.worker.enableCustomizedConfig }}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
@ -23,86 +23,8 @@ 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:
application.yaml: | {{- range $path, $config := .Values.worker.customizedConfig }}
spring: {{ $path }}: |
banner: {{ $config | indent 4 -}}
charset: UTF-8 {{- end -}}
jackson: {{- end -}}
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 }}

View File

@ -115,9 +115,11 @@ 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 }}
@ -129,7 +131,9 @@ 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 }}

View File

@ -121,9 +121,11 @@ 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 }}
@ -139,9 +141,11 @@ 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 }}

View File

@ -109,9 +109,11 @@ 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
@ -125,9 +127,11 @@ 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:

View File

@ -111,9 +111,11 @@ 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
@ -142,9 +144,11 @@ 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

View File

@ -449,7 +449,19 @@ 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:
@ -578,6 +590,17 @@ 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
@ -740,7 +763,19 @@ 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:
@ -840,7 +875,19 @@ 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:

View File

@ -145,10 +145,6 @@ 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',
@ -432,10 +428,6 @@ 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'
@ -881,10 +873,6 @@ 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',
@ -1153,10 +1141,6 @@ 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'

View File

@ -22,8 +22,6 @@ 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

View File

@ -146,7 +146,6 @@ 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
@ -180,7 +179,6 @@ 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",

View File

@ -163,9 +163,6 @@ 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`

View File

@ -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][server] Fix xxx</td> <td style="text-align: center;">[Fix-3333][ui] Fix xxx</td>
</tr> </tr>
<tr> <tr>
<td style="text-align: center;">Improvement</td> <td style="text-align: center;">Improvement</td>
@ -44,9 +44,24 @@ 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;">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</td>
<td style="text-align: center;">[Feature-3333][server] Implement xxx</td> <td style="text-align: center;">[Doc-3333] Improve 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>

View File

@ -14,21 +14,7 @@ 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), 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: 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.
```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

View File

@ -71,31 +71,7 @@ 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 `install_env.sh` and `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 `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`
@ -146,11 +122,7 @@ Follow the instructions in [datasource-setting](../howto/datasource-setting.md)
## Start DolphinScheduler ## Start DolphinScheduler
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. Use **deployment user** you created above, running the 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.

View File

@ -1,6 +1,6 @@
# Resource Center Configuration # Resource Center Configuration
- You could use `Resource Center` to upload text files, UDFs and other task-related files. - You could use `Resource Center` to upload text files 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.

View File

@ -1,5 +1,5 @@
# Resource Center Introduction # Resource Center Introduction
The Resource Center is typically used for uploading files, UDF functions, and task group management. For a stand-alone The Resource Center is typically used for uploading files 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.

View File

@ -1,45 +0,0 @@
# 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.
![create-udf](../../../../img/new_ui/dev/resource/create-udf.png)
## 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:
![code-udf](../../../../img/new_ui/dev/resource/demo/udf-demo01.png)
### 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:
![conf-udf](../../../../img/new_ui/dev/resource/demo/udf-demo02.png)
### 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.
![use-udf](../../../../img/new_ui/dev/resource/demo/udf-demo03.png)

View File

@ -103,8 +103,8 @@ public void doPOSTParam()throws Exception{
## Granted Permissions ## Granted Permissions
* Granted permissions include project permissions, resource permissions, data source permissions, and UDF function permissions. * Granted permissions include project permissions, resource permissions, data source permissions.
* 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. * 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.
* 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{
![no-permission-error](../../../../img/new_ui/dev/security/no-permission-error.png) ![no-permission-error](../../../../img/new_ui/dev/security/no-permission-error.png)
- Resources, data sources, and UDF function authorization are the same as project authorization. - Resources, data sources authorization are the same as project authorization.
## Worker Grouping ## Worker Grouping

View File

@ -1,22 +0,0 @@
# 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]&#40;appendix.md#default-task-parameters&#41; `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. |

View File

@ -21,12 +21,11 @@ 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. |
@ -57,5 +56,3 @@ 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)

View File

@ -26,3 +26,8 @@ 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])

View File

@ -20,8 +20,6 @@
- 一个用户可以有多个项目,用户项目授权通过`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 />
### 项目 - 租户 - 工作流定义 - 定时 ### 项目 - 租户 - 工作流定义 - 定时

View File

@ -145,7 +145,6 @@
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 | 收件人
@ -179,7 +178,6 @@
"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",

View File

@ -163,9 +163,6 @@ npm install node-sass --unsafe-perm #单独安装node-sass依赖
``` ```
| 文件管理 | 文件管理
| UDF管理
- 资源管理
- 函数管理
``` ```
数据源管理 => `http://localhost:8888/#/datasource/list` 数据源管理 => `http://localhost:8888/#/datasource/list`

View File

@ -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][server] Fix xxx</td> <td style="text-align: center;">[Fix-3333][ui] Fix xxx</td>
</tr> </tr>
<tr> <tr>
<td style="text-align: center;">Improvement</td> <td style="text-align: center;">Improvement</td>
@ -46,9 +46,23 @@ 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;">Sub-Task</td> <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;">[Feature-3333][server] Implement xxx</td> <td style="text-align: center;">[Doc-3333] Improve 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>

View File

@ -14,21 +14,7 @@
### 修改相关配置 ### 修改相关配置
这个是与[伪集群部署](pseudo-cluster.md)差异较大的一步,因为部署脚本会通过 `scp` 的方式将安装需要的资源传输到各个机器上,所以这一步我们仅需要修改运行`install.sh`脚本的所在机器的配置即可。配置文件在路径在`bin/env/install_env.sh`下,此处我们仅需修改**INSTALL MACHINE****DolphinScheduler ENV、Database、Registry Server**与伪集群部署保持一致,下面对必须修改参数进行说明 这个是与[伪集群部署](pseudo-cluster.md)差异较大的一步,请使用 scp 等方式将配置文件分发到各台机器上,然后修改配置文件
```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 && 启停服务

View File

@ -70,30 +70,7 @@ chmod 600 ~/.ssh/authorized_keys
## 修改相关配置 ## 修改相关配置
完成基础环境的准备后,需要根据你的机器环境修改配置文件。配置文件可以在目录 `bin/env` 中找到,他们分别是 并命名为 `install_env.sh``dolphinscheduler_env.sh` 完成基础环境的准备后,需要根据你的机器环境修改配置文件。配置文件可以在目录 `bin/env/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` 文件
@ -141,11 +118,7 @@ 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`相关信息,此为非重要信息直接忽略即可

View File

@ -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`挂载到本地等,再用资源中心对接本地文件系统方式来操作远端对象存储中的文件。

View File

@ -1,4 +1,4 @@
# 资源中心简介 # 资源中心简介
资源中心通常用于上传文件、UDF 函数和任务组管理。 对于 standalone 环境可以选择本地文件目录作为上传文件夹此操作不需要Hadoop部署。当然你也可以 资源中心通常用于上传文件和任务组管理。 对于 standalone 环境可以选择本地文件目录作为上传文件夹此操作不需要Hadoop部署。当然你也可以
选择上传到 Hadoop 或者 MinIO 集群。 在这种情况下,您需要有 Hadoop2.6+)或 MinIO 等相关环境。 选择上传到 Hadoop 或者 MinIO 集群。 在这种情况下,您需要有 Hadoop2.6+)或 MinIO 等相关环境。

View File

@ -1,46 +0,0 @@
# UDF 管理
- 资源管理和文件管理功能类似,不同之处是资源管理是上传的 UDF 函数,文件管理上传的是用户程序,脚本及配置文件。
- 主要包括以下操作:重命名、下载、删除等。
* 上传 UDF 资源
> 和上传文件相同。
## 函数管理
* 创建 UDF 函数
> 点击“创建 UDF 函数”,输入 UDF 函数参数选择udf资源点击“提交”创建 UDF 函数。
> 目前只支持 HIVE 的临时 UDF 函数
- UDF 函数名称:输入 UDF 函数时的名称
- 包名类名:输入 UDF 函数的全路径
- UDF 资源:设置创建的 UDF 对应的资源文件
![create-udf](../../../../img/new_ui/dev/resource/create-udf.png)
## 任务样例
### 编写 UDF 函数
用户可以根据实际生产需求,自定义想要的 UDF 函数。这里编写一个在任意字符串的末尾添加 "HelloWorld" 的函数。如下图所示:
![code-udf](../../../../img/new_ui/dev/resource/demo/udf-demo01.png)
### 配置 UDF 函数
配置 UDF 函数前,需要先通过资源管理上传所需的函数 jar 包。然后进入函数管理,配置相关信息即可。如下图所示:
![conf-udf](../../../../img/new_ui/dev/resource/demo/udf-demo02.png)
### 使用 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 函数:选择资源中心所配置的即可。
![use-udf](../../../../img/new_ui/dev/resource/demo/udf-demo03.png)

View File

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

View File

@ -1,19 +0,0 @@
# 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任务参数附录]&#40;appendix.md#默认任务参数&#41;`默认任务参数`一栏。)
- 默认参数说明请参考[DolphinScheduler任务参数附录](appendix.md)`默认任务参数`一栏。
| **任务参数** | **描述** |
|----------|-------------------|
| 目标任务名 | 输入Pigeon任务的目标任务名称 |

View File

@ -26,7 +26,6 @@ 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语句之后执行。
@ -57,5 +56,4 @@ SQL任务类型用于连接数据库并执行相应SQL。
## 注意事项 ## 注意事项
* 注意SQL类型的选择如果是INSERT等操作需要选择非查询类型。 * 注意SQL类型的选择如果是INSERT等操作需要选择非查询类型。
* 为了兼容长会话情况,UDF函数的创建是通过CREATE OR REPLACE语句

View File

@ -24,3 +24,8 @@
* 在 /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.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -82,12 +82,12 @@ registry:
namespace: dolphinscheduler namespace: dolphinscheduler
connect-string: localhost:2181 connect-string: localhost:2181
retry-policy: retry-policy:
base-sleep-time: 60ms base-sleep-time: 1s
max-sleep: 300ms max-sleep: 3s
max-retries: 5 max-retries: 5
session-timeout: 30s session-timeout: 60s
connection-timeout: 9s connection-timeout: 15s
block-until-connected: 600ms block-until-connected: 15s
digest: ~ digest: ~
metrics: metrics:

View File

@ -31,17 +31,8 @@ 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;
@ -51,6 +42,14 @@ 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
@ -80,7 +79,8 @@ 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 = JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId(); sessionId =
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,24 +103,30 @@ 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.getBody().getData()).get(0)).get("code"); projectCode = (long) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProjectListResponse
.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 = processDefinitionPage.queryAllProcessDefinitionByProjectCode(loginUser, projectCode); HttpResponse queryAllProcessDefinitionByProjectCodeResponse =
processDefinitionPage.queryAllProcessDefinitionByProjectCode(loginUser, projectCode);
Assertions.assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getSuccess()); Assertions.assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getSuccess());
Assertions.assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getData().toString().contains("hello world")); Assertions.assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getData().toString()
processDefinitionCode = (long) ((LinkedHashMap<String, Object>) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProcessDefinitionByProjectCodeResponse.getBody().getData()).get(0)).get("processDefinition")).get("code"); .contains("hello world"));
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, projectCode, processDefinitionCode, ReleaseState.ONLINE); HttpResponse releaseProcessDefinitionResponse = processDefinitionPage.releaseProcessDefinition(loginUser,
projectCode, processDefinitionCode, ReleaseState.ONLINE);
Assertions.assertTrue(releaseProcessDefinitionResponse.getBody().getSuccess()); Assertions.assertTrue(releaseProcessDefinitionResponse.getBody().getSuccess());
// trigger workflow instance // trigger workflow instance
@ -128,11 +134,12 @@ 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, processDefinitionCode, scheduleTime, FailureStrategy.END, WarningType.NONE); HttpResponse startProcessInstanceResponse = executorPage.startProcessInstance(loginUser, projectCode,
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();
} }
@ -141,7 +148,8 @@ public class ExecutorAPITest {
@Test @Test
@Order(2) @Order(2)
public void testStartCheckProcessDefinition() { public void testStartCheckProcessDefinition() {
HttpResponse testStartCheckProcessDefinitionResponse = executorPage.startCheckProcessDefinition(loginUser, projectCode, processDefinitionCode); HttpResponse testStartCheckProcessDefinitionResponse =
executorPage.startCheckProcessDefinition(loginUser, projectCode, processDefinitionCode);
Assertions.assertTrue(testStartCheckProcessDefinitionResponse.getBody().getSuccess()); Assertions.assertTrue(testStartCheckProcessDefinitionResponse.getBody().getSuccess());
} }

View File

@ -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 java.io.File;; import org.apache.http.client.methods.CloseableHttpResponse;
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 = JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId(); sessionId =
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,14 +93,15 @@ 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.getBody().getData()).get(0)).get("code"); projectCode = (long) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProjectListResponse
.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();
} }
@ -109,72 +110,92 @@ public class ProcessDefinitionAPITest {
@Test @Test
@Order(2) @Order(2)
public void testQueryAllProcessDefinitionByProjectCode() { public void testQueryAllProcessDefinitionByProjectCode() {
HttpResponse queryAllProcessDefinitionByProjectCodeResponse = processDefinitionPage.queryAllProcessDefinitionByProjectCode(loginUser, projectCode); HttpResponse queryAllProcessDefinitionByProjectCodeResponse =
processDefinitionPage.queryAllProcessDefinitionByProjectCode(loginUser, projectCode);
Assertions.assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getSuccess()); Assertions.assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getSuccess());
Assertions.assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getData().toString().contains("hello world")); Assertions.assertTrue(
processDefinitionCode = (long) ((LinkedHashMap<String, Object>) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProcessDefinitionByProjectCodeResponse.getBody().getData()).get(0)).get("processDefinition")).get("code"); queryAllProcessDefinitionByProjectCodeResponse.getBody().getData().toString().contains("hello world"));
processDefinitionName = (String) ((LinkedHashMap<String, Object>) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProcessDefinitionByProjectCodeResponse.getBody().getData()).get(0)).get("processDefinition")).get("name"); processDefinitionCode =
(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 = processDefinitionPage.queryProcessDefinitionByCode(loginUser, projectCode, processDefinitionCode); HttpResponse queryProcessDefinitionByCodeResponse =
processDefinitionPage.queryProcessDefinitionByCode(loginUser, projectCode, processDefinitionCode);
Assertions.assertTrue(queryProcessDefinitionByCodeResponse.getBody().getSuccess()); Assertions.assertTrue(queryProcessDefinitionByCodeResponse.getBody().getSuccess());
Assertions.assertTrue(queryProcessDefinitionByCodeResponse.getBody().getData().toString().contains("hello world")); Assertions.assertTrue(
queryProcessDefinitionByCodeResponse.getBody().getData().toString().contains("hello world"));
} }
@Test @Test
@Order(4) @Order(4)
public void testgetProcessListByProjectCode() { public void testgetProcessListByProjectCode() {
HttpResponse getProcessListByProjectCodeResponse = processDefinitionPage.getProcessListByProjectCode(loginUser, projectCode); HttpResponse getProcessListByProjectCodeResponse =
processDefinitionPage.getProcessListByProjectCode(loginUser, projectCode);
Assertions.assertTrue(getProcessListByProjectCodeResponse.getBody().getSuccess()); Assertions.assertTrue(getProcessListByProjectCodeResponse.getBody().getSuccess());
Assertions.assertTrue(getProcessListByProjectCodeResponse.getBody().getData().toString().contains("test_import")); Assertions
.assertTrue(getProcessListByProjectCodeResponse.getBody().getData().toString().contains("test_import"));
} }
@Test @Test
@Order(5) @Order(5)
public void testQueryProcessDefinitionByName() { public void testQueryProcessDefinitionByName() {
HttpResponse queryProcessDefinitionByNameResponse = processDefinitionPage.queryProcessDefinitionByName(loginUser, projectCode, processDefinitionName); HttpResponse queryProcessDefinitionByNameResponse =
processDefinitionPage.queryProcessDefinitionByName(loginUser, projectCode, processDefinitionName);
Assertions.assertTrue(queryProcessDefinitionByNameResponse.getBody().getSuccess()); Assertions.assertTrue(queryProcessDefinitionByNameResponse.getBody().getSuccess());
Assertions.assertTrue(queryProcessDefinitionByNameResponse.getBody().getData().toString().contains("hello world")); Assertions.assertTrue(
queryProcessDefinitionByNameResponse.getBody().getData().toString().contains("hello world"));
} }
@Test @Test
@Order(6) @Order(6)
public void testQueryProcessDefinitionList() { public void testQueryProcessDefinitionList() {
HttpResponse queryProcessDefinitionListResponse = processDefinitionPage.queryProcessDefinitionList(loginUser, projectCode); HttpResponse queryProcessDefinitionListResponse =
processDefinitionPage.queryProcessDefinitionList(loginUser, projectCode);
Assertions.assertTrue(queryProcessDefinitionListResponse.getBody().getSuccess()); Assertions.assertTrue(queryProcessDefinitionListResponse.getBody().getSuccess());
Assertions.assertTrue(queryProcessDefinitionListResponse.getBody().getData().toString().contains("hello world")); Assertions
.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, projectCode, processDefinitionCode, ReleaseState.ONLINE); HttpResponse releaseProcessDefinitionResponse = processDefinitionPage.releaseProcessDefinition(loginUser,
projectCode, processDefinitionCode, ReleaseState.ONLINE);
Assertions.assertTrue(releaseProcessDefinitionResponse.getBody().getSuccess()); Assertions.assertTrue(releaseProcessDefinitionResponse.getBody().getSuccess());
HttpResponse queryProcessDefinitionByCodeResponse = processDefinitionPage.queryProcessDefinitionByCode(loginUser, projectCode, processDefinitionCode); HttpResponse queryProcessDefinitionByCodeResponse =
processDefinitionPage.queryProcessDefinitionByCode(loginUser, projectCode, processDefinitionCode);
Assertions.assertTrue(queryProcessDefinitionByCodeResponse.getBody().getSuccess()); Assertions.assertTrue(queryProcessDefinitionByCodeResponse.getBody().getSuccess());
Assertions.assertTrue(queryProcessDefinitionByCodeResponse.getBody().getData().toString().contains("releaseState=ONLINE")); Assertions.assertTrue(
queryProcessDefinitionByCodeResponse.getBody().getData().toString().contains("releaseState=ONLINE"));
} }
@Test @Test
@Order(8) @Order(8)
public void testDeleteProcessDefinitionByCode() { public void testDeleteProcessDefinitionByCode() {
HttpResponse deleteProcessDefinitionByCodeResponse = processDefinitionPage.deleteProcessDefinitionByCode(loginUser, projectCode, processDefinitionCode); HttpResponse deleteProcessDefinitionByCodeResponse =
processDefinitionPage.deleteProcessDefinitionByCode(loginUser, projectCode, processDefinitionCode);
Assertions.assertFalse(deleteProcessDefinitionByCodeResponse.getBody().getSuccess()); Assertions.assertFalse(deleteProcessDefinitionByCodeResponse.getBody().getSuccess());
HttpResponse releaseProcessDefinitionResponse = processDefinitionPage.releaseProcessDefinition(loginUser, projectCode, processDefinitionCode, ReleaseState.OFFLINE); HttpResponse releaseProcessDefinitionResponse = processDefinitionPage.releaseProcessDefinition(loginUser,
projectCode, processDefinitionCode, ReleaseState.OFFLINE);
Assertions.assertTrue(releaseProcessDefinitionResponse.getBody().getSuccess()); Assertions.assertTrue(releaseProcessDefinitionResponse.getBody().getSuccess());
deleteProcessDefinitionByCodeResponse = processDefinitionPage.deleteProcessDefinitionByCode(loginUser, projectCode, processDefinitionCode); deleteProcessDefinitionByCodeResponse =
processDefinitionPage.deleteProcessDefinitionByCode(loginUser, projectCode, processDefinitionCode);
Assertions.assertTrue(deleteProcessDefinitionByCodeResponse.getBody().getSuccess()); Assertions.assertTrue(deleteProcessDefinitionByCodeResponse.getBody().getSuccess());
HttpResponse queryProcessDefinitionListResponse = processDefinitionPage.queryProcessDefinitionList(loginUser, projectCode); HttpResponse queryProcessDefinitionListResponse =
processDefinitionPage.queryProcessDefinitionList(loginUser, projectCode);
Assertions.assertTrue(queryProcessDefinitionListResponse.getBody().getSuccess()); Assertions.assertTrue(queryProcessDefinitionListResponse.getBody().getSuccess());
Assertions.assertFalse(queryProcessDefinitionListResponse.getBody().getData().toString().contains("hello world")); Assertions
.assertFalse(queryProcessDefinitionListResponse.getBody().getData().toString().contains("hello world"));
} }
} }

View File

@ -48,6 +48,8 @@ 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;
@ -55,8 +57,6 @@ 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,7 +89,8 @@ 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 = JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId(); sessionId =
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);
@ -113,24 +114,30 @@ 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.getBody().getData()).get(0)).get("code"); projectCode = (long) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProjectListResponse
.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 = processDefinitionPage.queryAllProcessDefinitionByProjectCode(loginUser, projectCode); HttpResponse queryAllProcessDefinitionByProjectCodeResponse =
processDefinitionPage.queryAllProcessDefinitionByProjectCode(loginUser, projectCode);
assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getSuccess()); assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getSuccess());
assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getData().toString().contains("hello world")); assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getData().toString()
processDefinitionCode = (long) ((LinkedHashMap<String, Object>) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProcessDefinitionByProjectCodeResponse.getBody().getData()).get(0)).get("processDefinition")).get("code"); .contains("hello world"));
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, projectCode, processDefinitionCode, ReleaseState.ONLINE); HttpResponse releaseProcessDefinitionResponse = processDefinitionPage.releaseProcessDefinition(loginUser,
projectCode, processDefinitionCode, ReleaseState.ONLINE);
assertTrue(releaseProcessDefinitionResponse.getBody().getSuccess()); assertTrue(releaseProcessDefinitionResponse.getBody().getSuccess());
// trigger workflow instance // trigger workflow instance
@ -138,23 +145,27 @@ 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, processDefinitionCode, scheduleTime, FailureStrategy.END, WarningType.NONE); HttpResponse startProcessInstanceResponse = executorPage.startProcessInstance(loginUser, projectCode,
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.queryProcessInstancesByTriggerCode(loginUser, projectCode, triggerCode); HttpResponse queryProcessInstancesByTriggerCodeResponse = processInstancePage
assertTrue(queryProcessInstancesByTriggerCodeResponse.getBody().getSuccess()); .queryProcessInstancesByTriggerCode(loginUser, projectCode, triggerCode);
List<LinkedHashMap<String, Object>> body = (List<LinkedHashMap<String, Object>>) queryProcessInstancesByTriggerCodeResponse.getBody().getData(); assertTrue(queryProcessInstancesByTriggerCodeResponse.getBody().getSuccess());
assertTrue(CollectionUtils.isNotEmpty(body)); List<LinkedHashMap<String, Object>> body =
assertEquals("SUCCESS", body.get(0).get("state")); (List<LinkedHashMap<String, Object>>) queryProcessInstancesByTriggerCodeResponse
processInstanceId = (int) body.get(0).get("id"); .getBody().getData();
}); assertTrue(CollectionUtils.isNotEmpty(body));
} catch (Exception e) { assertEquals("SUCCESS", body.get(0).get("state"));
processInstanceId = (int) body.get(0).get("id");
});
} catch (Exception e) {
log.error("failed", e); log.error("failed", e);
Assertions.fail(); Assertions.fail();
} }
@ -163,7 +174,8 @@ public class ProcessInstanceAPITest {
@Test @Test
@Order(2) @Order(2)
public void testQueryProcessInstanceList() { public void testQueryProcessInstanceList() {
HttpResponse queryProcessInstanceListResponse = processInstancePage.queryProcessInstanceList(loginUser, projectCode, 1, 10); HttpResponse queryProcessInstanceListResponse =
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"));
} }
@ -171,7 +183,8 @@ public class ProcessInstanceAPITest {
@Test @Test
@Order(3) @Order(3)
public void testQueryTaskListByProcessId() { public void testQueryTaskListByProcessId() {
HttpResponse queryTaskListByProcessIdResponse = processInstancePage.queryTaskListByProcessId(loginUser, projectCode, processInstanceId); HttpResponse queryTaskListByProcessIdResponse =
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"));
} }
@ -179,7 +192,8 @@ public class ProcessInstanceAPITest {
@Test @Test
@Order(4) @Order(4)
public void testQueryProcessInstanceById() { public void testQueryProcessInstanceById() {
HttpResponse queryProcessInstanceByIdResponse = processInstancePage.queryProcessInstanceById(loginUser, projectCode, processInstanceId); HttpResponse queryProcessInstanceByIdResponse =
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"));
} }
@ -187,10 +201,12 @@ public class ProcessInstanceAPITest {
@Test @Test
@Order(5) @Order(5)
public void testDeleteProcessInstanceById() { public void testDeleteProcessInstanceById() {
HttpResponse deleteProcessInstanceByIdResponse = processInstancePage.deleteProcessInstanceById(loginUser, projectCode, processInstanceId); HttpResponse deleteProcessInstanceByIdResponse =
processInstancePage.deleteProcessInstanceById(loginUser, projectCode, processInstanceId);
assertTrue(deleteProcessInstanceByIdResponse.getBody().getSuccess()); assertTrue(deleteProcessInstanceByIdResponse.getBody().getSuccess());
HttpResponse queryProcessInstanceListResponse = processInstancePage.queryProcessInstanceList(loginUser, projectCode, 1, 10); HttpResponse queryProcessInstanceListResponse =
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"));
} }

View File

@ -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,7 +59,8 @@ 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 = JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId(); sessionId =
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");
@ -98,7 +99,8 @@ 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 = projectPage.updateProject(loginUser, code,"project-new", loginUser.getUserName()); HttpResponse updateProjectResponse =
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);
@ -133,17 +135,21 @@ public class ProjectAPITest {
@Test @Test
@Order(6) @Order(6)
public void testQueryProjectWithAuthorizedLevelListPaging() { public void testQueryProjectWithAuthorizedLevelListPaging() {
HttpResponse queryProjectWithAuthorizedLevelListPagingResponse = projectPage.queryProjectWithAuthorizedLevelListPaging(loginUser, loginUser.getId(),1, 1); HttpResponse queryProjectWithAuthorizedLevelListPagingResponse =
projectPage.queryProjectWithAuthorizedLevelListPaging(loginUser, loginUser.getId(), 1, 1);
Assertions.assertTrue(queryProjectWithAuthorizedLevelListPagingResponse.getBody().getSuccess()); Assertions.assertTrue(queryProjectWithAuthorizedLevelListPagingResponse.getBody().getSuccess());
Assertions.assertTrue(queryProjectWithAuthorizedLevelListPagingResponse.getBody().getData().toString().contains("project-new")); Assertions.assertTrue(queryProjectWithAuthorizedLevelListPagingResponse.getBody().getData().toString()
.contains("project-new"));
} }
@Test @Test
@Order(7) @Order(7)
public void testQueryUnauthorizedProject() { public void testQueryUnauthorizedProject() {
HttpResponse queryUnauthorizedProjectResponse = projectPage.queryUnauthorizedProject(loginUser, loginUser.getId()); HttpResponse queryUnauthorizedProjectResponse =
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 list // project-new was created by instead of authorized to this user, therefore, it should be in the unauthorized
// list
Assertions.assertTrue(queryUnauthorizedProjectResponse.getBody().getData().toString().contains("project-new")); Assertions.assertTrue(queryUnauthorizedProjectResponse.getBody().getData().toString().contains("project-new"));
} }
@ -152,17 +158,21 @@ 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 list // project-new was created by instead of authorized to this user, therefore, it should not be in the authorized
// 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 = projectPage.queryProjectWithAuthorizedLevel(loginUser, loginUser.getId()); HttpResponse queryProjectWithAuthorizedLevelResponse =
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 user // queryProjectWithAuthorizedLevel api returns a joint-set of projects both created by and authorized to the
Assertions.assertTrue(queryProjectWithAuthorizedLevelResponse.getBody().getData().toString().contains("project-new")); // user
Assertions.assertTrue(
queryProjectWithAuthorizedLevelResponse.getBody().getData().toString().contains("project-new"));
} }
@Test @Test
@ -181,10 +191,13 @@ public class ProjectAPITest {
@Test @Test
@Order(11) @Order(11)
public void testQueryProjectCreatedAndAuthorizedByUser() { public void testQueryProjectCreatedAndAuthorizedByUser() {
HttpResponse queryProjectCreatedAndAuthorizedByUserResponse = projectPage.queryProjectCreatedAndAuthorizedByUser(loginUser); HttpResponse queryProjectCreatedAndAuthorizedByUserResponse =
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 the user // queryProjectCreatedAndAuthorizedByUser api returns a joint-set of projects both created by and authorized to
Assertions.assertTrue(queryProjectCreatedAndAuthorizedByUserResponse.getBody().getData().toString().contains("project-new")); // the user
Assertions.assertTrue(
queryProjectCreatedAndAuthorizedByUserResponse.getBody().getData().toString().contains("project-new"));
} }
@Test @Test
@ -192,7 +205,8 @@ 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(queryAllProjectListForDependentResponse.getBody().getData().toString().contains("project-new")); Assertions.assertTrue(
queryAllProjectListForDependentResponse.getBody().getData().toString().contains("project-new"));
} }
@Test @Test
@ -203,8 +217,7 @@ 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(queryAllProjectListForDependentResponse.getBody().getData().toString().contains("project-new")); Assertions.assertFalse(
queryAllProjectListForDependentResponse.getBody().getData().toString().contains("project-new"));
} }
} }

View File

@ -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 = JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId(); sessionId =
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,17 +94,24 @@ 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.getBody().getData()).get(0)).get("code"); projectCode = (long) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryAllProjectListResponse
.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 = processDefinitionPage.queryAllProcessDefinitionByProjectCode(loginUser, projectCode); HttpResponse queryAllProcessDefinitionByProjectCodeResponse =
processDefinitionPage.queryAllProcessDefinitionByProjectCode(loginUser, projectCode);
Assertions.assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getSuccess()); Assertions.assertTrue(queryAllProcessDefinitionByProjectCodeResponse.getBody().getSuccess());
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");
processDefinitionPage.releaseProcessDefinition(loginUser, projectCode, processDefinitionCode, ReleaseState.ONLINE); processDefinitionPage.releaseProcessDefinition(loginUser, projectCode, processDefinitionCode,
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 * * ? *\"}" ; ReleaseState.ONLINE);
HttpResponse createScheduleResponse = schedulerPage.createSchedule(loginUser, projectCode, processDefinitionCode, schedule); 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 * * ? *\"}";
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"));
} }
@ -115,13 +122,15 @@ 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().getData()).get(0)).get("id"); scheduleId = (int) ((LinkedHashMap<String, Object>) ((List<LinkedHashMap>) queryScheduleListResponse.getBody()
.getData()).get(0)).get("id");
} }
@Test @Test
@Order(3) @Order(3)
public void testPublishScheduleOnline() { public void testPublishScheduleOnline() {
HttpResponse publishScheduleOnlineResponse = schedulerPage.publishScheduleOnline(loginUser, projectCode, scheduleId); HttpResponse publishScheduleOnlineResponse =
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);
@ -137,14 +146,17 @@ 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("releaseState=OFFLINE")); Assertions
.assertTrue(queryScheduleListResponse.getBody().getData().toString().contains("releaseState=OFFLINE"));
} }
@Test @Test
@Order(5) @Order(5)
public void testUpdateSchedule() { public void testUpdateSchedule() {
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 * * ? *\"}"; final String schedule =
HttpResponse updateScheduleResponse = schedulerPage.updateSchedule(loginUser, projectCode, scheduleId, schedule); "{\"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);
Assertions.assertTrue(updateScheduleResponse.getBody().getSuccess()); Assertions.assertTrue(updateScheduleResponse.getBody().getSuccess());
HttpResponse queryScheduleListResponse = schedulerPage.queryScheduleList(loginUser, projectCode); HttpResponse queryScheduleListResponse = schedulerPage.queryScheduleList(loginUser, projectCode);
@ -163,5 +175,3 @@ public class SchedulerAPITest {
Assertions.assertFalse(queryScheduleListResponse.getBody().getData().toString().contains("1996-08-08")); Assertions.assertFalse(queryScheduleListResponse.getBody().getData().toString().contains("1996-08-08"));
} }
} }

View File

@ -28,17 +28,18 @@ 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";
@ -54,7 +55,8 @@ public class TenantAPITest {
LoginPage loginPage = new LoginPage(); LoginPage loginPage = new LoginPage();
HttpResponse loginHttpResponse = loginPage.login(user, password); HttpResponse loginHttpResponse = loginPage.login(user, password);
sessionId = JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId(); sessionId =
JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId();
} }
@AfterAll @AfterAll
@ -90,7 +92,9 @@ 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.convertValue(createTenantHttpResponse.getBody().getData(), TenantListPagingResponseData.class).getTotalList()) { for (TenantListPagingResponseTotalList tenantListPagingResponseTotalList : JSONUtils
.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();

View File

@ -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,7 +59,8 @@ 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 = JSONUtils.convertValue(loginHttpResponse.getBody().getData(), LoginResponseData.class).getSessionId(); sessionId =
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);
@ -75,7 +76,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);
@ -88,9 +89,10 @@ public class WorkerGroupAPITest {
@Test @Test
@Order(2) @Order(2)
public void testQueryAllWorkerGroupsPaging() { public void testQueryAllWorkerGroupsPaging() {
HttpResponse queryAllWorkerGroupsPagingResponse = workerGroupPage.queryAllWorkerGroupsPaging(loginUser, 1, 2, null); HttpResponse queryAllWorkerGroupsPagingResponse =
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"));
} }
@ -100,7 +102,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"));
} }

View File

@ -29,6 +29,7 @@ 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;

View File

@ -29,6 +29,7 @@ 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;

View File

@ -26,6 +26,7 @@ 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<>();

View File

@ -19,8 +19,6 @@
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;
@ -29,8 +27,11 @@ 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) {
@ -90,7 +91,8 @@ 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, Integer pageNo) { public HttpResponse queryProjectWithAuthorizedLevelListPaging(User loginUser, Integer userId, Integer pageSize,
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);

View File

@ -27,6 +27,7 @@ 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);

View File

@ -19,8 +19,6 @@
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;
@ -29,13 +27,15 @@ 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, String otherParamsJson) { public HttpResponse saveWorkerGroup(User loginUser, int id, String name, String addrList, String description,
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,5 +96,4 @@ public class WorkerGroupPage {
return requestClient.get("/worker-groups/worker-address-list", headers, params); return requestClient.get("/worker-groups/worker-address-list", headers, params);
} }
} }

View File

@ -34,14 +34,15 @@ 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, String scheduleTime, FailureStrategy failureStrategy, WarningType warningType) { public HttpResponse startProcessInstance(User loginUser, long projectCode, long processDefinitionCode,
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);
@ -93,7 +94,8 @@ 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, TaskDependType taskDependType) { public HttpResponse executeTask(User loginUser, long projectCode, int processInstanceId, String startNodeList,
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);
@ -107,4 +109,4 @@ public class ExecutorPage {
return requestClient.post(url, headers, params); return requestClient.post(url, headers, params);
} }
} }

View File

@ -25,6 +25,8 @@ 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;
@ -32,9 +34,6 @@ 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 {
@ -107,7 +106,8 @@ public class ProcessDefinitionPage {
return requestClient.get(url, headers, params); return requestClient.get(url, headers, params);
} }
public HttpResponse releaseProcessDefinition(User loginUser, long projectCode, long code, ReleaseState releaseState) { public HttpResponse releaseProcessDefinition(User loginUser, long projectCode, long code,
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);

View File

@ -19,13 +19,9 @@
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;
@ -34,7 +30,6 @@ 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 {

View File

@ -30,7 +30,6 @@ 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 {
@ -63,7 +62,6 @@ 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);

View File

@ -17,12 +17,11 @@
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;
@ -72,8 +71,11 @@ 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).configure(ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT, true).configure(READ_UNKNOWN_ENUM_VALUES_AS_NULL, true) new ObjectMapper().configure(FAIL_ON_UNKNOWN_PROPERTIES, false)
.configure(REQUIRE_SETTERS_FOR_GETTERS, true).setTimeZone(TimeZone.getDefault()).setDateFormat(new SimpleDateFormat(Constants.YYYY_MM_DD_HH_MM_SS)); .configure(ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT, true)
.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");

View File

@ -23,6 +23,15 @@ 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;
@ -39,17 +48,6 @@ 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 {
@ -70,10 +68,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();
@ -121,10 +119,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;
@ -152,10 +150,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;
@ -171,17 +169,17 @@ public class RequestClient {
return httpResponse; return httpResponse;
} }
public CloseableHttpResponse postWithFile(String url, Map<String, String> headers, Map<String, Object> params, File file) { public CloseableHttpResponse postWithFile(String url, Map<String, String> headers, Map<String, Object> params,
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);
@ -199,7 +197,6 @@ 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) {
@ -214,10 +211,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();

View File

@ -21,7 +21,6 @@ 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"
@ -29,7 +28,7 @@ services:
network: network:
ipv4_address: 10.5.0.5 ipv4_address: 10.5.0.5
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 60s timeout: 60s
retries: 120 retries: 120

View File

@ -21,14 +21,13 @@ 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/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 60s timeout: 60s
retries: 120 retries: 120

View File

@ -21,14 +21,13 @@ 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/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 60s timeout: 60s
retries: 120 retries: 120

View File

@ -21,7 +21,6 @@ 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"
@ -31,7 +30,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/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 60s timeout: 60s
retries: 120 retries: 120

View File

@ -21,14 +21,13 @@ 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/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 60s timeout: 60s
retries: 120 retries: 120

View File

@ -21,14 +21,13 @@ 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/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 60s timeout: 60s
retries: 120 retries: 120

View File

@ -21,14 +21,13 @@ 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/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 60s timeout: 60s
retries: 120 retries: 120

View File

@ -37,5 +37,6 @@ 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();
} }

View File

@ -27,17 +27,18 @@ 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.slf4j.Logger; import org.testcontainers.containers.ContainerState;
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";
@ -49,6 +50,9 @@ 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"));
} }
} }
@ -63,17 +67,18 @@ 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().withStartupTimeout(Duration.ofSeconds(Constants.DOCKER_COMPOSE_DEFAULT_TIMEOUT))); .waitingFor(serviceName, Wait.forHealthcheck()
.withStartupTimeout(Duration.ofSeconds(Constants.DOCKER_COMPOSE_DEFAULT_TIMEOUT)));
return compose; return compose;
} }

View File

@ -19,22 +19,14 @@ 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;
@ -68,17 +60,7 @@ 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();
for (Map.Entry<String, TaskChannelFactory> entry : TaskPluginManager.getTaskChannelFactoryMap().entrySet()) { TaskPluginManager.loadTaskPlugin();
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);
}
} }
} }

View File

@ -26,7 +26,6 @@ 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;
@ -172,23 +171,13 @@ 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);
if (isUdfResource) { return isFolder ? AuditModelType.FOLDER.getName() : AuditModelType.FILE.getName();
return isFolder ? AuditModelType.UDF_FOLDER.getName() : AuditModelType.UDF_FILE.getName();
} else {
return isFolder ? AuditModelType.FOLDER.getName() : AuditModelType.FILE.getName();
}
} }
} }

View File

@ -43,6 +43,5 @@ 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";
} }

View File

@ -24,7 +24,6 @@ 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;
@ -34,7 +33,6 @@ 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;
@ -55,7 +53,6 @@ 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;
@ -96,7 +93,6 @@ 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;
@ -163,13 +159,6 @@ 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[]{}),

Some files were not shown because too many files have changed in this diff Show More