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

Supporting gke hub feature data source #12459

Merged

Conversation

YpNo
Copy link
Contributor

@YpNo YpNo commented Nov 29, 2024

Fixes : hashicorp/terraform-provider-google#20521

Supporting Data source for google_gke_hub_feature to know if a feature is enabled or not

`google_gke_hub_feature`

@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Nov 29, 2024
@YpNo YpNo marked this pull request as ready for review November 29, 2024 22:36
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@hao-nan-li, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@github-actions github-actions bot requested a review from hao-nan-li November 29, 2024 22:37
@YpNo
Copy link
Contributor Author

YpNo commented Nov 29, 2024

I hope I did the job correctly.

Thanks

@modular-magician modular-magician added service/gkehub and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Dec 2, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 111 insertions(+))
google-beta provider: Diff ( 3 files changed, 111 insertions(+))

Errors

google provider:

  • The diff processor crashed while computing breaking changes. This is usually due to the downstream provider failing to compile.
  • The diff processor crashed while computing changed resource schemas.

google-beta provider:

  • The diff processor crashed while computing breaking changes. This is usually due to the downstream provider failing to compile.
  • The missing test detector failed to run.
  • The diff processor crashed while computing changed resource schemas.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • gkehub2
#### Non-exercised tests

🔴 Tests were added that are skipped in VCR:

  • TestAccDataSourceGoogleGKEHub2Feature_basic
    🔴 Errors occurred during REPLAYING mode. Please fix them to complete your PR.

View the build log

Copy link
Contributor

@hao-nan-li hao-nan-li left a comment

Choose a reason for hiding this comment

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

Looks like there's some build error, could you try to build locally and see what's wrong?

@YpNo
Copy link
Contributor Author

YpNo commented Dec 4, 2024

I gonna check as soon as possible.
Thanks for your reply

@github-actions github-actions bot requested a review from hao-nan-li December 4, 2024 20:24
Copy link

github-actions bot commented Dec 9, 2024

@hao-nan-li This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@YpNo YpNo force-pushed the feature/gkehub_feature_data_source branch from 641a0d2 to 05b8bf2 Compare December 9, 2024 21:36
@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Dec 9, 2024
@YpNo
Copy link
Contributor Author

YpNo commented Dec 9, 2024

Hi,
it should build. I've just got some trouble with the tests.
Like this error :

# github.com/hashicorp/terraform-provider-google/google/services/gkehub2_test [github.com/hashicorp/terraform-provider-google/google/services/gkehub2.test]
google/services/gkehub2/data_source_google_gke_hub_feature_test.go:22:17: undefined: testAccCheckGoogleGkeHubFeatureDestroyProducer

But I checked on the other ressource like google_gke_hub_membership_binding where testAccCheckGKEHub2MembershipBindingDestroyProducer is undefined as well.
If you can explain to me.

@hao-nan-li
Copy link
Contributor

Hi, it should build. I've just got some trouble with the tests. Like this error :

# github.com/hashicorp/terraform-provider-google/google/services/gkehub2_test [github.com/hashicorp/terraform-provider-google/google/services/gkehub2.test]
google/services/gkehub2/data_source_google_gke_hub_feature_test.go:22:17: undefined: testAccCheckGoogleGkeHubFeatureDestroyProducer

But I checked on the other ressource like google_gke_hub_membership_binding where testAccCheckGKEHub2MembershipBindingDestroyProducer is undefined as well. If you can explain to me.

The quick solution is to find where that function is and copy/paste it in your test file. https://github.com/hashicorp/terraform-provider-google/blob/551d170ae23337092daefcb4c5a70a60121ad848/google/services/gkehub2/resource_gke_hub_membership_binding_generated_test.go#L108

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Dec 10, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 101 insertions(+))
google-beta provider: Diff ( 3 files changed, 101 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • gkehub2
#### Non-exercised tests

🔴 Tests were added that are skipped in VCR:

  • TestAccDataSourceGoogleGkeHubFeature_basic
    🔴 Errors occurred during REPLAYING mode. Please fix them to complete your PR.

View the build log

Copy link

@GoogleCloudPlatform/terraform-team @hao-nan-li This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

@YpNo
Copy link
Contributor Author

YpNo commented Dec 13, 2024

Hi, it should build. I've just got some trouble with the tests. Like this error :

# github.com/hashicorp/terraform-provider-google/google/services/gkehub2_test [github.com/hashicorp/terraform-provider-google/google/services/gkehub2.test]
google/services/gkehub2/data_source_google_gke_hub_feature_test.go:22:17: undefined: testAccCheckGoogleGkeHubFeatureDestroyProducer

But I checked on the other ressource like google_gke_hub_membership_binding where testAccCheckGKEHub2MembershipBindingDestroyProducer is undefined as well. If you can explain to me.

The quick solution is to find where that function is and copy/paste it in your test file. https://github.com/hashicorp/terraform-provider-google/blob/551d170ae23337092daefcb4c5a70a60121ad848/google/services/gkehub2/resource_gke_hub_membership_binding_generated_test.go#L108

Thanks but it seems that there is not generated_test file for the google_gke_hub_feature resource after the "make provider". How the generated_test file is created ?

@YpNo YpNo force-pushed the feature/gkehub_feature_data_source branch from 05b8bf2 to 253459b Compare December 13, 2024 10:08
@modular-magician modular-magician added awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Dec 13, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 4 files changed, 189 insertions(+))
google-beta provider: Diff ( 4 files changed, 189 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • gkehub2
#### Non-exercised tests

🔴 Tests were added that are skipped in VCR:

  • TestAccDataSourceGoogleGkeHubFeature_basic
    🔴 Errors occurred during REPLAYING mode. Please fix them to complete your PR.

View the build log

@YpNo
Copy link
Contributor Author

YpNo commented Dec 14, 2024

  • TestAccDataSourceGoogleGkeHubFeature_basic

Could I have access to the build log ?

@modular-magician modular-magician added awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Dec 14, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 143 insertions(+))
google-beta provider: Diff ( 3 files changed, 143 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 25
Passed tests: 13
Skipped tests: 11
Affected tests: 1

Click here to see the affected service packages
  • gkehub2

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccDataSourceGoogleGkeHubFeature_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccDataSourceGoogleGkeHubFeature_basic [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@YpNo YpNo force-pushed the feature/gkehub_feature_data_source branch from ebf17ac to baec3e4 Compare December 16, 2024 19:53
@modular-magician modular-magician added awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Dec 16, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 143 insertions(+))
google-beta provider: Diff ( 3 files changed, 143 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 25
Passed tests: 13
Skipped tests: 11
Affected tests: 1

Click here to see the affected service packages
  • gkehub2

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccDataSourceGoogleGkeHubFeature_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccDataSourceGoogleGkeHubFeature_basic [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@hao-nan-li
Copy link
Contributor

/gcbrun

@modular-magician modular-magician added awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Dec 17, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 143 insertions(+))
google-beta provider: Diff ( 3 files changed, 143 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 25
Passed tests: 13
Skipped tests: 11
Affected tests: 1

Click here to see the affected service packages
  • gkehub2

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccDataSourceGoogleGkeHubFeature_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccDataSourceGoogleGkeHubFeature_basic [Debug log]

🔴 Tests failed when rerunning REPLAYING mode:
TestAccDataSourceGoogleGkeHubFeature_basic [Error message] [Debug log]

Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made.

Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.


🟢 All tests passed!

View the build log or the debug log for each test

@hao-nan-li hao-nan-li merged commit 6f342c6 into GoogleCloudPlatform:main Dec 17, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[gkehub2] data source for gke hub feature
3 participants