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 error diagnostics when receiving an unknown value from ReadResource or UpgradeResourceState #34525

Merged
merged 4 commits into from
Jan 15, 2024

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Jan 12, 2024

Add error diagnostics to catch when we find an unknown value from ReadResource or UpgradeResourceState. An unknown value is not valid in either of these cases, but the current error is not helpful and only returns a generic error about failed state serialization.

Fixes #34502
Fixes #34503

@jbardin jbardin requested a review from bflad January 12, 2024 20:25
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Straightforward enough! I'm personally okay with the generic/easier implementation of saying there's unknown values somewhere, rather than spending effort on a more in-depth walk to output the paths to those unknown values. I'm hoping we'll do that more exhaustive solution on the provider side to ease fixing this situation.

Do we want/need to do this with the very new MoveResourceState too while we're here?

Regardless, looks good to me.

@jbardin
Copy link
Member Author

jbardin commented Jan 12, 2024

Yeah, this is something that shouldn’t have gotten this far in the first place, but we at least want a useful message. I don’t think we need to dig too deep, which would also mean formatting complex structures and dealing with sensitive values. I’ll add the same check to MoveResourceState while we’re at it!

@jbardin jbardin merged commit 4d1499b into main Jan 15, 2024
@jbardin jbardin deleted the jbardin/unknown-errors branch January 15, 2024 17:38
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 Feb 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants