Skip to content

gkehub: datasource for gke_hub_membership resource#13915

Merged
ScottSuarez merged 4 commits intoGoogleCloudPlatform:mainfrom
YpNo:feature/hub_membership_data_source
May 22, 2025
Merged

gkehub: datasource for gke_hub_membership resource#13915
ScottSuarez merged 4 commits intoGoogleCloudPlatform:mainfrom
YpNo:feature/hub_membership_data_source

Conversation

@YpNo
Copy link
Copy Markdown
Contributor

@YpNo YpNo commented May 12, 2025

Fixing hashicorp/terraform-provider-google#22750

New data source for google_gke_hub_membership. Allowing getting information about the cluster in the fleet

`google_gke_hub_membership`

@github-actions github-actions bot requested a review from ScottSuarez May 12, 2025 19:55
@github-actions
Copy link
Copy Markdown

Hello! I am a robot. Tests will require approval from a repository maintainer to run. Googlers: see go/terraform-auto-test-runs to set up automatic test runs.

@ScottSuarez, 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.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label May 12, 2025
@YpNo
Copy link
Copy Markdown
Contributor Author

YpNo commented May 12, 2025

HI Reviewers,

I tried to build and run the tests but the data source is not built. I don't understand why.
Could you help ?

Here the error I have during a make test

# github.com/hashicorp/terraform-provider-google/google/services/gkehub2
google/services/gkehub2/data_source_google_gke_hub_membership.go:14:61: undefined: ResourceGKEHub2Membership
google/services/gkehub2/data_source_google_gke_hub_membership.go:34:8: undefined: resourceGKEHub2MembershipRead
make: *** [vet] Error 1

Regards.

@github-actions github-actions bot requested a review from ScottSuarez May 12, 2025 22:26
@modular-magician modular-magician added service/gkehub and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels May 13, 2025
@modular-magician
Copy link
Copy Markdown
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 ( 5 files changed, 323 insertions(+))
google-beta provider: Diff ( 5 files changed, 323 insertions(+))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 12
Passed tests: 6
Skipped tests: 5
Affected tests: 1

Click here to see the affected service packages
  • gkehub

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
  • TestAccDataSourceGoogleGkeHubMembership_basic

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

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

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

Comment thread mmv1/third_party/terraform/website/docs/d/gke_hub_membership.html.markdown Outdated
@github-actions github-actions bot requested a review from ScottSuarez May 13, 2025 18:11
@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels May 13, 2025
@modular-magician
Copy link
Copy Markdown
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 ( 5 files changed, 253 insertions(+))
google-beta provider: Diff ( 5 files changed, 253 insertions(+))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 12
Passed tests: 6
Skipped tests: 5
Affected tests: 1

Click here to see the affected service packages
  • gkehub

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
  • TestAccDataSourceGoogleGkeHubMembership_basic

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccDataSourceGoogleGkeHubMembership_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

Copy link
Copy Markdown
Contributor

@ScottSuarez ScottSuarez left a comment

Choose a reason for hiding this comment

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

    data_source_google_gke_hub_membership_test.go:41: Step 1/1 error: Check failed: Check 1/1 error: endpoint.# is 0; want 1
        endpoint.0.gke_cluster.# is ; want 1
        membership_id is ; want tf-test-mem-801x1y1sup
        name is ; want projects/-/locations/global/memberships/tf-test-mem-801x1y1sup
        endpoint.0.gke_cluster.0.resource_link is ; want //container.googleapis.com/projects/-/locations/us-central1-a/clusters/tf-test-mem-ds-cl-801x1y1sup
        endpoint.0.gke_cluster.0.% is ; want 1
        endpoint.0.% is ; want 1

@YpNo YpNo force-pushed the feature/hub_membership_data_source branch from 4747f4a to bc5fe95 Compare May 18, 2025 08:17
@github-actions github-actions bot requested a review from ScottSuarez May 18, 2025 08:18
@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels May 18, 2025
@modular-magician
Copy link
Copy Markdown
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 ( 5 files changed, 253 insertions(+))
google-beta provider: Diff ( 5 files changed, 253 insertions(+))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 12
Passed tests: 7
Skipped tests: 5
Affected tests: 0

Click here to see the affected service packages
  • gkehub

🟢 All tests passed!

View the build log

@github-actions
Copy link
Copy Markdown

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

@ScottSuarez ScottSuarez enabled auto-merge May 22, 2025 18:23
@ScottSuarez ScottSuarez added this pull request to the merge queue May 22, 2025
Merged via the queue into GoogleCloudPlatform:main with commit 807a5d4 May 22, 2025
25 checks passed
NandiniAgrawal15 pushed a commit to NandiniAgrawal15/magic-modules that referenced this pull request Jun 5, 2025
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Jun 25, 2025
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Jun 25, 2025
jingqizz pushed a commit to jingqizz/magic-modules that referenced this pull request Jul 9, 2025
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Jul 28, 2025
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Jul 28, 2025
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Jul 28, 2025
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Jul 28, 2025
NandiniAgrawal15 pushed a commit to NandiniAgrawal15/magic-modules that referenced this pull request Sep 4, 2025
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.

3 participants