Skip to content

Commit

Permalink
[external-rename] host_representation -> remote_representation
Browse files Browse the repository at this point in the history
[INTERNAL_BRANCH=sean/host-repreentation-remote-representation]
  • Loading branch information
smackesey committed Mar 7, 2024
1 parent 3dd5ed3 commit 468a975
Show file tree
Hide file tree
Showing 165 changed files with 327 additions and 327 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from contextlib import contextmanager

from dagster import job, op, repository
from dagster._core.host_representation import (
from dagster._core.remote_representation import (
JobHandle,
ManagedGrpcPythonEnvCodeLocationOrigin,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Any

from dagster._core.host_representation.external import ExternalJob
from dagster._core.instance import DagsterInstance
from dagster._core.remote_representation.external import ExternalJob
from dagster._core.storage.dagster_run import DagsterRun
from dagster._core.test_utils import create_run_for_test, poll_for_finished_run
from dagster._utils import file_relative_path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
from dagster._core.definitions.events import AssetKey
from dagster._core.definitions.remote_asset_graph import RemoteAssetGraph
from dagster._core.definitions.selector import RepositorySelector
from dagster._core.host_representation.code_location import CodeLocation
from dagster._core.host_representation.external import ExternalRepository
from dagster._core.host_representation.external_data import ExternalAssetCheck
from dagster._core.instance import DagsterInstance
from dagster._core.remote_representation.code_location import CodeLocation
from dagster._core.remote_representation.external import ExternalRepository
from dagster._core.remote_representation.external_data import ExternalAssetCheck
from dagster._core.storage.asset_check_execution_record import (
AssetCheckExecutionRecord,
AssetCheckExecutionResolvedStatus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from dagster._core.execution.asset_backfill import create_asset_backfill_data_from_asset_partitions
from dagster._core.execution.backfill import BulkActionStatus, PartitionBackfill
from dagster._core.execution.job_backfill import submit_backfill_runs
from dagster._core.host_representation.external_data import ExternalPartitionExecutionErrorData
from dagster._core.remote_representation.external_data import ExternalPartitionExecutionErrorData
from dagster._core.utils import make_new_backfill_id
from dagster._core.workspace.permissions import Permissions
from dagster._utils import utc_datetime_from_timestamp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
def _repository_contains_dynamic_partitions_def(
graphene_info, repository_selector: RepositorySelector, partitions_def_name: str
) -> bool:
from dagster._core.host_representation.external_data import (
from dagster._core.remote_representation.external_data import (
ExternalDynamicPartitionsDefinitionData,
ExternalMultiPartitionsDefinitionData,
ExternalPartitionsDefinitionData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import dagster._check as check
from dagster._core.errors import DagsterRunNotFoundError
from dagster._core.execution.plan.state import KnownExecutionState
from dagster._core.host_representation import CodeLocation
from dagster._core.host_representation.external import ExternalJob
from dagster._core.instance import DagsterInstance
from dagster._core.remote_representation import CodeLocation
from dagster._core.remote_representation.external import ExternalJob
from dagster._core.storage.dagster_run import DagsterRun, DagsterRunStatus
from dagster._core.storage.tags import RESUME_RETRY_TAG
from dagster._core.utils import make_new_run_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from dagster._config import validate_config_from_snap
from dagster._core.definitions.selector import JobSubsetSelector, RepositorySelector
from dagster._core.execution.plan.state import KnownExecutionState
from dagster._core.host_representation import ExternalJob
from dagster._core.host_representation.external import ExternalExecutionPlan
from dagster._core.remote_representation import ExternalJob
from dagster._core.remote_representation.external import ExternalExecutionPlan
from dagster._core.workspace.context import BaseWorkspaceRequestContext, WorkspaceRequestContext
from dagster._utils.error import serializable_error_info_from_exc_info

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import dagster._check as check
from dagster import AssetKey
from dagster._core.definitions.asset_check_spec import AssetCheckKey
from dagster._core.host_representation.code_location import CodeLocation
from dagster._core.host_representation.external import ExternalRepository
from dagster._core.host_representation.external_data import ExternalAssetCheck
from dagster._core.instance import DagsterInstance
from dagster._core.remote_representation.code_location import CodeLocation
from dagster._core.remote_representation.external import ExternalRepository
from dagster._core.remote_representation.external_data import ExternalAssetCheck
from dagster._core.storage.asset_check_execution_record import (
AssetCheckExecutionRecord,
AssetCheckExecutionRecordStatus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
from dagster._core.event_api import AssetRecordsFilter
from dagster._core.events import ASSET_EVENTS
from dagster._core.events.log import EventLogEntry
from dagster._core.host_representation.code_location import CodeLocation
from dagster._core.host_representation.external import ExternalRepository
from dagster._core.host_representation.external_data import ExternalAssetNode
from dagster._core.instance import DynamicPartitionsStore
from dagster._core.remote_representation.code_location import CodeLocation
from dagster._core.remote_representation.external import ExternalRepository
from dagster._core.remote_representation.external_data import ExternalAssetNode
from dagster._core.storage.event_log.sql_event_log import get_max_event_records_limit
from dagster._core.storage.partition_status_cache import (
build_failed_and_in_progress_partition_subset,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
)

if TYPE_CHECKING:
from dagster._core.host_representation.code_location import CodeLocation
from dagster._core.remote_representation.code_location import CodeLocation


def get_utilized_env_vars_or_error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import dagster._check as check
from dagster._core.definitions.selector import RepositorySelector
from dagster._core.errors import DagsterUserCodeProcessError
from dagster._core.host_representation import (
from dagster._core.remote_representation import (
ExternalPartitionSet,
RepositoryHandle,
)
from dagster._core.host_representation.external_data import (
from dagster._core.remote_representation.external_data import (
ExternalPartitionExecutionErrorData,
ExternalPartitionNamesData,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from .utils import UserFacingGraphQLError

if TYPE_CHECKING:
from dagster._core.host_representation.code_location import CodeLocation
from dagster._core.remote_representation.code_location import CodeLocation

from ..schema.resources import GrapheneResourceDetails, GrapheneResourceDetailsList

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from collections import OrderedDict, defaultdict

import dagster._check as check
from dagster._core.host_representation import ExternalRepository
from dagster._core.remote_representation import ExternalRepository

from .utils import GraphSelector

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
from dagster._core.definitions.data_version import CachingStaleStatusResolver
from dagster._core.definitions.events import AssetKey
from dagster._core.events.log import EventLogEntry
from dagster._core.host_representation import ExternalRepository
from dagster._core.host_representation.external_data import (
from dagster._core.remote_representation import ExternalRepository
from dagster._core.remote_representation.external_data import (
ExternalAssetDependedBy,
ExternalAssetDependency,
ExternalAssetNode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import dagster._check as check
from dagster._config import validate_config_from_snap
from dagster._core.host_representation import RepresentedJob
from dagster._core.host_representation.external_data import DEFAULT_MODE_NAME
from dagster._core.remote_representation import RepresentedJob
from dagster._core.remote_representation.external_data import DEFAULT_MODE_NAME

from dagster_graphql.schema.errors import GrapheneModeNotFoundError
from dagster_graphql.schema.util import ResolveInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
)
from dagster._core.definitions.asset_check_spec import AssetCheckKey, AssetCheckSeverity
from dagster._core.events import DagsterEventType
from dagster._core.host_representation.external_data import ExternalAssetCheck
from dagster._core.remote_representation.external_data import ExternalAssetCheck
from dagster._core.storage.asset_check_execution_record import (
AssetCheckExecutionRecord,
AssetCheckExecutionResolvedStatus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
from dagster._core.errors import DagsterInvariantViolationError
from dagster._core.event_api import EventRecordsFilter
from dagster._core.events import DagsterEventType
from dagster._core.host_representation import CodeLocation, ExternalRepository
from dagster._core.host_representation.external import ExternalJob, ExternalSensor
from dagster._core.host_representation.external_data import (
from dagster._core.remote_representation import CodeLocation, ExternalRepository
from dagster._core.remote_representation.external import ExternalJob, ExternalSensor
from dagster._core.remote_representation.external_data import (
ExternalAssetNode,
ExternalDynamicPartitionsDefinitionData,
ExternalMultiPartitionsDefinitionData,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import graphene
from dagster._core.definitions.asset_selection import AssetSelection
from dagster._core.definitions.remote_asset_graph import RemoteAssetGraph
from dagster._core.host_representation.external import ExternalRepository
from dagster._core.remote_representation.external import ExternalRepository

from ..implementation.fetch_assets import get_asset_nodes_by_asset_key
from .asset_key import GrapheneAssetKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
BulkActionStatus,
PartitionBackfill,
)
from dagster._core.host_representation.external import ExternalPartitionSet
from dagster._core.remote_representation.external import ExternalPartitionSet
from dagster._core.storage.dagster_run import RunPartitionData, RunRecord, RunsFilter
from dagster._core.storage.tags import BACKFILL_ID_TAG, TagType, get_tag_type
from dagster._core.workspace.permissions import Permissions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import List, Sequence

import graphene
from dagster._core.host_representation.external_data import (
from dagster._core.remote_representation.external_data import (
EnvVarConsumer,
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import dagster._check as check
import graphene
from dagster._core.host_representation import ExternalExecutionPlan
from dagster._core.remote_representation import ExternalExecutionPlan
from dagster._core.snap import ExecutionStepInputSnap, ExecutionStepOutputSnap, ExecutionStepSnap

from .metadata import GrapheneMetadataItemDefinition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
from dagster._core.definitions.sensor_definition import (
SensorType,
)
from dagster._core.host_representation import (
from dagster._core.remote_representation import (
CodeLocation,
ExternalRepository,
GrpcServerCodeLocation,
ManagedGrpcPythonEnvCodeLocationOrigin,
)
from dagster._core.host_representation.feature_flags import get_feature_flags_for_location
from dagster._core.host_representation.grpc_server_state_subscriber import (
from dagster._core.remote_representation.feature_flags import get_feature_flags_for_location
from dagster._core.remote_representation.grpc_server_state_subscriber import (
LocationStateChangeEvent,
LocationStateChangeEventType,
LocationStateSubscriber,
Expand Down Expand Up @@ -53,7 +53,7 @@
from .util import ResolveInfo, non_null_list

if TYPE_CHECKING:
from dagster._core.host_representation.external_data import ExternalAssetNode
from dagster._core.remote_representation.external_data import ExternalAssetNode

GrapheneLocationStateChangeEventType = graphene.Enum.from_enum(LocationStateChangeEventType)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import dagster._check as check
import graphene
from dagster import MultiPartitionsDefinition
from dagster._core.host_representation import ExternalPartitionSet, RepositoryHandle
from dagster._core.host_representation.external_data import (
from dagster._core.remote_representation import ExternalPartitionSet, RepositoryHandle
from dagster._core.remote_representation.external_data import (
ExternalDynamicPartitionsDefinitionData,
ExternalMultiPartitionsDefinitionData,
ExternalPartitionsDefinitionData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
RuntimeMismatchErrorData,
SelectorTypeErrorData,
)
from dagster._core.host_representation.represented import RepresentedJob
from dagster._core.remote_representation.represented import RepresentedJob
from dagster._utils.error import SerializableErrorInfo
from graphene.types.generic import GenericScalar

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import graphene
from dagster._core.definitions.time_window_partitions import PartitionRangeStatus
from dagster._core.events import DagsterEventType
from dagster._core.host_representation.external import ExternalExecutionPlan, ExternalJob
from dagster._core.host_representation.external_data import DEFAULT_MODE_NAME, ExternalPresetData
from dagster._core.host_representation.represented import RepresentedJob
from dagster._core.remote_representation.external import ExternalExecutionPlan, ExternalJob
from dagster._core.remote_representation.external_data import DEFAULT_MODE_NAME, ExternalPresetData
from dagster._core.remote_representation.represented import RepresentedJob
from dagster._core.storage.dagster_run import (
DagsterRunStatsSnapshot,
DagsterRunStatus,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import dagster._check as check
import graphene
from dagster._core.host_representation import RepresentedJob
from dagster._core.remote_representation import RepresentedJob

from ..errors import (
GraphenePipelineNotFoundError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import dagster._check as check
import graphene
from dagster._core.host_representation import ExternalRepositoryOrigin
from dagster._core.remote_representation import ExternalRepositoryOrigin

from .util import ResolveInfo, non_null_list

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import dagster._check as check
import graphene
from dagster._core.definitions.selector import ResourceSelector
from dagster._core.host_representation.external import ExternalRepository, ExternalResource
from dagster._core.host_representation.external_data import (
from dagster._core.remote_representation.external import ExternalRepository, ExternalResource
from dagster._core.remote_representation.external_data import (
ExternalResourceConfigEnvVar,
ExternalResourceValue,
NestedResourceType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import dagster._check as check
import graphene
from dagster._core.host_representation import RepresentedJob
from dagster._core.host_representation.external_data import DEFAULT_MODE_NAME
from dagster._core.remote_representation import RepresentedJob
from dagster._core.remote_representation.external_data import DEFAULT_MODE_NAME
from dagster._core.snap.snap_to_yaml import default_values_yaml_from_type_snap

from ..implementation.run_config_schema import resolve_is_run_config_valid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import dagster._check as check
import graphene
from dagster import DefaultScheduleStatus
from dagster._core.host_representation import ExternalSchedule
from dagster._core.remote_representation import ExternalSchedule
from dagster._core.scheduler.instigation import InstigatorState, InstigatorStatus
from dagster._seven import get_current_datetime_in_utc, get_timestamp_from_utc_datetime

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from dagster._core.definitions.sensor_definition import (
SensorType,
)
from dagster._core.host_representation import ExternalSensor, ExternalTargetData
from dagster._core.host_representation.external import ExternalRepository
from dagster._core.remote_representation import ExternalSensor, ExternalTargetData
from dagster._core.remote_representation.external import ExternalRepository
from dagster._core.scheduler.instigation import InstigatorState, InstigatorStatus
from dagster._core.workspace.permissions import Permissions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import graphene
from dagster._core.definitions import NodeHandle
from dagster._core.definitions.asset_graph_differ import AssetGraphDiffer
from dagster._core.host_representation import RepresentedJob
from dagster._core.host_representation.external import ExternalJob
from dagster._core.host_representation.historical import HistoricalJob
from dagster._core.remote_representation import RepresentedJob
from dagster._core.remote_representation.external import ExternalJob
from dagster._core.remote_representation.historical import HistoricalJob
from dagster._core.snap import DependencyStructureIndex, GraphDefSnap, OpDefSnap
from dagster._core.snap.node import InputMappingSnap, OutputMappingSnap
from dagster._core.storage.dagster_run import RunsFilter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import dagster._check as check
import graphene
from dagster._core.host_representation.external import ExternalRepository
from dagster._core.instance import DagsterInstance
from dagster._core.remote_representation.external import ExternalRepository
from dagster._core.test_utils import wait_for_runs_to_finish
from dagster._core.workspace.context import WorkspaceProcessContext, WorkspaceRequestContext
from dagster._core.workspace.load_target import PythonFileTarget
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@
from dagster._core.definitions.sensor_definition import RunRequest, SensorDefinition, SkipReason
from dagster._core.definitions.unresolved_asset_job_definition import UnresolvedAssetJobDefinition
from dagster._core.errors import DagsterInvalidDefinitionError
from dagster._core.host_representation.external import ExternalRepository
from dagster._core.log_manager import coerce_valid_log_level
from dagster._core.remote_representation.external import ExternalRepository
from dagster._core.storage.dagster_run import DagsterRunStatus
from dagster._core.storage.tags import RESUME_RETRY_TAG
from dagster._core.workspace.context import WorkspaceProcessContext, WorkspaceRequestContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from dagster._core.definitions.partition import PartitionsDefinition, StaticPartitionsDefinition
from dagster._core.definitions.run_request import InstigatorType
from dagster._core.definitions.sensor_definition import SensorType
from dagster._core.host_representation.origin import ExternalInstigatorOrigin
from dagster._core.remote_representation.origin import ExternalInstigatorOrigin
from dagster._core.scheduler.instigation import (
InstigatorState,
InstigatorStatus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import pytest
from dagster import job, op, repository
from dagster._core.host_representation.code_location import GrpcServerCodeLocation
from dagster._core.remote_representation.code_location import GrpcServerCodeLocation
from dagster._core.test_utils import instance_for_test
from dagster_graphql.test.utils import (
define_out_of_process_workspace,
Expand Down Expand Up @@ -41,7 +41,7 @@ def test_can_reload_on_external_repository_error():
# note it where the function is *used* that needs to mocked, not
# where it is defined.
# see https://docs.python.org/3/library/unittest.mock.html#where-to-patch
"dagster._core.host_representation.code_location.sync_get_streaming_external_repositories_data_grpc"
"dagster._core.remote_representation.code_location.sync_get_streaming_external_repositories_data_grpc"
) as external_repository_mock:
external_repository_mock.side_effect = Exception("get_external_repo_failure")

Expand Down
Loading

0 comments on commit 468a975

Please sign in to comment.