Skip to content

[Feature][Deploy] Add missing default values in dolphinscheduler_env.sh#9733

Merged
SbloodyS merged 4 commits intoapache:devfrom
EricGao888:Fix-9675
Apr 27, 2022
Merged

[Feature][Deploy] Add missing default values in dolphinscheduler_env.sh#9733
SbloodyS merged 4 commits intoapache:devfrom
EricGao888:Fix-9675

Conversation

@EricGao888
Copy link
Copy Markdown
Member

Purpose of the pull request

Brief change log

  • Already Described above

Verify this pull request

  • Verified by manual tests

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 24, 2022

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.06%. Comparing base (84cad13) to head (e9fe8a6).
⚠️ Report is 2453 commits behind head on dev.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #9733      +/-   ##
============================================
- Coverage     40.07%   40.06%   -0.02%     
+ Complexity     4484     4481       -3     
============================================
  Files           835      835              
  Lines         33575    33587      +12     
  Branches       3712     3712              
============================================
+ Hits          13456    13457       +1     
- Misses        18865    18877      +12     
+ Partials       1254     1253       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SbloodyS
Copy link
Copy Markdown
Member

Hi @EricGao888 , please resolve conficts.

@EricGao888
Copy link
Copy Markdown
Member Author

Hi @EricGao888 , please resolve conficts.

@SbloodyS Thx for the reminder! I'm a bit confused about what to do in this PR, since we no more need add default values to dolphinscheduler_env.sh as explained in this comment: #9675 (comment)

@SbloodyS
Copy link
Copy Markdown
Member

@EricGao888 Finally, we have an agreement. please see #9675 (comment)

@EricGao888
Copy link
Copy Markdown
Member Author

@EricGao888 Finally, we have an agreement. please see #9675 (comment)

@SbloodyS I just checked the latest code, it seems this feature has been implemented by PR #9726

BIN_ENV_FILE="${DOLPHINSCHEDULER_HOME}/bin/env/dolphinscheduler_env.sh"
# Overwrite server dolphinscheduler_env.sh in path `<server>/conf/dolphinscheduler_env.sh` when exists
# `bin/env/dolphinscheduler_env.sh` file. User could only change `bin/env/dolphinscheduler_env.sh` instead
# of each server's dolphinscheduler_env.sh when they want to start the server
function overwrite_server_env() {
local server=$1
local server_env_file="${DOLPHINSCHEDULER_HOME}/${server}/conf/dolphinscheduler_env.sh"
if [ -f "${BIN_ENV_FILE}" ]; then
echo "Overwrite ${server}/conf/dolphinscheduler_env.sh using bin/env/dolphinscheduler_env.sh."
cp "${BIN_ENV_FILE}" "${server_env_file}"
else
echo "Start server ${server} using env config path ${server_env_file}, because file ${BIN_ENV_FILE} not exists."
fi
}

@SbloodyS
Copy link
Copy Markdown
Member

Yes. But some of the default value in dolphinscheduler_env.sh still missing. @EricGao888

export SPRING_DATASOURCE_DRIVER_CLASS_NAME
export SPRING_DATASOURCE_URL
export SPRING_DATASOURCE_USERNAME
export SPRING_DATASOURCE_PASSWORD

@EricGao888
Copy link
Copy Markdown
Member Author

Yes. But some of the default value in dolphinscheduler_env.sh still missing. @EricGao888

export SPRING_DATASOURCE_DRIVER_CLASS_NAME
export SPRING_DATASOURCE_URL
export SPRING_DATASOURCE_USERNAME
export SPRING_DATASOURCE_PASSWORD

Sure I will fix it.

@EricGao888 EricGao888 force-pushed the Fix-9675 branch 2 times, most recently from af61f9f to 3567104 Compare April 26, 2022 11:05
@EricGao888
Copy link
Copy Markdown
Member Author

I added missing default values in dolphinscheduler_env.sh, updated related docs and fixed minor issue in update-schema.sh following PR #9726, PTAL when you have time. Thx! @zhongjiajie @SbloodyS

BTW, not sure why some E2E tests failed.

@SbloodyS
Copy link
Copy Markdown
Member

SbloodyS commented Apr 26, 2022

script/env/dolphinscheduler_env.sh will overwrite the default setting of stanalone server. Standalone server starts with H2 database by default. That's why E2E tests failed.

We may find a way bypass it. Otherwise, restore script/env/dolphinscheduler_env.sh as it is. @EricGao888

@EricGao888
Copy link
Copy Markdown
Member Author

script/env/dolphinscheduler_env.sh will overwrite the default setting of stanalone server. Standalone server starts with H2 database by default. That's why E2E tests failed.

We may find a way bypass it. Otherwise, restore script/env/dolphinscheduler_env.sh as it is. @EricGao888

@SbloodyS I think it may not be easy to find a way to bypass it. Considering we already have default values in application.yaml and also provider users with examples in docs in this PR, should we just restore script/env/dolphinscheduler_env.sh and leave those default values blank?

spring:
main:
banner-mode: off
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://127.0.0.1:5432/dolphinscheduler
username: root
password: root

image

@SbloodyS
Copy link
Copy Markdown
Member

SbloodyS commented Apr 26, 2022

@EricGao888 I think these examples is enough for users.

@EricGao888
Copy link
Copy Markdown
Member Author

@EricGao888 I think these examples is enough for users.

Done, CI looks good now. : )

SbloodyS
SbloodyS previously approved these changes Apr 26, 2022
Copy link
Copy Markdown
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if CI passed. Do you have time to take a look? @zhongjiajie

@zhongjiajie
Copy link
Copy Markdown
Member

I am take a look on this PR now

DOLPHINSCHEDULER_HOME=${DOLPHINSCHEDULER_HOME:-$(cd $BIN_DIR/../..; pwd)}
source "$DOLPHINSCHEDULER_HOME/tools/bin/dolphinscheduler_env.sh"

source "$DOLPHINSCHEDULER_HOME/bin/env/dolphinscheduler_env.sh"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we do not use dolphinscheduler_env.sh file anymore, we should also remove the assembly config

<fileSet>
<directory>${basedir}/../script/env</directory>
<outputDirectory>conf</outputDirectory>
<includes>
<include>dolphinscheduler_env.sh</include>
</includes>
<fileMode>0755</fileMode>
<directoryMode>0755</directoryMode>
</fileSet>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is a good idea to remove the assembly config in case users get confused. Will fix it in the next commit. : )

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SbloodyS @zhongjiajie E2E tests failed. May I ask is it caused by the removal of assembly config? Is there any way to bypass it? Thx!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think it will cause the failed. I will restart the CI

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EricGao888 It's E2E build failed. Maybe it's the problem with GitHub Actions since it can't guarantee 99.99% stability...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EricGao888 It's E2E build failed. Maybe it's the problem with GitHub Actions since it can't guarantee 99.99% stability...

could I @github at this time? 🤣

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github +1

@zhongjiajie zhongjiajie added the Waiting for user feedback Waiting for feedback from issue/PR author label Apr 27, 2022
@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@SbloodyS SbloodyS removed the Waiting for user feedback Waiting for feedback from issue/PR author label Apr 27, 2022
@EricGao888 EricGao888 requested a review from zhongjiajie April 27, 2022 05:37
@EricGao888 EricGao888 requested a review from SbloodyS April 27, 2022 05:37
Copy link
Copy Markdown
Member

@zhongjiajie zhongjiajie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @SbloodyS do you have addition suggestion?

Copy link
Copy Markdown
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@SbloodyS SbloodyS merged commit 515c363 into apache:dev Apr 27, 2022
@EricGao888 EricGao888 deleted the Fix-9675 branch April 27, 2022 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature][Deploy] Add missing default values in dolphinscheduler_env.sh

4 participants