-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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-5501] in_cluster default value in KubernetesPodOperator overwrites configuration #6124
Conversation
066cf0a
to
fe1dd5e
Compare
fe1dd5e
to
b62879a
Compare
Fix committer. |
Travis is sad. Can you do rebase? |
58b9c63
to
1816f11
Compare
The default value of the parameter in_cluster of the kube_client.get_kube_client function is in_cluster=conf.getboolean('kubernetes', 'in_cluster'). Therefore, the expected behavior is that when, in_cluster is not set, it takes the value in the configuration file. However, the default value of in_cluster in KubernetesPodOperator.py is False and in_cluster is passed as a parameter when calling the kube_client.get_kube_client function. Therefore, it changes the expecting behavior by overwritting the default value. When in_cluster is not set when initializing KubernetesPodOperator, the value of in_cluster in kube_client.get_kube_client is False and not the value which is in the configuration file. Therefore, the default value of in_cluster in KubernetesPodOperator has been changed to None and will not be passed to get_kube_client if it is not overwritten so that it takes the configuration value as a default value.
1816f11
to
aaf5013
Compare
I did the rebase, but there are still some errors and Travis is still sad. After some investigation, I realised that my changes were modifying the behavior of some tests.
It does not specify the Therefore, the test is now different and it is the case for every failing test. Shall I modify the failing tests to include the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Codecov Report
@@ Coverage Diff @@
## master #6124 +/- ##
==========================================
- Coverage 83.8% 83.48% -0.33%
==========================================
Files 669 669
Lines 37564 37566 +2
==========================================
- Hits 31480 31361 -119
- Misses 6084 6205 +121
Continue to review full report at Codecov.
|
The tests are successful now. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@dimberman @qlemaire22 I think this fix is simple and important. |
@RosterIn because it got forgotten about. Ive tried resolving the conflicts. Hopefully the test will still pass. |
seems there is an issue @qlemaire22 To my understanding |
…or respect config (apache#6124) The default value of the parameter in_cluster of the kube_client.get_kube_client function is in_cluster=conf.getboolean('kubernetes', 'in_cluster'). Therefore, the expected behavior is that when, in_cluster is not set, it takes the value in the configuration file. However, the default value of in_cluster in KubernetesPodOperator.py is False and in_cluster is passed as a parameter when calling the kube_client.get_kube_client function. Therefore, it changes the expecting behavior by overwritting the default value. When in_cluster is not set when initializing KubernetesPodOperator, the value of in_cluster in kube_client.get_kube_client is False and not the value which is in the configuration file. Therefore, the default value of in_cluster in KubernetesPodOperator has been changed to None and will not be passed to get_kube_client if it is not overwritten so that it takes the configuration value as a default value. Co-authored-by: Ash Berlin-Taylor <[email protected]>
Make sure you have checked all steps below.
Jira
Description
Hi!
The default value of the parameter in_cluster of the kube_client.get_kube_client function is in_cluster=conf.getboolean('kubernetes', 'in_cluster'). Therefore, the expected behavior is that when, in_cluster is not set, it takes the value in the configuration file.
However, the default value of in_cluster in KubernetesPodOperator.py is False and in_cluster is passed as a parameter when calling the kube_client.get_kube_client function. Therefore, it changes the expecting behavior by overwritting the default value. When in_cluster is not set when initializing KubernetesPodOperator, the value of in_cluster in kube_client.get_kube_client is False and not the value which is in the configuration file.
It is quite confusing because it can feel like the value in the configuration file is not working properly.
Therefore, I changed the default value of the in_cluster parameter in KubernetesPodOperator so that it takes the value of the configuration file as a default and expected value instead of False as it is now.
Tests
Commits
Documentation