Skip to content

Check GetResourceIdentitySchemas diagnostics and return early #36999

New issue

Have a question about this project? Sign up for a free account to open an issue and contact its maintainers and the community.

By clicking “Sign up for ”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on ? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dbanck
Copy link
Member

@dbanck dbanck commented May 8, 2025

This PR adds a check if GetResourceIdentitySchemas returned diagnostics and returns early if there are any

Target Release

1.12.x

CHANGELOG entry

  • This change is user-facing and I added a changelog entry.
  • This change is not user-facing.

@dbanckdbanck requested a review from a team as a code owner May 8, 2025 08:30
@dbanckdbanck added the no-changelog-neededAdd this to your PR if the change does not require a changelog entrylabel May 8, 2025
@dbanck
Copy link
Member Author

dbanck commented May 8, 2025

Do we want to backport this to 1.12.0 or keep it for 1.12.1?

@dbanckdbanck requested a review from Copilot May 8, 2025 08:30
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds an early return in the provider’s GetProviderSchema function when identity diagnostics contain errors. It also introduces new unit tests in both the plugin and plugin6 packages to verify that behavior.

  • Early return in GetProviderSchema if identity diagnostics indicate an error.
  • New tests in internal/plugin6/grpc_provider_test.go and internal/plugin/grpc_provider_test.go covering the error diagnostic scenario.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

FileDescription
internal/plugin6/grpc_provider.goAdds a check for error diagnostics from GetResourceIdentitySchemas and early returns.
internal/plugin6/grpc_provider_test.goIntroduces a unit test validating error diagnostic handling.
internal/plugin/grpc_provider.goAdds similar error checks and early return.
internal/plugin/grpc_provider_test.goIntroduces a unit test validating error diagnostic handling.

Sign up for free to join this conversation on . Already have an account? Sign in to comment
Labels
no-changelog-neededAdd this to your PR if the change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
@dbanck