feat(testing): Add test for migrations#574
Merged
kodiakhq[bot] merged 4 commits intomainfrom Jan 5, 2023
Merged
Conversation
⏱️ Benchmark results
|
erezrokah
approved these changes
Jan 5, 2023
Member
erezrokah
left a comment
There was a problem hiding this comment.
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
kodiakhq bot
pushed a commit
to cloudquery/cloudquery
that referenced
this pull request
Jan 5, 2023
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
kodiakhq bot
pushed a commit
to cloudquery/cloudquery
that referenced
this pull request
Jan 5, 2023
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
yevgenypats
approved these changes
Jan 5, 2023
hermanschaaf
pushed a commit
that referenced
this pull request
Jan 5, 2023
🤖 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 file contains hidden or 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
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.
This adds a test to the test suite specifically for migrations. It validates that: