generated from liquibase/liquibase-extension-example
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Support "Advanced" level validation #28
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set up support to begin running contributed tests with init script, and addColumn change type tests passing
1. Finished Contributed Tests (loadUpdateData, etc.) 2. Make GitActions do each testing level in series to not disturb the others
1. Fix Foreign Key Snapshotting 2. Start createIndex change type mapping to CLUSTER BY
Add Databricks specific change type support.
Add support and tests for creating partitioned tables
Finish Advanced Test Harness
Updating to the most recent version of the build logic to see if the Sonar scan issue is fixed.
…base-databricks into advanced-support
filipelautert
approved these changes
Sep 28, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Ensures the extension meets the "advanced" support level requirements https://www.liquibase.com/supported-databases/verification-levels
Notes
Adds additional test-harness suites:
ContributedExtensionHarnessTestSuite
which mostly tests that the standard change tests either work correctly or are known to be supported.AdvacedExtensionHarnessSuite
which checks the generate-changelog logic and the snapshot logic more directlyYou can run them locally, and they are set up to run on the the build system. The ContributedExtensionSupport is probably the best one to start with
The build system side will need some updates to the terraform and/or execution setup. They run concurrently, so we'll need separate schemas or something so they don't get in the way of each other. I'm not sure the best way to configure that yet, so I just left it as failing and we'll work on it later.
For getting the advanced/contributed tests to pass, some good starting spots for the test-harness:
The high-level version of those links, is that the test-harness library ships with a bunch of tests within it, with those tests example changelog files and then standard "expectation" files.
Example:
liquibase/harness/change/changelogs/createTable.xml
file which creates a table. The existence of this changelog file defines that there is a "createTable" testliquibase/harness/change/expectedSql/databricks/createTable.sql
file that has the SQL ran for to you to ensure looks correct and will be used going forward to ensure there are no unexpected changes to that SQL. If the bundled test is not valid for your database, you can put "INVALID TEST" and a reason in this file and it will know to skip the testliquibase/harness/change/expectedSnapshot/createTable.json
file to check that the table was created correctly, but if that doesn't match what correctly comes back from databricks for some reason, you can create aliquibase/harness/change/expectedSnapshot/databricks/createTable.json
with whatever is correct for you.