Differential D4920 Diff 24623 python_modules/dagster/dagster_tests/general_tests/compat_tests/test_change_snapshot_structure.py
Changeset View
Changeset View
Standalone View
Standalone View
python_modules/dagster/dagster_tests/general_tests/compat_tests/test_change_snapshot_structure.py
import re | import re | ||||
import pytest | import pytest | ||||
from dagster.core.host_representation import ExternalExecutionPlan | from dagster.core.host_representation import ExternalExecutionPlan | ||||
from dagster.core.instance import DagsterInstance, InstanceRef | from dagster.core.instance import DagsterInstance, InstanceRef | ||||
from dagster.core.snap import create_execution_plan_snapshot_id, create_pipeline_snapshot_id | from dagster.core.snap import create_execution_plan_snapshot_id, create_pipeline_snapshot_id | ||||
from dagster.utils import file_relative_path | from dagster.utils import file_relative_path | ||||
from dagster.utils.test import restore_directory | from dagster.utils.test import copy_directory | ||||
# a change of schema in the snapshot hierarchy caused hashes to be different | # a change of schema in the snapshot hierarchy caused hashes to be different | ||||
# when snapshots reloaded | # when snapshots reloaded | ||||
def test_run_created_in_0_7_9_snapshot_id_change(): | def test_run_created_in_0_7_9_snapshot_id_change(): | ||||
test_dir = file_relative_path(__file__, "snapshot_0_7_9_shapshot_id_creation_change/sqlite") | src_dir = file_relative_path(__file__, "snapshot_0_7_9_shapshot_id_creation_change/sqlite") | ||||
with restore_directory(test_dir): | with copy_directory(src_dir) as test_dir: | ||||
instance = DagsterInstance.from_ref(InstanceRef.from_dir(test_dir)) | instance = DagsterInstance.from_ref(InstanceRef.from_dir(test_dir)) | ||||
# run_id = 'e297fa70-49e8-43f8-abfe-1634f02644f6' | # run_id = 'e297fa70-49e8-43f8-abfe-1634f02644f6' | ||||
old_pipeline_snapshot_id = "88528edde2ed64da3c39cca0da8ba2f7586c1a5d" | old_pipeline_snapshot_id = "88528edde2ed64da3c39cca0da8ba2f7586c1a5d" | ||||
old_execution_plan_snapshot_id = "2246f8e5a10d21e15fbfa3773d7b2d0bc1fa9d3d" | old_execution_plan_snapshot_id = "2246f8e5a10d21e15fbfa3773d7b2d0bc1fa9d3d" | ||||
with pytest.warns( | with pytest.warns( | ||||
UserWarning, | UserWarning, | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |