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

[Feature]support breaking change analysis #574

Conversation

popcornylu
Copy link
Contributor

@popcornylu popcornylu commented Jan 9, 2025

This PR support he breaking change analysis.

For modified nodes, it will use raw(templated) sql code. A node would mark as non-breaking change if

  1. The sql sementic tree is identical
  2. Or only new column added
    Otherwise, it would mark as breaking change.

For non-breaking change, it will not mark the downstream as impacted. See the screenshot

image

PR checklist

  • Ensure you have added or ran the appropriate tests for your PR.
  • DCO signed

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

@popcornylu popcornylu force-pushed the feature/drc-1019-support-to-detect-a-model-as-non-breaking-non-ui branch 2 times, most recently from db5f74a to 25f5655 Compare January 16, 2025 09:57
@popcornylu popcornylu force-pushed the feature/drc-1019-support-to-detect-a-model-as-non-breaking-non-ui branch from 25f5655 to 9226149 Compare January 16, 2025 10:20
@popcornylu popcornylu force-pushed the feature/drc-1019-support-to-detect-a-model-as-non-breaking-non-ui branch from b036a96 to 37978c7 Compare January 17, 2025 02:20
Signed-off-by: popcorny <[email protected]>
Signed-off-by: popcorny <[email protected]>
Signed-off-by: popcorny <[email protected]>
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 81.21547% with 34 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
recce/adapter/base.py 10.00% 18 Missing ⚠️
recce/adapter/dbt_adapter/__init__.py 84.44% 7 Missing ⚠️
recce/util/breaking.py 83.33% 5 Missing ⚠️
tests/adapter/dbt_adapter/dbt_test_helper.py 33.33% 4 Missing ⚠️
Files with missing lines Coverage Δ
recce/core.py 63.05% <100.00%> (+0.05%) ⬆️
recce/models/types.py 98.64% <100.00%> (+0.11%) ⬆️
recce/server.py 52.61% <100.00%> (+0.15%) ⬆️
tests/adapter/dbt_adapter/test_selector.py 100.00% <100.00%> (ø)
tests/tasks/test_row_count.py 100.00% <100.00%> (ø)
tests/test_core.py 100.00% <100.00%> (ø)
tests/util/test_breaking.py 100.00% <100.00%> (ø)
tests/adapter/dbt_adapter/dbt_test_helper.py 88.34% <33.33%> (-3.41%) ⬇️
recce/util/breaking.py 83.33% <83.33%> (ø)
recce/adapter/dbt_adapter/__init__.py 65.81% <84.44%> (+1.45%) ⬆️
... and 1 more

... and 5 files with indirect coverage changes

@popcornylu popcornylu changed the title [Feature]support to detect a model as non-breaking change [Feature]support breaking change analysis Jan 17, 2025
@popcornylu popcornylu marked this pull request as ready for review January 17, 2025 09:24
@kentwelcome kentwelcome self-requested a review January 20, 2025 02:40
Copy link
Member

@kentwelcome kentwelcome left a comment

Choose a reason for hiding this comment

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

LGTM

@popcornylu popcornylu force-pushed the feature/drc-1019-support-to-detect-a-model-as-non-breaking-non-ui branch from 39c124e to 7f61d05 Compare January 20, 2025 08:57
@popcornylu popcornylu merged commit 99b65d7 into main Jan 20, 2025
11 checks passed
@popcornylu popcornylu deleted the feature/drc-1019-support-to-detect-a-model-as-non-breaking-non-ui branch January 20, 2025 09:31
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