diff --git a/docs/content/guides/dagster/code-references.mdx b/docs/content/guides/dagster/code-references.mdx index f7b0e2b731721..c8d816023c336 100644 --- a/docs/content/guides/dagster/code-references.mdx +++ b/docs/content/guides/dagster/code-references.mdx @@ -124,6 +124,8 @@ In a local context, it is useful to specify local code references in order to na If using Dagster Plus, you can use the `link_code_references_to_git_if_cloud` utility to conditionally convert local file code references to source control links. This utility will automatically detect if your code is running in a Dagster Cloud environment and convert local file code references to source control links, pointing at the commit hash of the code running in the current deployment. + + ```python import os from pathlib import Path @@ -202,9 +204,10 @@ You may choose to conditionally apply this transformation based on the environme import os from pathlib import Path -from dagster import Definitions, asset -from dagster._core.definitions.metadata import ( +from dagster import ( AnchorBasedFilePathMapping, + Definitions, + asset, link_code_references_to_git, with_source_code_references, ) diff --git a/examples/docs_snippets/docs_snippets/guides/dagster/code_references/link_to_source_control_conditional.py b/examples/docs_snippets/docs_snippets/guides/dagster/code_references/link_to_source_control_conditional.py index a6cc7f9a417da..3a08e9a546ca2 100644 --- a/examples/docs_snippets/docs_snippets/guides/dagster/code_references/link_to_source_control_conditional.py +++ b/examples/docs_snippets/docs_snippets/guides/dagster/code_references/link_to_source_control_conditional.py @@ -1,9 +1,10 @@ import os from pathlib import Path -from dagster import Definitions, asset -from dagster._core.definitions.metadata import ( +from dagster import ( AnchorBasedFilePathMapping, + Definitions, + asset, link_code_references_to_git, with_source_code_references, ) diff --git a/examples/docs_snippets/setup.py b/examples/docs_snippets/setup.py index 156d26145dc3d..fb71b29ec4f4d 100755 --- a/examples/docs_snippets/setup.py +++ b/examples/docs_snippets/setup.py @@ -22,7 +22,6 @@ "dagster-airflow", "dagster-aws", "dagster-celery", - "dagster-cloud", "dagster-dbt", "dagster-dask", "dagster-databricks",