Skip to content

Conversation

maqiuyujoyce
Copy link
Collaborator

@maqiuyujoyce maqiuyujoyce commented Oct 14, 2025

BRIEF Change description

Fixes part 1 of #5334

Note that:

  1. Analytics API doesn't support gcloud so we can't have gcloud test for it. Though the mock code is already verified in Support AnalyticsAccount (Alpha) #5411. Splitting it out for review purposes.
  2. We use the alpha version (googleapis/google/analytics/admin/v1alpha/*.proto) because only v1alpha is supported in the latest version of Cloud Go client (https://pkg.go.dev/cloud.google.com/go/[email protected]/admin/apiv1alpha), and the proto version needs to match the client code version in the mockgcp.

WHY do we need this change?

Special notes for your reviewer:

Does this PR add something which needs to be 'release noted'?

NONE
  • Reviewer reviewed release note.

Additional documentation e.g., references, usage docs, etc.:


Intended Milestone

Please indicate the intended milestone.

  • Reviewer tagged PR with the actual milestone.

Tests you have done

  • Run make ready-pr to ensure this PR is ready for review.
  • Perform necessary E2E testing for changed resources.

Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from maqiuyujoyce. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you mean bumping the go mod in mockgcp (rather than the REPO_ROOT go.mod)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point! Added the dependency in the mockgcp folder.

Tried to remove it from the root go.mod but it got added back automatically after make ensure so I assume that this indirect dependency is needed

./third_party/googleapis/google/iam/v2/*.proto \
./third_party/googleapis/google/logging/v2/*.proto
./third_party/googleapis/google/logging/v2/*.proto \
./third_party/googleapis/google/analytics/admin/v1alpha/*.proto
Copy link
Collaborator

Choose a reason for hiding this comment

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

Alpha is very experimental version. Suggest at least using v1beta?
https://developers.google.com/analytics/devguides/config/admin/v1/rpc/google.analytics.admin.v1beta

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

(Mentioned in description): We use the alpha version (googleapis/google/analytics/admin/v1alpha/*.proto) because only v1alpha is supported in the latest version of Cloud Go client (https://pkg.go.dev/cloud.google.com/go/[email protected]/admin/apiv1alpha), and the proto version needs to match the client code version in the mockgcp.

We can bump to v1beta once the Go client supports it.

@maqiuyujoyce maqiuyujoyce force-pushed the 202510-analyticsaccount-mockgcp branch from 1943105 to a13dfc5 Compare October 14, 2025 17:32
Copy link
Collaborator Author

@maqiuyujoyce maqiuyujoyce left a comment

Choose a reason for hiding this comment

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

Thanks for the review, @yuwenma . Comments addressed.

./third_party/googleapis/google/iam/v2/*.proto \
./third_party/googleapis/google/logging/v2/*.proto
./third_party/googleapis/google/logging/v2/*.proto \
./third_party/googleapis/google/analytics/admin/v1alpha/*.proto
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

(Mentioned in description): We use the alpha version (googleapis/google/analytics/admin/v1alpha/*.proto) because only v1alpha is supported in the latest version of Cloud Go client (https://pkg.go.dev/cloud.google.com/go/[email protected]/admin/apiv1alpha), and the proto version needs to match the client code version in the mockgcp.

We can bump to v1beta once the Go client supports it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point! Added the dependency in the mockgcp folder.

Tried to remove it from the root go.mod but it got added back automatically after make ensure so I assume that this indirect dependency is needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants