qlemaire22 edited a comment on issue #6124: [AIRFLOW-5501] in_cluster default 
value in KubernetesPodOperator overwrites configuration
URL: https://github.com/apache/airflow/pull/6124#issuecomment-534082214
 
 
   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.
   For example this test in 
[`tests/minikube/test_kubernetes_pod_operator.py`](https://github.com/apache/airflow/blob/master/tests/minikube/test_kubernetes_pod_operator.py):
 
   ```
   def test_working_pod(self):
           k = KubernetesPodOperator(
               namespace='default',
               image="ubuntu:16.04",
               cmds=["bash", "-cx"],
               arguments=["echo 10"],
               labels={"foo": "bar"},
               name="test",
               task_id="task"
           )
           k.execute(None)
           actual_pod = self.api_client.sanitize_for_serialization(k.pod)
           self.assertEqual(self.expected_pod, actual_pod)
   ```
   
   It does not specify the `in_cluster` argument. Therefore, the old behavior 
was to use `in_cluster=False` which was the default value. Now, it is using the 
value defined in the config which is `in_cluster=True` [(link to the 
config)](https://github.com/apache/airflow/blob/master/scripts/ci/kubernetes/kube/templates/configmaps.template.yaml).
   
   Therefore, the test is now different and it is the case for every failing 
test.
   
   Shall I modify the failing tests to include the `in_cluster=False` argument 
to come back to the old behavior or shall I try to solve the `Service host/port 
is not set` error which seems to be caused by some missing environment 
variables? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to