From 404039f995979f26a742e0b0575b56c299bdd3ba Mon Sep 17 00:00:00 2001 From: benpankow Date: Tue, 7 May 2024 16:39:48 -0700 Subject: [PATCH] rename --- .../dagster/dagster/_core/definitions/metadata/source_code.py | 4 ++-- .../asset_defs_tests/test_asset_defs_source_metadata.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python_modules/dagster/dagster/_core/definitions/metadata/source_code.py b/python_modules/dagster/dagster/_core/definitions/metadata/source_code.py index 8c9e562d6e6a9..1d92bb0055c46 100644 --- a/python_modules/dagster/dagster/_core/definitions/metadata/source_code.py +++ b/python_modules/dagster/dagster/_core/definitions/metadata/source_code.py @@ -48,7 +48,7 @@ class UrlCodeReference(DagsterModel): in source control. """ - source_control_url: str + url: str label: Optional[str] = None @@ -152,7 +152,7 @@ def convert_local_path_to_source_control_path( ) return UrlCodeReference( - source_control_url=f"{base_source_control_url}/{source_file_from_repo_root}#L{local_path.line_number}", + url=f"{base_source_control_url}/{source_file_from_repo_root}#L{local_path.line_number}", label=local_path.label, ) diff --git a/python_modules/dagster/dagster_tests/asset_defs_tests/test_asset_defs_source_metadata.py b/python_modules/dagster/dagster_tests/asset_defs_tests/test_asset_defs_source_metadata.py index 6cc00f4c47ca1..b4adf8ed62fca 100644 --- a/python_modules/dagster/dagster_tests/asset_defs_tests/test_asset_defs_source_metadata.py +++ b/python_modules/dagster/dagster_tests/asset_defs_tests/test_asset_defs_source_metadata.py @@ -132,7 +132,7 @@ def test_asset_code_origins_source_control() -> None: asset.metadata_by_key[key]["dagster/code_references"].code_references[-1], ) - assert meta.source_control_url == ( + assert meta.url == ( "https://github.com/dagster-io/dagster/tree/master/python_modules/dagster" + (expected_file_path[len(DAGSTER_PACKAGE_PATH) :]) + f"#L{expected_line_number}"