Skip to content

Conversation

@rainkwan
Copy link
Contributor

@rainkwan rainkwan commented Jul 8, 2025

Related Issue

Description

Added list resource validation and some missing tests

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

No

@rainkwan rainkwan requested a review from a team as a code owner July 8, 2025 15:51
@rainkwan rainkwan requested a review from bbasata July 15, 2025 13:15
"An unexpected error was encountered when converting the configuration from the protocol type. "+
"This is always an issue in terraform-plugin-framework used to implement the provider and should be reported to the provider developers.\n\n"+
"Please report this to the provider developer:\n\n"+
"Missing schema.",
Copy link
Contributor

Choose a reason for hiding this comment

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

💭 Here's a thought to consider – completely non-blocking for merging this PR.

While we're adding new kinds of schemas, I wonder if this diagnostic is precise enough to be actionable by a provider developer.

"Missing list resource schema for ``random_pet``" seems nice to have here. And also at odds with the universal message in fromproto6.Config().

So I'm curious how this diagnostic reads when it is rendered by the Terraform CLI and whether it includes precise context. If it's not precise, I suggest we adjust the Config diagnostic to be more flexible.

Copy link
Member

Choose a reason for hiding this comment

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

FWIW, this error message is only for our team, and isn't actionable by the provider developer outside of reporting it to us:

// Panic prevention here to simplify the calling implementations.
// This should not happen, but just in case.

The only way we'd hit this error is if there was a bug in Terraform core

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, no action here 🏁

"An unexpected error was encountered when converting the configuration from the protocol type. "+
"This is always an issue in terraform-plugin-framework used to implement the provider and should be reported to the provider developers.\n\n"+
"Please report this to the provider developer:\n\n"+
"Missing schema.",
Copy link
Member

Choose a reason for hiding this comment

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

FWIW, this error message is only for our team, and isn't actionable by the provider developer outside of reporting it to us:

// Panic prevention here to simplify the calling implementations.
// This should not happen, but just in case.

The only way we'd hit this error is if there was a bug in Terraform core

Comment on lines +360 to +362
sort.Slice(got.ListResources, func(i int, j int) bool {
return got.ListResources[i].TypeName < got.ListResources[j].TypeName
})
Copy link
Member

Choose a reason for hiding this comment

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

You might have noticed random CI failures for actions because I forgot to add this 😆

It'll be added in #1186, but in the mean time you can just re-run the CI and it'll eventually pass 😆

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

Thanks @rainkwan LGTM 🌿

@stephybun stephybun dismissed bbasata’s stale review July 21, 2025 15:09

Changes have been addressed

@rainkwan rainkwan merged commit 59a937e into main Jul 21, 2025
35 checks passed
@rainkwan rainkwan deleted the rk/list-resource-config branch July 21, 2025 15:13
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2025
@austinvalle austinvalle added this to the v1.16.0 milestone Sep 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants