Skip to content

feat(google/shopping/merchant/reviews/v1): add google-shopping-merchant-reviews - #18801

Draft
suztomo wants to merge 1 commit into
mainfrom
onboard-shopping-merchant-reviews-v1
Draft

suztomo wants to merge 1 commit into
mainfrom
onboard-shopping-merchant-reviews-v1

Conversation

@suztomo

@suztomo suztomo commented Oct 21, 2026

Copy link
Copy Markdown
Member

Onboard google/shopping/merchant/reviews/v1 API (google-shopping-merchant-reviews).

Internal tracking bug http://b/574418244

PiperOrigin-RevId: 1000790478

Debug Info

System Details

  • Python version: Python 3.13.15
  • OS: Linux 7.1.6-1rodete1-amd64 x86_64
  • Librarian version: v0.49.0

Commands Executed

  • python3 -m venv venv && source venv/bin/activate
  • pip install --upgrade pip
  • go run github.com/googleapis/librarian/cmd/librarian@v0.49.0 install
  • go run github.com/googleapis/librarian/cmd/librarian@v0.49.0 add google/shopping/merchant/reviews/v1
  • go run github.com/googleapis/librarian/cmd/librarian@v0.49.0 generate -v google-shopping-merchant-reviews
  • go run github.com/googleapis/librarian/cmd/librarian@v0.49.0 tidy
  • git add .
  • git commit -m "feat(google/shopping/merchant/reviews/v1): add google-shopping-merchant-reviews"

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the v1 version of the Google Shopping Merchant Reviews client library, adding the corresponding services, transports (gRPC and REST), types, unit tests, and generated samples. The reviewer identified three instances in the REST transport implementation (rest.py) where logging blocks incorrectly attempt to serialize the raw requests.Response object using to_json() instead of the parsed response message (resp). This would lead to exceptions and cause the logged payload to always be null. Actionable code suggestions were provided to fix these serialization calls.

logging.DEBUG
): # pragma: NO COVER
try:
response_payload = productreviews.ProductReview.to_json(response)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

In the logging block, productreviews.ProductReview.to_json() is called with response (which is a requests.Response object) instead of resp (the parsed ProductReview message). This will always raise an exception and result in response_payload being None. It should be updated to use resp.

Suggested change
response_payload = productreviews.ProductReview.to_json(response)
response_payload = productreviews.ProductReview.to_json(resp)

logging.DEBUG
): # pragma: NO COVER
try:
response_payload = productreviews.ProductReview.to_json(response)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

In the logging block, productreviews.ProductReview.to_json() is called with response (which is a requests.Response object) instead of resp (the parsed ProductReview message). This will always raise an exception and result in response_payload being None. It should be updated to use resp.

Suggested change
response_payload = productreviews.ProductReview.to_json(response)
response_payload = productreviews.ProductReview.to_json(resp)

Comment on lines +915 to +917
response_payload = (
productreviews.ListProductReviewsResponse.to_json(response)
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

In the logging block, productreviews.ListProductReviewsResponse.to_json() is called with response (which is a requests.Response object) instead of resp (the parsed ListProductReviewsResponse message). This will always raise an exception and result in response_payload being None. It should be updated to use resp.

Suggested change
response_payload = (
productreviews.ListProductReviewsResponse.to_json(response)
)
response_payload = (
productreviews.ListProductReviewsResponse.to_json(resp)
)

@suztomo

suztomo commented Oct 21, 2026

Copy link
Copy Markdown
Member Author

Hi @daniel-sanche, could you please take a look at this library onboarding PR when you get a chance? Thanks!

This branch has not been deployed

No deployments
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.

1 participant