Skip to content

Commit

Permalink
One more log
Browse files Browse the repository at this point in the history
  • Loading branch information
schustmi committed Jan 29, 2025
1 parent 235cbed commit eeab306
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions src/zenml/pipelines/pipeline_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,6 @@ def _create_deployment(
pipeline_id = None
if register_pipeline:
pipeline_id = self._register().id

else:
logger.debug(f"Pipeline {self.name} is unlisted.")

Expand Down Expand Up @@ -720,19 +719,25 @@ def _create_deployment(
build_id = build_model.id if build_model else None

code_reference = None
if local_repo_context and not local_repo_context.is_dirty:
source_root = source_utils.get_source_root()
subdirectory = (
Path(source_root)
.resolve()
.relative_to(local_repo_context.root)
)
if local_repo_context:
if local_repo_context.is_dirty:
logger.info(
"Not storing code repository commit because the local "
"checkout contains uncommitted or untracked files."
)
else:
source_root = source_utils.get_source_root()
subdirectory = (
Path(source_root)
.resolve()
.relative_to(local_repo_context.root)
)

code_reference = CodeReferenceRequest(
commit=local_repo_context.current_commit,
subdirectory=subdirectory.as_posix(),
code_repository=local_repo_context.code_repository_id,
)
code_reference = CodeReferenceRequest(
commit=local_repo_context.current_commit,
subdirectory=subdirectory.as_posix(),
code_repository=local_repo_context.code_repository_id,
)

code_path = None
if build_utils.should_upload_code(
Expand Down

0 comments on commit eeab306

Please sign in to comment.