Skip to content

fix: dry-run crash for invalid reference check in soda contract test#2604

Merged
m1n0 merged 1 commit intomainfrom
dtl-1703-fix-soda-contract-test-crash-with-valid_reference_data-check
Mar 2, 2026
Merged

fix: dry-run crash for invalid reference check in soda contract test#2604
m1n0 merged 1 commit intomainfrom
dtl-1703-fix-soda-contract-test-crash-with-valid_reference_data-check

Conversation

@m1n0
Copy link
Contributor

@m1n0 m1n0 commented Feb 25, 2026

Description

Please provide a description of your changes:

Fixes contract test where it would crash if reference check was present

fully vibe-coded

Checklist

  • I added a test to verify the new functionality.
  • I verified this PR does not break soda-extensions.

@m1n0 m1n0 requested a review from paulteehan February 25, 2026 18:10
@sonarqubecloud
Copy link

Copy link
Contributor

@mivds mivds left a comment

Choose a reason for hiding this comment

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

Code change looks okay, but I think the test case needs a change


assert result is not None
errors_str = result.get_errors_str()
assert errors_str is None or "sql_dialect" not in errors_str
Copy link
Contributor

Choose a reason for hiding this comment

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

The second part of the assert here seems a little strange. Errors are allowed, as long as they are not about the sql_dialect? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, I wouldn't do this myself but it makes the test resilient, in case something more basic breaks this test won't necessarily fail, which is not a bad approach imo. I think I would like to try this approach, unless you think it's a blocker

@m1n0 m1n0 merged commit fe469e2 into main Mar 2, 2026
41 checks passed
@m1n0 m1n0 deleted the dtl-1703-fix-soda-contract-test-crash-with-valid_reference_data-check branch March 2, 2026 14:29
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