Skip to content

Restore functionality to dynamically resolved user-provided node types#2608

Merged
tatiana merged 2 commits into
astronomer:mainfrom
jroachgolf84:fix/restore-dynamically-resolved-node-types
May 1, 2026
Merged

Restore functionality to dynamically resolved user-provided node types#2608
tatiana merged 2 commits into
astronomer:mainfrom
jroachgolf84:fix/restore-dynamically-resolved-node-types

Conversation

@jroachgolf84
Copy link
Copy Markdown
Contributor

@jroachgolf84 jroachgolf84 commented Apr 23, 2026

Description

Per issue #2393, DbtResourceType.EXPOSURE nodes defined in render_config.node_converters are silently ignored during DAG rendering, producing the following warning instead:

{graph.py:426} WARNING - Unavailable conversion function for <DbtResourceType.EXPOSURE>
(node <exposure.{project_name}.{node_name}>). Define a converter function using render_config.node_converters.

Previously, #2576 was opened to address this only for DbtResourceType.EXPOSUREs. However, @tatiana called out that this functionality was actually deprecated for more than just Exposures. Thus, this PR was created to ensure that all node types with node_converters specified by the user are properly rendered using their desired function.

Testing

This was tested with the addition of two new unit-tests (as well as the successful execution of previous unit-tests). There were:

  • test_generate_task_or_group_with_dynamic_node_type_and_converter
  • test_generate_task_or_group_with_dynamic_node_type_no_converter_returns_none

These changes were also tested E2E using the example_cosmos_sources DAG. Before this change was made, the source and exposure node types were not rendered in the UI, despite being explicitly added to the RenderConfig.node_converters. Following the change, those nodes were properly rendered. See the image below.

image

Related Issue(s)

closes: #2393

Breaking Change?

No, this is not a breaking change.

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

tatiana pushed a commit that referenced this pull request Apr 27, 2026
The `example_cosmos_sources` DAG in the
`dev/dags/example_cosmos_sources.py` file was improperly mapped to the
`jaffle_shop` project, rather than the `altered_jaffle_shop` project.
The `ProfileConfig` in the DAG pointed to `altered_jaffle_shop`, and the
`jaffle_shop` had no dbt Sources to render. Thus, it seemed as if this
change was needed.

The work done in #2608 will ensure that these dbt Sources are properly
rendered using the `node_converters` supplied in the DAG itself.

## Testing

These changes were tested E2E by spinning up Airflow and testing the
DAG.
@tatiana tatiana changed the title fix/response-dynamically-resolved-node-types: Restore functionality to dynamically resolved user-provided node types Restore functionality to dynamically resolved user-provided node types Apr 28, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.05%. Comparing base (0f39a04) to head (d0d2fa8).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2608   +/-   ##
=======================================
  Coverage   98.05%   98.05%           
=======================================
  Files         104      104           
  Lines        7762     7765    +3     
=======================================
+ Hits         7611     7614    +3     
  Misses        151      151           

☔ 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, @jroachgolf84 , thanks a lot for the improvements!

@tatiana tatiana merged commit 7924116 into astronomer:main May 1, 2026
125 checks passed
@tatiana tatiana added this to the Cosmos 1.15.0 milestone May 28, 2026
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.

[Bug] DbtResourceType.EXPOSURE is not rendered since v1.12.0

2 participants