stage: monitor: don't forget to unprotect outs (#6134)

Fixes #6083
This commit is contained in:
Ruslan Kuprieiev
2021-06-10 10:53:51 +02:00
committed by GitHub
parent 32859763be
commit 429d54e146
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -75,6 +75,7 @@ class CheckpointTask(MonitorTask):
def _run_callback(stage, callback_func):
stage.save(allow_missing=True)
stage.commit(allow_missing=True)
stage.unprotect_outs()
logger.debug("Running checkpoint callback for stage '%s'", stage)
callback_func()
+5 -1
View File
@@ -7,9 +7,13 @@ from dvc.repo.experiments.base import EXEC_APPLY, EXEC_CHECKPOINT
@pytest.mark.parametrize("workspace", [True, False])
@pytest.mark.parametrize("links", ["reflink,copy", "hardlink,symlink"])
def test_new_checkpoint(
tmp_dir, scm, dvc, checkpoint_stage, mocker, workspace
tmp_dir, scm, dvc, checkpoint_stage, mocker, workspace, links
):
with dvc.config.edit() as conf:
conf["cache"]["type"] = links
new_mock = mocker.spy(dvc.experiments, "new")
results = dvc.experiments.run(
checkpoint_stage.addressing, params=["foo=2"], tmp_dir=not workspace