Skip to content

Fix ExecutionMode.WATCHER to use install_dbt_deps from ProjectConfig#2112

Merged
tatiana merged 1 commit into
astronomer:mainfrom
michal-mrazek:fix-watcher-dbt-deps
Nov 11, 2025
Merged

Fix ExecutionMode.WATCHER to use install_dbt_deps from ProjectConfig#2112
tatiana merged 1 commit into
astronomer:mainfrom
michal-mrazek:fix-watcher-dbt-deps

Conversation

@michal-mrazek
Copy link
Copy Markdown
Contributor

@michal-mrazek michal-mrazek commented Nov 11, 2025

Description

With the new ExecutionMode.WATCHER, the decision if we install dbt deps should be done in the same manner as LOCAL or VIRTUALENV execution modes.

So I am changing the code to use the ProjectConfig settings for dbt deps to also work with the Watcher and now it will be in sync with the documentation.

Related Issue(s)

#2099

Breaking Change?

No

Checklist

  • I have made corresponding changes to the documentation (if required)
  • I have added tests that prove my fix is effective or that my feature works

Copilot AI review requested due to automatic review settings November 11, 2025 13:05
@netlify
Copy link
Copy Markdown

netlify Bot commented Nov 11, 2025

Deploy Preview for sunny-pastelito-5ecb04 canceled.

Name Link
🔨 Latest commit 94ec5b0
🔍 Latest deploy log https://app.netlify.com/projects/sunny-pastelito-5ecb04/deploys/6913349f92d12a00086689b5

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug where the ExecutionMode.WATCHER execution mode was not respecting the install_dbt_deps setting from ProjectConfig, unlike the LOCAL and VIRTUALENV execution modes. The change aligns the behavior of WATCHER mode with the documentation and the other execution modes.

Key Changes:

  • Updated the condition in override_configuration function to include ExecutionMode.WATCHER alongside LOCAL and VIRTUALENV when determining whether to use ProjectConfig.install_dbt_deps
  • Added comprehensive test cases covering all combinations of WATCHER mode with various install_deps configurations

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
cosmos/converter.py Added ExecutionMode.WATCHER to the conditional check for applying install_dbt_deps from ProjectConfig
tests/test_converter.py Added test cases for ExecutionMode.WATCHER with different install_deps configurations and updated test documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.81%. Comparing base (11d9661) to head (94ec5b0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2112   +/-   ##
=======================================
  Coverage   97.81%   97.81%           
=======================================
  Files          92       92           
  Lines        5948     5948           
=======================================
  Hits         5818     5818           
  Misses        130      130           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

This looks great, thank you very much, @michal-mrazek ! We'll release this fix as part of Cosmos 1.11.1

@tatiana tatiana merged commit ce87c97 into astronomer:main Nov 11, 2025
85 checks passed
@tatiana tatiana added this to the Cosmos 1.11.1 milestone Nov 11, 2025
tatiana pushed a commit that referenced this pull request Nov 12, 2025
…nfig` (#2112)

With the new ExecutionMode.WATCHER, the decision if we install dbt deps
should be done in the same manner as LOCAL or VIRTUALENV execution
modes.

So I am changing the code to use the ProjectConfig settings for dbt deps
to also work with the Watcher and now it will be in sync with the
documentation.

Closes: #2099
(cherry picked from commit ce87c97)
This was referenced Nov 13, 2025
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.

3 participants