feat(bigquery): support us-east7 endpoint overrides in integration tests - #13950
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for overriding BigQuery and BigQuery Storage endpoints via environment variables (BIGQUERY_ENDPOINT and BIGQUERY_STORAGE_ENDPOINT) in integration tests. It refactors several integration tests to use new helper methods in Helper.java that configure clients and settings with these endpoint overrides. I have no feedback to provide.
| .build(); | ||
| return new RemoteBigQueryHelper(bigqueryOptions); | ||
| .setTransportOptions(transportOptions); | ||
| String endpoint = System.getenv("BIGQUERY_ENDPOINT"); |
There was a problem hiding this comment.
Is this already set somewhere in the config?
qq, do we need to use an env var for our ITs? Would it be possible to just hardcode the regional endpoint for all ITs?
There was a problem hiding this comment.
Thanks for the questions.
Is this already set somewhere in the config?
No, this is not set. I'm planning on setting it for the kokoro jobs for IT envs, once this PR is merged.
qq, do we need to use an env var for our ITs? Would it be possible to just hardcode the regional endpoint for all ITs?
Using env var rather than hardcoding would be preferrable, in order to have the flexibility to change it or override it easily.
| @BeforeAll | ||
| static void beforeAll() throws IOException, DescriptorValidationException, InterruptedException { | ||
| readClient = BigQueryReadClient.create(); | ||
| readClient = com.google.cloud.bigquery.storage.v1.it.util.Helper.createBigQueryReadClient(); |
Exposes BIGQUERY_ENDPOINT and BIGQUERY_STORAGE_ENDPOINT environment variables to override endpoints in integration tests, making it possible to target regional canary endpoints like us-east7.
b/472499857