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 2021/07/15 17:22:14 UTC

[GitHub] [airflow] evanhlavaty opened a new issue #17035: KubernetesPodOperator 'pod_template_file' not found

evanhlavaty opened a new issue #17035:
URL: https://github.com/apache/airflow/issues/17035


   **Apache Airflow version**: 2.1.2-python3.8 docker image
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`): 1.19.7
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: On premise K8 cluster
   
   **What happened**:
   
   I have a yaml file mounted to my container that gets spun up per DAG task. This file is then referenced by the KubernetesPodOperator parameter 'pod_template_file'. After upgrading from 2.10 to 2.1.2 I get the following error:
   
   [2021-07-15 17:10:12,672] {taskinstance.py:1501} ERROR - Task failed with exception
   Traceback (most recent call last):
     File "/home/airflow/.local/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 1157, in _run_raw_task
       self._prepare_and_execute_task_with_callbacks(context, task)
     File "/home/airflow/.local/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 1294, in _prepare_and_execute_task_with_callbacks
       self.render_templates(context=context)
     File "/home/airflow/.local/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 1793, in render_templates
       self.task.render_template_fields(context)
     File "/home/airflow/.local/lib/python3.8/site-packages/airflow/models/baseoperator.py", line 992, in render_template_fields
       self._do_render_template_fields(self, self.template_fields, context, jinja_env, set())
     File "/home/airflow/.local/lib/python3.8/site-packages/airflow/models/baseoperator.py", line 1005, in _do_render_template_fields
       rendered_content = self.render_template(content, context, jinja_env, seen_oids)
     File "/home/airflow/.local/lib/python3.8/site-packages/airflow/models/baseoperator.py", line 1040, in render_template
       return jinja_env.get_template(content).render(**context)
     File "/home/airflow/.local/lib/python3.8/site-packages/jinja2/environment.py", line 883, in get_template
       return self._load_template(name, self.make_globals(globals))
     File "/home/airflow/.local/lib/python3.8/site-packages/jinja2/environment.py", line 857, in _load_template
       template = self.loader.load(self, name, globals)
     File "/home/airflow/.local/lib/python3.8/site-packages/jinja2/loaders.py", line 115, in load
       source, filename, uptodate = self.get_source(environment, name)
     File "/home/airflow/.local/lib/python3.8/site-packages/jinja2/loaders.py", line 197, in get_source
       raise TemplateNotFound(template)
   jinja2.exceptions.TemplateNotFound: /opt/airflow/pod_templates/base_pod_operator_file.yaml
   
   
   This worked in 2.1.0 flawlessly. I have confirmed the file exists inside the container at the correct path. I have changed nothing in my helm chart besides the airflow image version.
   
   
   **What you expected to happen**:
   The KubernetesPodOperator to find the file at the provided file path.
   
   **How to reproduce it**:
   Use the KubernetesPodOperator and pass a file path to the pod_template_file parameter.
   
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] evanhlavaty closed issue #17035: KubernetesPodOperator 'pod_template_file' template not found, after upgrading 2.1.0 -> 2.1.2

Posted by GitBox <gi...@apache.org>.
evanhlavaty closed issue #17035:
URL: https://github.com/apache/airflow/issues/17035


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] raphaelauv commented on issue #17035: KubernetesPodOperator 'pod_template_file' template not found, after upgrading 2.1.0 -> 2.1.2

Posted by GitBox <gi...@apache.org>.
raphaelauv commented on issue #17035:
URL: https://github.com/apache/airflow/issues/17035#issuecomment-881924823


   same issue than https://github.com/apache/airflow/issues/16922
   
   you can close


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] raphaelauv edited a comment on issue #17035: KubernetesPodOperator 'pod_template_file' template not found, after upgrading 2.1.0 -> 2.1.2

Posted by GitBox <gi...@apache.org>.
raphaelauv edited a comment on issue #17035:
URL: https://github.com/apache/airflow/issues/17035#issuecomment-881924823


   same issue than https://github.com/apache/airflow/issues/16922
   
   you can probably close


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] evanhlavaty commented on issue #17035: KubernetesPodOperator 'pod_template_file' template not found, after upgrading 2.1.0 -> 2.1.2

Posted by GitBox <gi...@apache.org>.
evanhlavaty commented on issue #17035:
URL: https://github.com/apache/airflow/issues/17035#issuecomment-881964948


   I will close and monitor to make sure commit fixes the issue, thanks. 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] raphaelauv commented on issue #17035: KubernetesPodOperator 'pod_template_file' template not found, after upgrading 2.1.0 -> 2.1.2

Posted by GitBox <gi...@apache.org>.
raphaelauv commented on issue #17035:
URL: https://github.com/apache/airflow/issues/17035#issuecomment-892159335


   check this https://github.com/apache/airflow/issues/16922#issuecomment-892153152


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #17035: KubernetesPodOperator 'pod_template_file' not found

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #17035:
URL: https://github.com/apache/airflow/issues/17035#issuecomment-880878203


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org