Skip to content

Commit

Permalink
fix(service): fix clone depth not being respected
Browse files Browse the repository at this point in the history
  • Loading branch information
Panaetius committed Jan 15, 2024
1 parent a7f4a22 commit ac91912
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions renku/ui/service/cache/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"""Renku service project cache management."""
from typing import cast

from marshmallow import EXCLUDE
from marshmallow import RAISE

from renku.ui.service.cache.base import BaseCache
from renku.ui.service.cache.models.project import Project
Expand All @@ -34,7 +34,7 @@ def make_project(self, user, project_data, persist=True) -> Project:
"""Store user project metadata."""
project_data.update({"user_id": user.user_id})

project_obj: Project = cast(Project, self.project_schema.load(project_data, unknown=EXCLUDE))
project_obj: Project = cast(Project, self.project_schema.load(project_data, unknown=RAISE))

if persist:
project_obj.save()
Expand Down
2 changes: 1 addition & 1 deletion renku/ui/service/gateways/repository_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def _clone_project(
"owner": parsed_git_url.owner,
"name": parsed_git_url.name,
"slug": normalize_to_ascii(parsed_git_url.name),
"depth": PROJECT_CLONE_DEPTH_DEFAULT if shallow else None,
"clone_depth": PROJECT_CLONE_DEPTH_DEFAULT if shallow else None,
"branch": branch,
"git_url": git_url,
"user_id": user.user_id,
Expand Down

0 comments on commit ac91912

Please sign in to comment.