diff --git a/src/snowflake/cli/_plugins/stage/commands.py b/src/snowflake/cli/_plugins/stage/commands.py index 9261c7f2da..44c8c9e136 100644 --- a/src/snowflake/cli/_plugins/stage/commands.py +++ b/src/snowflake/cli/_plugins/stage/commands.py @@ -192,7 +192,8 @@ def stage_diff( Diffs a stage with a local folder. """ diff: DiffResult = compute_stage_diff( - local_root=Path(folder_name), stage_fqn=stage_name + local_root=Path(folder_name), + stage_path=StageManager._stage_path_part_factory(stage_name), # noqa: SLF001 ) if get_cli_context().output_format == OutputFormat.JSON: return ObjectResult(diff.to_dict()) diff --git a/src/snowflake/cli/_plugins/stage/diff.py b/src/snowflake/cli/_plugins/stage/diff.py index 2cd498ca84..83870be20b 100644 --- a/src/snowflake/cli/_plugins/stage/diff.py +++ b/src/snowflake/cli/_plugins/stage/diff.py @@ -25,7 +25,7 @@ ) from snowflake.connector.cursor import DictCursor -from .manager import DefaultStagePathParts, StageManager +from .manager import StageManager, StagePathParts from .md5 import UnknownMD5FormatError, file_matches_md5sum log = logging.getLogger(__name__) @@ -122,9 +122,7 @@ def preserve_from_diff( return preserved_diff -def compute_stage_diff( - local_root: Path, stage_path: DefaultStagePathParts -) -> DiffResult: +def compute_stage_diff(local_root: Path, stage_path: StagePathParts) -> DiffResult: """ Diffs the files in the local_root with files in the stage path that is stage_path_parts's full_path. """ diff --git a/src/snowflake/cli/api/entities/utils.py b/src/snowflake/cli/api/entities/utils.py index 888a09a37c..1ada533f7e 100644 --- a/src/snowflake/cli/api/entities/utils.py +++ b/src/snowflake/cli/api/entities/utils.py @@ -122,7 +122,7 @@ def sync_deploy_root_with_stage( # Perform a diff operation and display results to the user for informational purposes if print_diff: console.step( - f"Performing a diff between the Snowflake stage {stage_path.path} and your local deploy_root {deploy_root.resolve()} directory." + f"Performing a diff between the Snowflake stage: {stage_path.path} and your local deploy_root: {deploy_root.resolve()}." ) diff: DiffResult = compute_stage_diff(