Skip to content

Commit

Permalink
Do not block Cosmos from work if there is a jinja issue in the Openli…
Browse files Browse the repository at this point in the history
  • Loading branch information
tatiana committed Oct 25, 2023
1 parent ad7dcf0 commit 463b97f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cosmos/operators/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import warnings

import airflow
import jinja2
import yaml
from airflow import DAG
from airflow.compat.functools import cached_property
Expand Down Expand Up @@ -283,7 +284,7 @@ def calculate_openlineage_events_completes(
try:
events = openlineage_processor.parse()
self.openlineage_events_completes = events.completes
except (FileNotFoundError, NotImplementedError, ValueError, KeyError):
except (FileNotFoundError, NotImplementedError, ValueError, KeyError, jinja2.exceptions.UndefinedError):
logger.debug("Unable to parse OpenLineage events", stack_info=True)

def get_datasets(self, source: Literal["inputs", "outputs"]) -> list[Dataset]:
Expand Down

0 comments on commit 463b97f

Please sign in to comment.