|
27 | 27 | from dagster._core.errors import DagsterUserCodeUnreachableError |
28 | 28 | from dagster._core.instance import MayHaveInstanceWeakref |
29 | 29 | from dagster._core.launcher import RunLauncher |
30 | | -from dagster._core.remote_representation import RemoteRepositoryOrigin |
31 | | -from dagster._core.remote_representation.external_data import ( |
32 | | - extract_serialized_job_snap_from_serialized_job_data_snap, |
33 | | -) |
34 | | -from dagster._core.remote_representation.origin import ( |
| 30 | +from dagster._core.remote_origin import ( |
35 | 31 | CodeLocationOrigin, |
36 | 32 | RegisteredCodeLocationOrigin, |
| 33 | + RemoteRepositoryOrigin, |
| 34 | +) |
| 35 | +from dagster._core.remote_representation.external_data import ( |
| 36 | + extract_serialized_job_snap_from_serialized_job_data_snap, |
37 | 37 | ) |
38 | 38 | from dagster._grpc.client import DagsterGrpcClient |
39 | 39 | from dagster._grpc.types import GetCurrentImageResult, ListRepositoriesResponse |
@@ -1534,8 +1534,8 @@ def _trigger_recovery_server_restart(self, deployment_location: DeploymentAndLoc |
1534 | 1534 | del self._first_unavailable_times[deployment_location] |
1535 | 1535 |
|
1536 | 1536 | # redeploy the multipex server in this case as well to ensure a fresh start |
1537 | | - # (and ensure that we don't try to create the same PexServerHandle again and |
1538 | | - # delete the code location in a loop) |
| 1537 | + # if it resource contrained (and ensure that we don't try to create the same |
| 1538 | + # PexServerHandle again and delete the code location in a loop) |
1539 | 1539 | if deployment_location in self._multipex_servers: |
1540 | 1540 | del self._multipex_servers[deployment_location] |
1541 | 1541 |
|
@@ -1568,11 +1568,11 @@ def _refresh_actual_entries(self) -> None: |
1568 | 1568 | if isinstance(grpc_server_or_error, DagsterCloudGrpcServer): |
1569 | 1569 | self._logger.warning( |
1570 | 1570 | "Pex servers disappeared for running code location %s:%s. Removing actual entries to" |
1571 | | - " activate reconciliation logic.", |
| 1571 | + " activate reconciliation logic and deploy a new code server and multipex server.", |
1572 | 1572 | deployment_name, |
1573 | 1573 | location_name, |
1574 | 1574 | ) |
1575 | | - del self._actual_entries[deployment_location] |
| 1575 | + self._trigger_recovery_server_restart(deployment_location) |
1576 | 1576 |
|
1577 | 1577 | # Check to see if any servers have become unresponsive |
1578 | 1578 | unavailable_server_timeout = int( |
|
0 commit comments