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

plugin: diagnostics must be checked on all schema calls #30987

Merged
merged 1 commit into from May 4, 2022

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented May 3, 2022

We can no longer be assured that the particular instance of a provider we are using has had GetProviderSchema called, so the diagnostics may not have been previously checked. Always check the diagnostics, even if we're fetching a cached response, in order to provide a more meaningful error instead of a panic in the rare case where the rpc call failed.

Fixes #30655

We can no longer be assured that the particular instance of a provider
we are using has had GetProviderSchema called. Always check the
diagnostics even if we're fetching a cached response.
@jbardin jbardin added the 1.2-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label May 3, 2022
@jbardin jbardin requested a review from a team May 3, 2022 15:01
Copy link
Member

@kmoe kmoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. As mentioned, I think this is probably testable with tfexec and a provider that sleeps on GetSchema.

@jbardin jbardin merged commit b97c640 into main May 4, 2022
@jbardin jbardin deleted the jbardin/get-schema-diags branch May 4, 2022 15:18
@github-actions
Copy link

github-actions bot commented May 4, 2022

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

@github-actions
Copy link

github-actions bot commented Jun 4, 2022

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 Jun 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1.2-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

context cancellation can happen in any call
2 participants