Skip to content

Release 1.10.3#2204

Merged
tatiana merged 5 commits into
release-1.10from
release-1.10.3
Dec 16, 2025
Merged

Release 1.10.3#2204
tatiana merged 5 commits into
release-1.10from
release-1.10.3

Conversation

@tatiana
Copy link
Copy Markdown
Collaborator

@tatiana tatiana commented Dec 16, 2025

Bug Fixes

Comment thread cosmos/__init__.py Outdated
Some dbt projects are generic and are configured in a way that the
`packages-install-path` is jinja templated. For example:

```
packages-install-path: 'dbt_packages{{ "_" + env_var("dbt_packages_suffix","") if env_var("dbt_packages_suffix","")!="" }}'
```

When attempting to use this with
- `ProjectConfig.install_dbt_deps=True`
- `ProjectConfig.copy_dbt_packages=True`

Users who have this configuration face the following error:

```
[2025-12-11, 10:54:23 UTC] {local.py:474} INFO - Copying dbt packages to temporary folder.
[2025-12-11, 10:54:23 UTC] {project.py:77} INFO - Copying dbt packages to temporary folder...
[2025-12-11, 10:54:23 UTC] {taskinstance.py:3336} ERROR - Task failed with exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/airflow/models/taskinstance.py", line 776, in _execute_task
    result = _execute_callable(context=context, **execute_callable_kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/airflow/models/taskinstance.py", line 742, in _execute_callable
    return ExecutionCallableRunner(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/airflow/utils/operator_helpers.py", line 252, in run
    return self.func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/cosmos/operators/base.py", line 310, in execute
    self.build_and_run_cmd(context=context, cmd_flags=self.add_cmd_flags())
  File "/usr/local/lib/python3.11/site-packages/cosmos/operators/local.py", line 842, in build_and_run_cmd
    result = self.run_command(
             ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/cosmos/operators/local.py", line 601, in run_command
    self._clone_project(tmp_dir_path)
  File "/usr/local/lib/python3.11/site-packages/cosmos/operators/local.py", line 475, in _clone_project
    copy_dbt_packages(Path(self.project_dir), tmp_dir_path)
  File "/usr/local/lib/python3.11/site-packages/cosmos/dbt/project.py", line 91, in copy_dbt_packages
    shutil.copy2(src_path, dst_path)
  File "/usr/local/lib/python3.11/shutil.py", line 448, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/local/lib/python3.11/shutil.py", line 256, in copyfile
    with open(src, 'rb') as fsrc:
         ^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/airflow/dags/dbt/pr_3531_13_dbt_vip_enrichment/dbt_packages{{ "_" + env_var("dbt_packages_suffix","") if env_var("dbt_packages_suffix","")!="" }}'
```

This is because when we implemented
#1768 we did not
forsee the parameter could be a template.

This PR aims to solve this issue.

Observation: we'll need to release this not only as part of 1.12.0, but
also cherry-pick it and, exceptionally, backport it to v1.10.3 and
1.11.3.

(cherry picked from commit 4a906cd)
Comment thread cosmos/__init__.py
Comment thread cosmos/__init__.py Outdated
Comment thread CHANGELOG.rst Outdated
@tatiana tatiana merged commit 38d2a2a into release-1.10 Dec 16, 2025
3 checks passed
@tatiana tatiana deleted the release-1.10.3 branch December 16, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants