fix: Relax plugin tables and columns validation#1203
Merged
kodiakhq[bot] merged 1 commit intocloudquery:mainfrom Sep 5, 2023
Merged
fix: Relax plugin tables and columns validation#1203kodiakhq[bot] merged 1 commit intocloudquery:mainfrom
kodiakhq[bot] merged 1 commit intocloudquery:mainfrom
Conversation
28ac73f to
fcf44ea
Compare
erezrokah
commented
Sep 5, 2023
| return nil | ||
| } | ||
|
|
||
| func (t *Table) ValidateName() error { |
Member
Author
There was a problem hiding this comment.
There's also a function to validate column names, but I kept it due to
plugin-sdk/transformers/struct.go
Line 370 in 3dbf2e9
hermanschaaf
approved these changes
Sep 5, 2023
Contributor
hermanschaaf
left a comment
There was a problem hiding this comment.
We should definitely remove this from plugin initialization, but maybe let's create a ticket to do this kind of validation as part of the source plugin test suite? These checks can then be opt-in by default.
disq
approved these changes
Sep 5, 2023
Member
Author
Yeah, but should we test it on the source? I mean destinations have the restrictions on names, not sources, so how would the source know what to restrict? |
Closed
2 tasks
erezrokah
pushed a commit
that referenced
this pull request
Sep 5, 2023
🤖 I have created a release *beep* *boop* --- ## [4.7.1](v4.7.0...v4.7.1) (2023-09-05) ### Bug Fixes * Relax plugin tables and columns validation ([#1203](#1203)) ([59c3715](59c3715)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Member
Author
|
Opened cloudquery/cloudquery#14587 |
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.
Summary
Follow up to #1108. This PR relaxes the validation to check only for duplicates.
Some databases allow uppercase table names and the validation in the SDK seemed to be PostgreSQL oriented.
At some point we might want to have destination specific validation/normalization.
Related to https://discord.com/channels/872925471417962546/873606591335759872/1148643989348679770
Use the following steps to ensure your PR is ready to be reviewed
go fmtto format your code 🖊golangci-lint run🚨 (install golangci-lint here)