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

[AIRFLOW-4316] support setting kubernetes_environment_variables config section from env var #5668

Merged
merged 2 commits into from
Aug 23, 2019

Conversation

houqp
Copy link
Member

@houqp houqp commented Jul 26, 2019

Jira

Description

  • Here are some details about my PR, including screenshots of any UI changes:

When AIRFLOW_KUBERNETES_ENVIRONMENT_VARIABLES__AIRFLOW_HOME is set in
the scheduler, AIRFLOW_HOME should be set for workers, not airflow_home. This means kubernetes_environment_variables section's keys need to be parsed with case sensitivity.

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:

Updated test in test_env_var_config to capture the requirement.

Commits

  • My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain docstrings that explain what it does
    • If you implement backwards incompatible changes, please leave a note in the Updating.md so we can assign it to a appropriate release

Code Quality

  • Passes flake8

Copy link
Member

@ashb ashb left a comment

Choose a reason for hiding this comment

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

Please update PR title and commit message to target AIRFLOW-4316 too

airflow/configuration.py Show resolved Hide resolved
tests/core.py Outdated Show resolved Hide resolved
@houqp houqp force-pushed the k8senv branch 2 times, most recently from b49b53c to 5505aad Compare August 2, 2019 17:36
@houqp houqp changed the title [AIRFLOW-5055] support setting kubernetes_environment_variables config section from env var [AIRFLOW-5055][AIRFLOW-4316] support setting kubernetes_environment_variables config section from env var Aug 2, 2019
@houqp houqp changed the title [AIRFLOW-5055][AIRFLOW-4316] support setting kubernetes_environment_variables config section from env var [AIRFLOW-4316] support setting kubernetes_environment_variables config section from env var Aug 2, 2019
@houqp houqp force-pushed the k8senv branch 3 times, most recently from 1d74390 to 57ba24f Compare August 9, 2019 05:56
@houqp
Copy link
Member Author

houqp commented Aug 9, 2019

I decided to leave kubernetes_environment_variables as a special case to avoid breaking all the existing setups. I have left a comment in the code to explain what it is needed.

@ashb please let me know you think we should go the other route instead, i.e. make all environment variable case sensitive.

@mik-laj mik-laj added the k8s label Aug 15, 2019
…g section from env var

When AIRFLOW_KUBERNETES_ENVIRONMENT_VARIABLES__AIRFLOW_HOME is set in
the scheduler, AIRFLOW_HOME should be set for workers, not airflow_home.
@ashb ashb merged commit bffc0c9 into apache:master Aug 23, 2019
@houqp houqp deleted the k8senv branch August 23, 2019 16:24
ashb pushed a commit to ashb/airflow that referenced this pull request Aug 29, 2019
…g section from env var (apache#5668)

When AIRFLOW_KUBERNETES_ENVIRONMENT_VARIABLES__AIRFLOW_HOME is set in
the scheduler, AIRFLOW_HOME should be set for workers, not airflow_home.

(cherry picked from commit bffc0c9)
kaxil pushed a commit that referenced this pull request Aug 30, 2019
…g section from env var (#5668)

When AIRFLOW_KUBERNETES_ENVIRONMENT_VARIABLES__AIRFLOW_HOME is set in
the scheduler, AIRFLOW_HOME should be set for workers, not airflow_home.

(cherry picked from commit bffc0c9)
Jerryguo pushed a commit to Jerryguo/airflow that referenced this pull request Sep 2, 2019
…g section from env var (apache#5668)

When AIRFLOW_KUBERNETES_ENVIRONMENT_VARIABLES__AIRFLOW_HOME is set in
the scheduler, AIRFLOW_HOME should be set for workers, not airflow_home.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants