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-6060] Improve conf_vars context manager #6658

Merged
merged 1 commit into from Nov 25, 2019

Conversation

turbaszek
Copy link
Member

Make sure you have checked all steps below.

Jira

Description

  • Here are some details about my PR, including screenshots of any UI changes:
    This commit adds try / finally clause to conf_vars context
    manager to assure that initail values are reseted in case
    of an exception in yield.

Tests

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

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

This commit adds try / finally clause to conf_vars context
manager to assure that initail values are reseted in case
of an exception in yield.
@codecov-io
Copy link

codecov-io commented Nov 25, 2019

Codecov Report

Merging #6658 into master will decrease coverage by 0.33%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6658      +/-   ##
==========================================
- Coverage   83.82%   83.48%   -0.34%     
==========================================
  Files         672      672              
  Lines       37560    37560              
==========================================
- Hits        31483    31358     -125     
- Misses       6077     6202     +125
Impacted Files Coverage Δ
airflow/kubernetes/volume_mount.py 44.44% <0%> (-55.56%) ⬇️
airflow/kubernetes/volume.py 52.94% <0%> (-47.06%) ⬇️
airflow/kubernetes/pod_launcher.py 45.25% <0%> (-46.72%) ⬇️
airflow/kubernetes/refresh_config.py 50.98% <0%> (-23.53%) ⬇️
...rflow/contrib/operators/kubernetes_pod_operator.py 78.2% <0%> (-20.52%) ⬇️
airflow/configuration.py 89.13% <0%> (-3.63%) ⬇️
airflow/jobs/backfill_job.py 89.9% <0%> (-1.53%) ⬇️

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 db4be19...fc6c8c0. Read the comment docs.

@mik-laj
Copy link
Member

mik-laj commented Nov 25, 2019

Can you add a more descriptive title e.g. Handle exceptions in conf_vars context manager (46 characters)?

@potiuk potiuk merged commit 27ce7bd into apache:master Nov 25, 2019
potiuk pushed a commit that referenced this pull request Nov 25, 2019
This commit adds try / finally clause to conf_vars context
manager to assure that initail values are reseted in case
of an exception in yield.

(cherry picked from commit 27ce7bd)
eladkal pushed a commit to eladkal/airflow that referenced this pull request Dec 2, 2019
This commit adds try / finally clause to conf_vars context
manager to assure that initail values are reseted in case
of an exception in yield.

(cherry picked from commit 27ce7bd)
@turbaszek turbaszek deleted the improve-conf-var-ctx branch December 4, 2019 11:19
kaxil pushed a commit that referenced this pull request Dec 12, 2019
This commit adds try / finally clause to conf_vars context
manager to assure that initail values are reseted in case
of an exception in yield.

(cherry picked from commit 27ce7bd)
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.

None yet

4 participants