Skip to content

Commit

Permalink
Remove default location (#191)
Browse files Browse the repository at this point in the history
* Remove default loadtion

* Update tests

* Fis incorrect placeholder name
  • Loading branch information
jacobtomlinson committed Dec 2, 2020
1 parent d4a650b commit cd764a4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dask_cloudprovider/azure/azurevm.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,8 @@ def __init__(
if location is not None
else dask.config.get("cloudprovider.azure.location")
)

if self.location is None:
raise ConfigError("You must configure a location")
self.resource_group = (
resource_group
if resource_group is not None
Expand Down
4 changes: 3 additions & 1 deletion dask_cloudprovider/azure/tests/test_azurevm.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ def skip_without_credentials(func):
rg = dask.config.get("cloudprovider.azure.azurevm.resource_group", None)
vnet = dask.config.get("cloudprovider.azure.azurevm.vnet", None)
security_group = dask.config.get("cloudprovider.azure.azurevm.security_group", None)
if rg is None or vnet is None or security_group is None:
location = dask.config.get("cloudprovider.azure.location", None)
if rg is None or vnet is None or security_group or location is None:
return pytest.mark.skip(
reason="""
You must configure your Azure resource group and vnet to run this test.
$ export DASK_CLOUDPROVIDER__AZURE__LOCATION="<LOCATION>"
$ export DASK_CLOUDPROVIDER__AZURE__AZUREVM__RESOURCE_GROUP="<RESOURCE GROUP>"
$ export DASK_CLOUDPROVIDER__AZURE__AZUREVM__VNET="<VNET>"
$ export DASK_CLOUDPROVIDER__AZURE__AZUREVM__SECURITY_GROUP="<SECUROTY GROUP>"
Expand Down
2 changes: 1 addition & 1 deletion dask_cloudprovider/cloudprovider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ cloudprovider:
filesystem_size: 40 # Default root filesystem size for scheduler and worker VMs in GB

azure:
location: "eastus2" # The Azure location to launch your cluster
location: null # The Azure location to launch your cluster
resource_group: null # The Azure resource group for the cluster
azureml:
experiment_name: "dask-cloudprovider" # default name of the Experiment to submit
Expand Down

0 comments on commit cd764a4

Please sign in to comment.