-
Notifications
You must be signed in to change notification settings - Fork 26
feat(testing): Add test for migrations #574
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
Conversation
⏱️ Benchmark results
|
erezrokah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, do we want to repeat the write/read test after each migration? For example if there's an extra column in the table, we expect it to have a null value after write
yevgenypats
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🪄
BigQuery migrations should not fail if there are extra columns present in the table. As long as the columns are not required, it should ignore those columns and add any extra ones required by CloudQuery table schemas. This allows users to add additional columns of their own, and it means that you can upgrade to a new minor version of a source plugin and roll back later without issues. This is tested in the new tests added in cloudquery/plugin-sdk#574 - Fixes #6364
This changes the Read query to only select the columns defined in the table schema, so that user-defined columns are ignored. Since Read is only used in tests, this only affects testing right now. This change should allow the new test in cloudquery/plugin-sdk#574 to pass
🤖 I have created a release *beep* *boop* --- ## [1.21.0](v1.20.0...v1.21.0) (2023-01-05) ### Features * **testing:** Add test for migrations ([#574](#574)) ([071a4e5](071a4e5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This adds a test to the test suite specifically for migrations. It validates that: