Skip to content

Commit 03338b3

Browse files
committed
Update env to use different eopf processors
1 parent 58bc281 commit 03338b3

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

services/staging/rs_server_staging/processors/processor_staging.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -734,14 +734,14 @@ def dask_cluster_connect(
734734
735735
2. **Kubernetes Mode**:
736736
- If `self.cluster` is not already defined, the method attempts to connect to a Dask Gateway
737-
(using environment variables `DASK_GATEWAY__ADDRESS` and `DASK_GATEWAY__AUTH__TYPE`) to
737+
(using environment variables `DASK_GATEWAY_ADDRESS` and `DASK_GATEWAY__AUTH__TYPE`) to
738738
retrieve a list of existing clusters.
739739
- If no clusters are available, it attempts to create a new cluster scheduler.
740740
741741
Raises:
742742
RuntimeError: Raised if the cluster name is None, required environment variables are missing,
743743
cluster creation fails or authentication errors occur.
744-
KeyError: Raised if the necessary Dask Gateway environment variables (`DASK_GATEWAY__ADDRESS`,
744+
KeyError: Raised if the necessary Dask Gateway environment variables (`DASK_GATEWAY_ADDRESS`,
745745
`DASK_GATEWAY__AUTH__TYPE`, `RSPY_DASK_STAGING_CLUSTER_NAME`, `JUPYTERHUB_API_TOKEN` ) are not set.
746746
IndexError: Raised if no clusters are found in the Dask Gateway and new cluster creation is attempted.
747747
dask_gateway.exceptions.GatewayServerError: Raised when there is a server-side error in Dask Gateway.
@@ -802,13 +802,13 @@ def dask_cluster_connect(
802802
raise RuntimeError(f"Unsupported authentication type: {auth_type}")
803803

804804
gateway = Gateway(
805-
address=os.environ["DASK_GATEWAY__ADDRESS"],
805+
address=os.environ["DASK_GATEWAY_ADDRESS"],
806806
auth=gateway_auth,
807807
)
808808

809809
# Sort the clusters by newest first
810810
clusters = sorted(gateway.list_clusters(), key=lambda cluster: cluster.start_time, reverse=True)
811-
self.logger.debug(f"Cluster list for gateway {os.environ['DASK_GATEWAY__ADDRESS']!r}: {clusters}")
811+
self.logger.debug(f"Cluster list for gateway {os.environ['DASK_GATEWAY_ADDRESS']!r}: {clusters}")
812812

813813
# In local mode, get the first cluster from the gateway.
814814
cluster_id = None
@@ -847,7 +847,7 @@ def dask_cluster_connect(
847847
self.logger.exception(
848848
"Failed to retrieve the required connection details for "
849849
"the Dask Gateway from one or more of the following environment variables: "
850-
"DASK_GATEWAY__ADDRESS, RSPY_DASK_STAGING_CLUSTER_NAME, "
850+
"DASK_GATEWAY_ADDRESS, RSPY_DASK_STAGING_CLUSTER_NAME, "
851851
f"JUPYTERHUB_API_TOKEN, DASK_GATEWAY__AUTH__TYPE. {e}",
852852
)
853853

services/staging/tests/test_processors/test_processor_staging.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def test_dask_cluster_connect(
315315
mocker.patch.dict(
316316
os.environ,
317317
{
318-
"DASK_GATEWAY__ADDRESS": "gateway-address",
318+
"DASK_GATEWAY_ADDRESS": "gateway-address",
319319
"DASK_GATEWAY__AUTH__TYPE": "jupyterhub",
320320
"JUPYTERHUB_API_TOKEN": "mock_api_token",
321321
"RSPY_DASK_STAGING_CLUSTER_NAME": str(
@@ -375,7 +375,7 @@ def test_dask_cluster_connect_failure_no_cluster_name(
375375
mocker.patch.dict(
376376
os.environ,
377377
{
378-
"DASK_GATEWAY__ADDRESS": "gateway-address",
378+
"DASK_GATEWAY_ADDRESS": "gateway-address",
379379
"DASK_GATEWAY__AUTH__TYPE": "jupyterhub",
380380
"JUPYTERHUB_API_TOKEN": "mock_api_token",
381381
"RSPY_DASK_STAGING_CLUSTER_NAME": non_existent_cluster,
@@ -411,7 +411,7 @@ def test_dask_cluster_connect_failure_no_envs(
411411
mocker.patch.dict(
412412
os.environ,
413413
{
414-
"DASK_GATEWAY__ADDRESS": "gateway-address",
414+
"DASK_GATEWAY_ADDRESS": "gateway-address",
415415
},
416416
)
417417

@@ -606,7 +606,7 @@ async def test_process_rspy_features_success(
606606
mocker.patch.dict(
607607
os.environ,
608608
{
609-
"DASK_GATEWAY__ADDRESS": "gateway-address",
609+
"DASK_GATEWAY_ADDRESS": "gateway-address",
610610
"DASK_GATEWAY__AUTH__TYPE": "jupyterhub",
611611
"JUPYTERHUB_API_TOKEN": "mock_api_token",
612612
"RSPY_DASK_STAGING_CLUSTER_NAME": str(

0 commit comments

Comments
 (0)