Skip to content

Release 1.12.1#2229

Merged
tatiana merged 14 commits into
release-1.12from
release-1.12.1
Jan 14, 2026
Merged

Release 1.12.1#2229
tatiana merged 14 commits into
release-1.12from
release-1.12.1

Conversation

@pankajkoti
Copy link
Copy Markdown
Contributor

@pankajkoti pankajkoti commented Dec 29, 2025

Bug Fixes

Docs

Others

closes: https://github.com/astronomer/oss-integrations-private/issues/295

Co-authored-by: Tatiana Al-Chueyr tatiana.alchueyr@gmail.com

pankajastro and others added 6 commits December 29, 2025 08:54
Address:
#2198 (review)

This pull request adds a test to verify that profile metrics are
correctly handled when dealing with non-Cosmos operators. The test
ensures that when `_build_task_metrics` is called on a task instance
with a regular Airflow operator (not a dbt/Cosmos operator), the
profile-related metrics return appropriate `None` values.

**Key changes:**
- Added a `DummyOperator` class that extends `BaseOperator` without
Cosmos-specific functionality
- Added `test_profile_metrics_with_non_cosmos_operator()` to validate
metrics behavior with non-Cosmos operators
…2214)

Related to: #2141

This PR updates the documentation to reflect that dataset emission is
now supported in `ExecutionMode.AIRFLOW_ASYNC` since Cosmos 1.12.0. The
limitation that prevented dataset events from being emitted in async
mode has been resolved.

- Removes the documented limitation about dataset events not being
emitted in AIRFLOW_ASYNC mode
- Updates documentation to include AIRFLOW_ASYNC in the list of
execution modes supporting the `emit_datasets` feature
The PR fixes default values in the documentation for
`models_relative_path`, `seeds_relative_path` and
`snapshots_relative_path`.

Current values are taken from:

https://github.com/astronomer/astronomer-cosmos/blob/975ebae2b4c6ef75dd442678fb538771bc717829/cosmos/config.py#L166-L168

Before changes:
<img width="1128" height="457" alt="image"
src="https://github.com/user-attachments/assets/a6bad9b5-c508-48e6-b3fc-3a27ff9a1bfb"
/>

After changes:
<img width="1126" height="457" alt="image"
src="https://github.com/user-attachments/assets/9b0be6e8-a88f-4dca-b6f7-24794664c46e"
/>
## Description

Fix minor typo in the documentation.
When using ExecutionMode.WATCHER with InvocationMode.SUBPROCESS, the
_process_log_line_callable was being incorrectly bound as a method when
accessed through an instance. This caused Python's descriptor protocol
to pass 'self' as the first argument, resulting in:

TypeError: _store_dbt_resource_status_from_log() takes 2 positional
arguments but 3 were given

The fix wraps the function with staticmethod() to prevent binding when
accessed via self._process_log_line_callable.

Also adds comprehensive tests for the
_store_dbt_resource_status_from_log function and verifies the callable
is not bound as a method.

closes: #2224
`DbtSourceWatcherOperator` should inherit `template_fields` from its
parent `DbtSourceLocalOperator` instead of `DbtConsumerWatcherSensor`.
The previous assignment incorrectly included fields like
`model_unique_id` that do not exist on source operators, causing
`AttributeError` when using sources with tests in
`ExecutionMode.WATCHER` with
`SourceRenderingBehavior.WITH_TESTS_OR_FRESHNESS`.

closes: #2203
@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 29, 2025

Deploy Preview for astronomer-cosmos canceled.

Name Link
🔨 Latest commit 8511b6b
🔍 Latest deploy log https://app.netlify.com/projects/astronomer-cosmos/deploys/6967d6ecfef93900083edf8f

Add complete list of changes included in the 1.12.1a1 alpha release:
- Bug fixes for DbtSourceWatcherOperator and Watcher mode
- Documentation fixes and improvements
- Additional test coverage for profile metrics
Comment thread CHANGELOG.rst Outdated
Comment thread cosmos/__init__.py Outdated
Comment thread CHANGELOG.rst Outdated
Co-authored-by: Pankaj Koti <pankajkoti699@gmail.com>
Comment thread CHANGELOG.rst
Comment thread CHANGELOG.rst
@tatiana tatiana marked this pull request as ready for review January 14, 2026 17:28
Cosmos main branch Python 2.6 tests started failing, as observed while
testing Python 3.10, AF 2.6 and dbt 1.11:
```
=========================== short test summary info ============================
ERROR tests/operators/_asynchronous/test_base.py - AttributeError: module 'pyparsing' has no attribute 'DelimitedList'. Did you mean: 'delimitedList'?
ERROR tests/operators/_asynchronous/test_bigquery.py - AttributeError: module 'pyparsing' has no attribute 'DelimitedList'. Did you mean: 'delimitedList'?
ERROR tests/test_example_dags_no_connections.py - AssertionError: assert not {'/home/runner/work/astronomer-cosmos/astronomer-cosmos/dev/dags/simple_dag_async.py': 'Traceback (most recent call la...s.operators._asynchronous.bigquery.DbtRunAirflowAsyncBigqueryOperator. Unable to find the specified operator class.\n'}
 +  where {'/home/runner/work/astronomer-cosmos/astronomer-cosmos/dev/dags/simple_dag_async.py': 'Traceback (most recent call la...s.operators._asynchronous.bigquery.DbtRunAirflowAsyncBigqueryOperator. Unable to find the specified operator class.\n'} = <airflow.models.dagbag.DagBag object at 0x7ffa7ee04910>.import_errors
```

https://github.com/astronomer/astronomer-cosmos/actions/runs/20999444973/job/60365156803

The issue seemed to be conflicting dependencies, particularly the
installation of "httplib2==0.30.0" (failure) instead of
"httplib2==0.31.0" (success)

Example of success after this change:

https://github.com/astronomer/astronomer-cosmos/actions/runs/21002268536/job/60375248518
(cherry picked from commit dbaef2c)
Make our configuration validation more robust, to guide users when they
misconfigure Cosmos `RenderConfig.invocation_mode`.

This configuration should only be used if dbt is installed in the same
Python virtualenv as Cosmos.

Recently, I observed a customer incorrectly configuring Cosmos as
follows:
```
ExecutionConfig(
  dbt_executable_path=airflowHome + '/dbt_venv/bin/dbt',
  execution_mode=ExecutionMode.WATCHER,
  invocation_mode=InvocationMode.DBT_RUNNER
)
```

Which led to the error:
```
ModuleNotFoundError: No module named 'dbt'
```

This was raised in Cosmos 1.12, when trying to resolve `dbt.version`
```
cosmos/operators/watcher.py:_fallback_to_local_run → build_and_run_cmd → _generate_dbt_flags
```

(cherry picked from commit 4cfac69)
Copy link
Copy Markdown
Collaborator

@tatiana tatiana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks, @pankajkoti !

@tatiana tatiana merged commit 20fca9f into release-1.12 Jan 14, 2026
10 checks passed
@tatiana tatiana deleted the release-1.12.1 branch January 14, 2026 17:57
tatiana added a commit that referenced this pull request Jan 15, 2026
We recently cut a micro release related to 1.12.1:
#2229

This PR aims to keep the main branch changelog up-to-date.
tatiana added a commit that referenced this pull request Jan 15, 2026
We recently cut a micro release related to 1.12.1:
#2229

This PR aims to keep the main branch changelog up to date.
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.

4 participants