Skip to content

Conversation

@filipelautert
Copy link
Collaborator

@filipelautert filipelautert commented Mar 27, 2023

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Since Liquibase 4.19.1 , any SQL error raised on Snowflake is being silently ignored . This PR fixes the issue.

Requires https://github.com/liquibase/liquibase-pro-tests/pull/734 to be merged together.

Fixes #3984

Copy link
Contributor

@StevenMassaro StevenMassaro left a comment

Choose a reason for hiding this comment

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

Please add an integration test for this.

Comment on lines +974 to +975
@Test
public void testInvalidSqlThrowsException() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not familiar with this class. Does this run against snowflake?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It runs to all configured databases on liquibase, but snowflake is not one of them. To test snowflake it needs to be on harness or liquibase-pro-tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

If I'm understanding correctly, since this fix is specific to Snowflake, this test does not cover it. Can you either add a test that does cover this fix or log a tech debt ticket to add integration tests for Snowflake (and also a test for this)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nice. So I'll keep those tests (as they work for the other local databases) , but will log a debt to handle Snowflake .

@filipelautert filipelautert added this to the 1NEXT milestone Mar 30, 2023
Copy link
Contributor

@XDelphiGrl XDelphiGrl left a comment

Choose a reason for hiding this comment

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

Liquibase was "eating" a Snowflake database error thrown by improper specification to create a column remark on a view. This fix re-throws the exception.

  • Functional and test harness executions passing.
  • No additional testing required.

APPROVED

@filipelautert filipelautert merged commit b54a30c into master Mar 31, 2023
@filipelautert filipelautert deleted the fix_snowflake_ignoring_db_exception branch March 31, 2023 18:22
sayaliM0412 pushed a commit that referenced this pull request Apr 3, 2023
* Rethrows the exception.

* Adding integration test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Liquibase docker image 4.20 ignores SQL errors on Snowflake

5 participants