Skip to content

Update BigQuery remote function for vision AI to be VPC-SC compliant #8883

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

Merged
merged 4 commits into from
Feb 7, 2023

Conversation

autoerr
Copy link
Collaborator

@autoerr autoerr commented Jan 10, 2023

Description

Fixes #8425

  1. Vision API client library has been upgraded. from google.cloud import vision_v1 will fail due to circular dependency.
    Root cause: fix(deps): Require google-api-core >=1.34.0, >=2.11.0 googleapis/python-vision#498
Traceback (most recent call last):
  File ".../vision_function.py", line 18, in <module>
    from google.cloud import vision_v1
  File ".../Library/Python/3.9/lib/python/site-packages/google/cloud/vision_v1/__init__.py", line 16, in <module>
    from google.cloud.vision import gapic_version as package_version
  File ".../Library/Python/3.9/lib/python/site-packages/google/cloud/vision/__init__.py", line 26, in <module>
    from google.cloud.vision_v1 import ImageAnnotatorClient
ImportError: cannot import name 'ImageAnnotatorClient' from partially initialized module 'google.cloud.vision_v1' (most likely due to a circular import) (.../Library/Python/3.9/lib/python/site-packages/google/cloud/vision_v1/__init__.py)
  1. As reported by customer, Vision API does not support VPC-SC if the request is passing image_uri. Error message is "Public urls are not allowed from a VPC SC environment". Customer verified that the updated version works with VPC-SC.

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

@autoerr autoerr requested review from chalmerlowe and a team as code owners January 10, 2023 01:13
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jan 10, 2023
@autoerr autoerr added the kokoro:run Add this label to force Kokoro to re-run the tests. label Jan 10, 2023
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Jan 10, 2023
@kweinmeister kweinmeister added do not merge Indicates a pull request not ready for merge, due to either quality or timing. and removed do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels Jan 19, 2023
@autoerr autoerr added the kokoro:run Add this label to force Kokoro to re-run the tests. label Feb 7, 2023
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Feb 7, 2023
@engelke engelke merged commit 7dcfea2 into GoogleCloudPlatform:main Feb 7, 2023
@autoerr autoerr deleted the vpcsc branch February 7, 2023 18:21
@autoerr autoerr mentioned this pull request Feb 15, 2023
3 tasks
telpirion pushed a commit that referenced this pull request Mar 13, 2023
…latest version (#8883)

Co-authored-by: Karl Weinmeister <[email protected]>
Co-authored-by: Charles Engelke <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add BigQuery Remote Function code samples for Unstructured Data Analytics
5 participants