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-5463] Use same session to delete and add variable in set #6807

Merged
merged 1 commit into from
Dec 13, 2019

Conversation

robobario
Copy link
Contributor

Why:

  • In our system we had a postgres connection error during Variable.set
    resulting in the variable being deleted. The intention of this change is
    that an error should leave the variable unchanged.

https://issues.apache.org/jira/browse/AIRFLOW-5463

Tests

I was unable to see a good way to test this, is there a way to make delete succeed and add error? You could consider it a refactoring since the variable tests continue to pass.

Why:
* In our system we had a postgres connection error during Variable.set
resulting in the variable being deleted. The intention of this change is
that an error should leave the variable unchanged.
@codecov-io
Copy link

Codecov Report

Merging #6807 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6807      +/-   ##
==========================================
- Coverage   84.58%   84.53%   -0.05%     
==========================================
  Files         672      673       +1     
  Lines       38220    38863     +643     
==========================================
+ Hits        32329    32854     +525     
- Misses       5891     6009     +118
Impacted Files Coverage Δ
airflow/models/variable.py 93.42% <100%> (ø) ⬆️
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/jobs/backfill_job.py 91.59% <0%> (-0.29%) ⬇️
airflow/models/taskinstance.py 93.75% <0%> (-0.27%) ⬇️
airflow/contrib/hooks/gcp_kms_hook.py 100% <0%> (ø) ⬆️
airflow/executors/debug_executor.py 92.06% <0%> (ø)
... and 2 more

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 702005f...e6089fe. Read the comment docs.

@ashb ashb merged commit 5483ae4 into apache:master Dec 13, 2019
kaxil pushed a commit that referenced this pull request Dec 17, 2019
)

Why:
* In our system we had a postgres connection error during Variable.set
resulting in the variable being deleted. The intention of this change is
that an error should leave the variable unchanged.

(cherry picked from commit 5483ae4)
ashb pushed a commit that referenced this pull request Dec 17, 2019
)

Why:
* In our system we had a postgres connection error during Variable.set
resulting in the variable being deleted. The intention of this change is
that an error should leave the variable unchanged.

(cherry picked from commit 5483ae4)
ashb pushed a commit that referenced this pull request Dec 19, 2019
)

Why:
* In our system we had a postgres connection error during Variable.set
resulting in the variable being deleted. The intention of this change is
that an error should leave the variable unchanged.

(cherry picked from commit 5483ae4)
galuszkak pushed a commit to FlyrInc/apache-airflow that referenced this pull request Mar 5, 2020
…ache#6807)

Why:
* In our system we had a postgres connection error during Variable.set
resulting in the variable being deleted. The intention of this change is
that an error should leave the variable unchanged.
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