[ https://issues.apache.org/jira/browse/BEAM-8472?focusedWorklogId=340823&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-340823 ]
ASF GitHub Bot logged work on BEAM-8472: ---------------------------------------- Author: ASF GitHub Bot Created on: 08/Nov/19 23:43 Start Date: 08/Nov/19 23:43 Worklog Time Spent: 10m Work Description: ibzib commented on pull request #9974: [BEAM-8472] Get default GCP region from gcloud (Java) URL: https://github.com/apache/beam/pull/9974#discussion_r344407980 ########## File path: runners/google-cloud-dataflow-java/src/test/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptionsTest.java ########## @@ -199,4 +199,10 @@ public void testDefaultStagingLocationUnset() { thrown.expectMessage("Error constructing default value for stagingLocation"); options.getStagingLocation(); } + + @Test + public void testDefaultGcpRegion() { + DataflowPipelineOptions options = PipelineOptionsFactory.as(DataflowPipelineOptions.class); + assertEquals("us-central1", options.getRegion()); Review comment: Thanks for catching this Luke. Filed #10048 to improve this. ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 340823) Time Spent: 3h 10m (was: 3h) > 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: 3h 10m > 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 (v8.3.4#803005)