Skip to content

Comments

fix: don't unprotect outs if not cached#10988

Open
evals-gic wants to merge 1 commit intotreeverse:mainfrom
evals-gic:fix/unprotect-cached-only
Open

fix: don't unprotect outs if not cached#10988
evals-gic wants to merge 1 commit intotreeverse:mainfrom
evals-gic:fix/unprotect-cached-only

Conversation

@evals-gic
Copy link

Only unprotect outputs that have use_cache set to True. This prevents unnecessary unprotection of non-cached outputs.

Only unprotect outputs that have use_cache set to True.
This prevents unnecessary unprotection of non-cached outputs.
@github-project-automation github-project-automation bot moved this to Backlog in DVC Feb 11, 2026
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Fix Bot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Comment on lines +388 to +389
if out.use_cache:
out.unprotect()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already how unprotect works.

dvc/dvc/output.py

Lines 1079 to 1084 in dcf6f48

def unprotect(self):
if self.exists and self.use_cache:
with TqdmCallback(
size=self.meta.nfiles or -1, desc=f"Unprotecting {self}"
) as callback:
self.cache.unprotect(self.fs_path, callback=callback)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants