Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cosmos/dbt/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ def save_dbt_ls_cache(self, dbt_ls_output: str) -> None:
with remote_cache_key_path.open("w") as fp:
json.dump(cache_dict, fp)
else:
Variable.set(self.cache_key, cache_dict, serialize_json=True)
Variable.set(f"{self.cache_key}_dbt_ls", cache_dict, serialize_json=True)

def _get_dbt_ls_remote_cache(self, remote_cache_dir: Path | ObjectStoragePath) -> dict[str, str]:
"""Loads the remote cache for dbt ls."""
Expand Down Expand Up @@ -559,7 +559,7 @@ def get_dbt_ls_cache(self) -> dict[str, str]:
cache_dict = (
self._get_dbt_ls_remote_cache(remote_cache_dir)
if remote_cache_dir
else Variable.get(self.cache_key, deserialize_json=True)
else Variable.get(f"{self.cache_key}_dbt_ls", deserialize_json=True)
)
except tuple(airflow_variable_exceptions):
return cache_dict
Expand Down Expand Up @@ -980,7 +980,7 @@ def get_yaml_selectors_cache(self) -> dict[str, Any]:
cache_dict = (
self._get_yaml_selectors_remote_cache(remote_cache_dir)
if remote_cache_dir
else Variable.get(self.cache_key, deserialize_json=True)
else Variable.get(f"{self.cache_key}_yaml_selectors", deserialize_json=True)
)
except tuple(airflow_variable_exceptions):
return cache_dict
Expand Down Expand Up @@ -1039,7 +1039,7 @@ def save_yaml_selectors_cache(self, yaml_selectors: YamlSelectors) -> None:
with remote_cache_key_path.open("w") as fp:
json.dump(cache_dict, fp)
else:
Variable.set(self.cache_key, cache_dict, serialize_json=True)
Variable.set(f"{self.cache_key}_yaml_selectors", cache_dict, serialize_json=True)

def parse_yaml_selectors(self, selector_definitions: dict[str, Any]) -> YamlSelectors:
"""
Expand Down