Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion bigquery/tests/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@
),
]

# The VPC-SC team maintains a mirror of the GCS bucket used for code
# samples. The public bucket crosses the configured security boundary.
# See: https://github.com/googleapis/google-cloud-python/issues/8550
SAMPLES_BUCKET = os.environ.get("GCLOUD_TEST_SAMPLES_BUCKET", "cloud-samples-data")

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.

Do we need to update noxfile.py to set this value in the environment?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, the default of cloud-samples-data is fine for our purposes. The VPC-SC team has a separate Kokoro (or maybe something similar?) config where they'll set the necessary environment variable.


retry_storage_errors = RetryErrors(
(TooManyRequests, InternalServerError, ServiceUnavailable)
)
Expand Down Expand Up @@ -1877,7 +1882,9 @@ def test_create_routine(self):
language="JAVASCRIPT",
type_="SCALAR_FUNCTION",
return_type=float64_type,
imported_libraries=["gs://cloud-samples-data/bigquery/udfs/max-value.js"],
imported_libraries=[
"gs://{}/bigquery/udfs/max-value.js".format(SAMPLES_BUCKET)
],
)
routine.arguments = [
bigquery.RoutineArgument(
Expand Down