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

[Bug] Add test for 9682 in core against 1.8 and fix replace MV macros #912

Closed
2 tasks done
VersusFacit opened this issue Feb 27, 2024 · 2 comments · Fixed by #913 or #946
Closed
2 tasks done

[Bug] Add test for 9682 in core against 1.8 and fix replace MV macros #912

VersusFacit opened this issue Feb 27, 2024 · 2 comments · Fixed by #913 or #946
Assignees
Labels
backport 1.7.latest Tag for PR to be backported to the 1.7.latest branch bug Something isn't working

Comments

@VersusFacit
Copy link
Contributor

VersusFacit commented Feb 27, 2024

Is this a new bug in dbt-redshift?

  • I believe this is a new bug in dbt-redshift
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

  1. No test for this core fix.

  2. Replace macros for materialized view generate SQL. Currently the create statement is missing from what is sent to Redshift which leads to query empy error.

Sample logs of test failure here

FAILED tests/functional/adapter/test_ephemeral.py::TestEphemeralMultiSnowflake::test_ephemeral_multi - assert "createorrepl...er='Female');" == 'createview"d...=\'Female\');'
FAILED tests/functional/adapter/dynamic_table_tests/test_dynamic_tables_basic.py::TestSnowflakeDynamicTableBasic::test_dynamic_table_replaces_table - AssertionError: dbt exit state did not match expected
FAILED tests/functional/adapter/dynamic_table_tests/test_dynamic_tables_basic.py::TestSnowflakeDynamicTableBasic::test_dynamic_table_replaces_view - AssertionError: dbt exit state did not match expected

Expected Behavior

Have a test for the internal variables!

Proper materialized view SQL generates and passes the tests.

Steps To Reproduce

To trigger the test failure, integrate the fix here into your branch, then watch integration tests fail. Open logger and you'll find the malformed query that jumps straight to backup without a create predicate.

Relevant log output

No response

Environment

- OS:
- Python:
- dbt-core:
- dbt-redshift:

Additional Context

No response

@VersusFacit VersusFacit added the bug Something isn't working label Feb 27, 2024
@VersusFacit VersusFacit self-assigned this Feb 27, 2024
@VersusFacit VersusFacit added the High Severity bug with significant impact that should be resolved in a reasonable timeframe label Feb 27, 2024
@Fleid
Copy link
Contributor

Fleid commented Feb 29, 2024

Hey @VersusFacit, moving this to unestimated, but should it be in progress in a sprint?

@martynydbt martynydbt added tech_debt and removed bug Something isn't working High Severity bug with significant impact that should be resolved in a reasonable timeframe labels Mar 1, 2024
@VersusFacit VersusFacit added the bug Something isn't working label Mar 6, 2024
@VersusFacit VersusFacit changed the title [Bug] Add test for 9682 in core against 1.8 [Bug] Add test for 9682 in core against 1.8 and fix replace MV macros Mar 19, 2024
@martynydbt martynydbt assigned mikealfare and unassigned VersusFacit Mar 20, 2024
@mikealfare
Copy link
Contributor

Re-opening for backports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.7.latest Tag for PR to be backported to the 1.7.latest branch bug Something isn't working
Projects
None yet
4 participants