This repository was archived by the owner on Aug 12, 2022. It is now read-only.
Open
Conversation
disq
commented
Jul 22, 2022
| var diags diag.Diagnostics | ||
|
|
||
| // validate provider configuration before proceeding | ||
| validateResponse, err := p.ValidateProviderConfig(ctx, &cqproto.ValidateProviderConfigRequest{Config: request.Config}) |
Member
Author
There was a problem hiding this comment.
Every call to ConfigureProvider also runs ValidateProviderConfig. This also means we decode and defaultize the config twice: once in validate and one down below.
Contributor
|
Maybe worth doing a live walkthrough on this to go through all the cases. One questions in the meanwhile:
|
Contributor
|
Im working on a complete re-write of cloudquery core including no-diags so let's put this on hold for now as otherwise I wont be able to merge: |
yevgenypats
suggested changes
Jul 25, 2022
Contributor
yevgenypats
left a comment
There was a problem hiding this comment.
Going into a feature freeze in cloudquery core and sdk apart from P0 bugs until cloudquery v2 is done https://github.com/cloudquery/cloudquery
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Implements cloudquery/cloudquery#1104
I'm not sure if this is really necessary at this point, as we decode the config before validating schema anyway. If it doesn't decode cleanly we just stop there and don't go into the schema validation.
This PR also starts decoding the config in strict mode, unknown keys in the config will produce errors from now on.