ASF GitHub Bot logged work on BEAM-8472:

                Author: ASF GitHub Bot
            Created on: 08/Nov/19 22:50
            Start Date: 08/Nov/19 22:50
    Worklog Time Spent: 10m 
      Work Description: lukecwik commented on pull request #9974: [BEAM-8472] 
Get default GCP region from gcloud (Java)
URL: https://github.com/apache/beam/pull/9974#discussion_r344397166

 File path: 
 @@ -199,4 +199,10 @@ public void testDefaultStagingLocationUnset() {
     thrown.expectMessage("Error constructing default value for 
+  @Test
+  public void testDefaultGcpRegion() {
+    DataflowPipelineOptions options = 
+    assertEquals("us-central1", options.getRegion());
 Review comment:
   This test will fail on any machine where the `CLOUDSDK_COMPUTE_REGION` is 
defined or `gcloud config compute/region` is set.
   You can test your code by instantiating the DefaultGcpRegionFactory directly 
and ensuring that it is factored in such a way where you can pass in the 
environment map directly to it and similarly for testing the process execution.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

Issue Time Tracking

    Worklog Id:     (was: 340793)
    Time Spent: 2h 50m  (was: 2h 40m)

> Get default GCP region from gcloud
> ----------------------------------
>                 Key: BEAM-8472
>                 URL: https://issues.apache.org/jira/browse/BEAM-8472
>             Project: Beam
>          Issue Type: Improvement
>          Components: runner-dataflow
>            Reporter: Kyle Weaver
>            Assignee: Kyle Weaver
>            Priority: Major
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
> Currently, we default to us-central1 if --region flag is not set. The Google 
> Cloud SDK generally tries to get a default value in this case for 
> convenience, which we should follow. 
> [https://cloud.google.com/compute/docs/gcloud-compute/#order_of_precedence_for_default_properties]

This message was sent by Atlassian Jira

Reply via email to