Skip to content

Conversation

@SamWheating
Copy link
Contributor

I was debugging another issue and running the official helm chart in Kind, and when I tried to run the example_python_operator DAG it failed on the log_sql_query task with the following error:

  File "/home/airflow/.local/lib/python3.7/site-packages/jinja2/environment.py", line 969, in _load_template
    template = self.loader.load(self, name, self.make_globals(globals))
  File "/home/airflow/.local/lib/python3.7/site-packages/jinja2/loaders.py", line 126, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/home/airflow/.local/lib/python3.7/site-packages/jinja2/loaders.py", line 218, in get_source
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: sql/sample.sql

Which then causes all of the downstream tasks to fail.

This is because the template used in the example DAG isn't bundled into the build. I suspect this might work in breeze because the source directory is mounted, but when Airflow is installed from pip it won't include this file.

Anyways, I think that this minor change should fix things.

@potiuk potiuk merged commit 9745032 into apache:main Mar 2, 2023
@pierrejeambrun pierrejeambrun added this to the Airflow 2.5.3 milestone Mar 22, 2023
@pierrejeambrun pierrejeambrun added the type:bug-fix Changelog: Bug Fixes label Mar 22, 2023
pierrejeambrun pushed a commit that referenced this pull request Mar 23, 2023
pierrejeambrun pushed a commit that referenced this pull request Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants