Skip to content
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

Add 'explicit configuration required' message when provider schema validation fails #34595

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

liamcervante
Copy link
Member

@liamcervante liamcervante commented Jan 31, 2024

Currently, when the ValidateProviderConfig RPC fails as part of schema validation for a generated provider configuration block, we add an additional sourceless diagnostic that adds some context around the provider that failed saying the user should add an explicit configuration block.

We do not currently do this if the schema validation itself fails (such as missing a required attribute). This PR adds the same error message we generate for the failed provider validation call to the earlier schema validation. The logic is exactly the same: if a generated configuration block fails validation it means the user must write it themselves.

Fixes #34594
Fixes #28482

Target Release

1.7.2

Draft CHANGELOG entry

ENHANCEMENTS

  • Add additional diagnostics when a generated provider block that fails schema validation requires explicit configuration.

@liamcervante liamcervante added the 1.7-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Jan 31, 2024
@liamcervante liamcervante requested a review from a team January 31, 2024 11:04
@liamcervante liamcervante merged commit 9c39e51 into main Jan 31, 2024
6 checks passed
Copy link
Contributor

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

Copy link
Contributor

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1.7-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged
Projects
None yet
2 participants