Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure filtering with manifest loading works with single model #576

Merged
merged 7 commits into from
Oct 6, 2023

Conversation

jlaneve
Copy link
Collaborator

@jlaneve jlaneve commented Oct 5, 2023

Description

This PR fixes an issue with Cosmos' custom filtering methods. Previously, when using the manifest loading method (and thus Cosmos' custom filtering), a user could not filter by path to a specific model (only a directory). This PR fixes that issue and makes some minor refactors to the selecting logic to make it more intuitive and performant.

Related Issue(s)

Breaking Change?

No breaking changes.

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

@jlaneve jlaneve requested a review from a team as a code owner October 5, 2023 17:43
@jlaneve jlaneve requested a review from a team October 5, 2023 17:43
@netlify
Copy link

netlify bot commented Oct 5, 2023

👷 Deploy Preview for amazing-pothos-a3bca0 processing.

Name Link
🔨 Latest commit 147bc02
🔍 Latest deploy log https://app.netlify.com/sites/amazing-pothos-a3bca0/deploys/6520466f33b24a0008367c35

@jlaneve jlaneve temporarily deployed to internal October 5, 2023 17:43 — with GitHub Actions Inactive
@jlaneve jlaneve temporarily deployed to internal October 5, 2023 17:51 — with GitHub Actions Inactive
@pre-commit-ci pre-commit-ci bot temporarily deployed to internal October 5, 2023 17:52 Inactive
@jlaneve jlaneve temporarily deployed to internal October 5, 2023 20:08 — with GitHub Actions Inactive
@pre-commit-ci pre-commit-ci bot temporarily deployed to internal October 5, 2023 20:10 Inactive
@pre-commit-ci pre-commit-ci bot temporarily deployed to internal October 5, 2023 20:24 Inactive
@pre-commit-ci pre-commit-ci bot temporarily deployed to internal October 6, 2023 10:47 Inactive
Copy link
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.

Thanks for fixing and improving this, @jlaneve !

Happy to merge it once the checks pass.

@harels harels temporarily deployed to internal October 6, 2023 16:20 — with GitHub Actions Inactive
@jlaneve jlaneve temporarily deployed to internal October 6, 2023 17:40 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (6609f76) 92.83% compared to head (147bc02) 92.80%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #576      +/-   ##
==========================================
- Coverage   92.83%   92.80%   -0.04%     
==========================================
  Files          49       49              
  Lines        1983     2002      +19     
==========================================
+ Hits         1841     1858      +17     
- Misses        142      144       +2     
Files Coverage Δ
cosmos/dbt/selector.py 97.34% <94.28%> (-1.60%) ⬇️

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

Copy link
Contributor

@harels harels left a comment

Choose a reason for hiding this comment

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

nice!

cosmos/dbt/selector.py Show resolved Hide resolved
@harels harels merged commit 2e3e4fd into main Oct 6, 2023
38 of 39 checks passed
@harels harels deleted the manifest-single-node-path branch October 6, 2023 18:39
@tatiana tatiana added this to the 1.2.0 milestone Oct 10, 2023
@tatiana tatiana mentioned this pull request Oct 13, 2023
tatiana added a commit that referenced this pull request Oct 13, 2023
**Features**

* Add support to model versioning available since dbt 1.6 by @binhnq94
in #516
* Add AWS Athena profile mapping by @benjamin-awd in #578
* Support customizing how dbt nodes are converted to Airflow by @tatiana
in #503
* Make the arg ``dbt_project_path`` in the ``ProjectConfig`` optional by
@MrBones757 in #581

**Bug fixes**

* Fix Cosmos custom selector to support filtering a single model by
@jlaneve and @harels in #576
* Fix using ``GoogleCloudServiceAccountDictProfileMapping`` together
with ``LoadMethod.DBT_LS`` by @joppevos in #587
* Fix using the ``full_refresh`` argument in projects that contain tests
by @EgorSemenov and @tatiana in #590
* Stop creating symbolic links for ``dbt_packages`` (solves
``LocalExecutor`` concurrency issue) by @tatiana in #600

**Others**

* Docs: add reference to original Jaffle Shop project by @erdos2n in
#583
* Docs: retries & note about DagBag error by @TJaniF in #592
* pre-commit updates in #575 and #585
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