You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/06/19 19:41:59 UTC

[GitHub] [airflow] pgagnon commented on a change in pull request #5429: [AIRFLOW-4516] K8s runAsUser and fsGroup cannot be strings

pgagnon commented on a change in pull request #5429: [AIRFLOW-4516] K8s runAsUser and fsGroup cannot be strings
URL: https://github.com/apache/airflow/pull/5429#discussion_r295491433
 
 

 ##########
 File path: airflow/executors/kubernetes_executor.py
 ##########
 @@ -157,8 +157,8 @@ def __init__(self):
         self.dags_in_image = conf.getboolean(self.kubernetes_section, 'dags_in_image')
 
         # Run as user for pod security context
-        self.worker_run_as_user = conf.get(self.kubernetes_section, 'run_as_user')
-        self.worker_fs_group = conf.get(self.kubernetes_section, 'fs_group')
+        self.worker_run_as_user = conf.getint(self.kubernetes_section, 'run_as_user')
 
 Review comment:
   Test failure from Travis:
   ```
   �[33m======================================================================�[0m
   �[33m48) ERROR: test_run_next_exception (tests.executors.test_kubernetes_executor.TestKubernetesExecutor)�[0m
   �[33m----------------------------------------------------------------------�[0m
   �[0m   Traceback (most recent call last):�[0m
       �[34m/usr/lib/python3.5/unittest/mock.py�[0m line �[1m�[36m1157�[0m�[0m in �[36mpatched�[0m
         return func(*args, **keywargs)
       �[34mtests/executors/test_kubernetes_executor.py�[0m line �[1m�[36m677�[0m�[0m in �[36mtest_run_next_exception�[0m
         kubernetesExecutor = KubernetesExecutor()
       �[34mairflow/executors/kubernetes_executor.py�[0m line �[1m�[36m624�[0m�[0m in �[36m__init__�[0m
         self.kube_config = KubeConfig()
       �[34mairflow/executors/kubernetes_executor.py�[0m line �[1m�[36m160�[0m�[0m in �[36m__init__�[0m
         self.worker_run_as_user = conf.getint(self.kubernetes_section, 'run_as_user')
       �[34mairflow/configuration.py�[0m line �[1m�[36m277�[0m�[0m in �[36mgetint�[0m
         return int(self.get(section, key, **kwargs))
   �[33m   �[33m�[1m�[33mValueError�[0m�[0m�[33m: �[0m�[33minvalid literal for int() with base 10: ''�[0m
   ```
   Please ensure that an empty string is not passed to `conf.getint()` if the configuration options are empty.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services