Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding feature in bash operator to append the user defined env variable to system env variable #18944

Merged
merged 2 commits into from Oct 13, 2021

Conversation

PraveenA95
Copy link
Contributor

@PraveenA95 PraveenA95 commented Oct 13, 2021

Feature to override user defined env variables on System Env Variables

Currently in bash operator whenever a user passes a environment variables using env argument, the user defined environment variables overrides the existing system environment variables. In this PR, I have introduced a new argument called append_env. The default value for this will be False. When append_env is set True then we will update the system environment variables with user defined environment variables(new Behavior), If set False, we ignore the system environment variables and use the user defined variables(Existing Behavior)

Closes : #17240

…t variables with the existing env variables
@boring-cyborg boring-cyborg bot added the area:core-operators Operators, Sensors and hooks within Core Airflow label Oct 13, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Oct 13, 2021

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

Co-authored-by: Sam Wheating <samwheating@gmail.com>
@github-actions
Copy link

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Oct 13, 2021
@potiuk potiuk merged commit d4a3d2b into apache:main Oct 13, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Oct 13, 2021

Awesome work, congrats on your first merged pull request!

@PraveenA95 PraveenA95 deleted the #17240 branch October 13, 2021 19:39
@ephraimbuddy ephraimbuddy added the type:improvement Changelog: Improvements label Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core-operators Operators, Sensors and hooks within Core Airflow full tests needed We need to run full set of tests for this PR to merge type:improvement Changelog: Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bash operator overrides environment variables instead of updating them
4 participants