Skip to content

[python] Support read config in env variable#9517

Merged
devosend merged 1 commit intoapache:devfrom
zhongjiajie:py-config-env
Apr 15, 2022
Merged

[python] Support read config in env variable#9517
devosend merged 1 commit intoapache:devfrom
zhongjiajie:py-config-env

Conversation

@zhongjiajie
Copy link
Copy Markdown
Member

Add a new method to get config from environment variables
and for now, we have three ways to get config and the
priority is env-var > custom-config-file > built-in-config-file.

Environment config setting does not work in CLI, because it will
confuse users when they get config value is var-env but value
in the configuration file is var-in-file, they may not find
the way how to change it

  • Add documentation
  • Add it to UPDATING.md

close: #8344

Add a new method to get config from environment variables
and for now, we have three ways to get config and the
priority is `env-var > custom-config-file > built-in-config-file`.

Environment config setting does not work in CLI, because it will
confuse users when they get config value is `var-env` but value
in the configuration file is `var-in-file`, they may not find
the way how to change it

* Add documentation
* Add it to UPDATING.md

close: apache#8344
@zhongjiajie zhongjiajie self-assigned this Apr 15, 2022
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #9517 (6d97741) into dev (8a2fbd2) will decrease coverage by 0.00%.
The diff coverage is 23.52%.

❗ Current head 6d97741 differs from pull request most recent head ddce6e4. Consider uploading reports for the commit ddce6e4 to get more accurate results

@@             Coverage Diff              @@
##                dev    #9517      +/-   ##
============================================
- Coverage     39.90%   39.90%   -0.01%     
+ Complexity     4418     4415       -3     
============================================
  Files           826      826              
  Lines         33258    33253       -5     
  Branches       3683     3683              
============================================
- Hits          13272    13270       -2     
+ Misses        18754    18752       -2     
+ Partials       1232     1231       -1     
Impacted Files Coverage Δ
.../server/worker/processor/TaskExecuteProcessor.java 0.00% <0.00%> (ø)
...ler/server/worker/processor/TaskKillProcessor.java 0.00% <0.00%> (ø)
...uler/server/worker/runner/WorkerManagerThread.java 0.00% <0.00%> (ø)
...olphinscheduler/plugin/alert/email/MailSender.java 73.61% <100.00%> (+0.18%) ⬆️
...er/server/builder/TaskExecutionContextBuilder.java 72.09% <100.00%> (+0.66%) ⬆️
...er/master/dispatch/host/assign/RandomSelector.java 77.77% <0.00%> (-5.56%) ⬇️
...org/apache/dolphinscheduler/remote/utils/Host.java 37.77% <0.00%> (-2.23%) ⬇️
...e/dolphinscheduler/remote/NettyRemotingClient.java 52.11% <0.00%> (-1.41%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a2fbd2...ddce6e4. Read the comment docs.

@zhongjiajie zhongjiajie requested a review from devosend April 15, 2022 07:06
@zhongjiajie zhongjiajie marked this pull request as ready for review April 15, 2022 07:06
@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

Copy link
Copy Markdown
Contributor

@devosend devosend left a comment

Choose a reason for hiding this comment

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

LGTM

@devosend devosend merged commit 59a026d into apache:dev Apr 15, 2022
@zhongjiajie zhongjiajie deleted the py-config-env branch April 15, 2022 07:50
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][python] Support read configuration in env variable

3 participants