mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
exp run: git add param files that will be modified.
Only if they are currently untracked and `--temp` or `--queue` is passed. Closes #7842
This commit is contained in:
@@ -92,3 +92,19 @@ def test_queue_remove_done(
|
||||
assert set(celery_queue.clear(success=True)) == set(success_tasks[:2])
|
||||
|
||||
assert celery_queue.status() == []
|
||||
|
||||
|
||||
def test_queue_doesnt_remove_untracked_params_file(tmp_dir, dvc, scm):
|
||||
"""Regression test for https://github.com/iterative/dvc/issues/7842"""
|
||||
tmp_dir.gen("params.yaml", "foo: 1")
|
||||
stage = dvc.run(cmd="echo ${foo}", params=["foo"], name="echo-foo")
|
||||
scm.add(
|
||||
[
|
||||
"dvc.yaml",
|
||||
"dvc.lock",
|
||||
".gitignore",
|
||||
]
|
||||
)
|
||||
scm.commit("init")
|
||||
dvc.experiments.run(stage.addressing, params=["foo=2"], queue=True)
|
||||
assert (tmp_dir / "params.yaml").exists()
|
||||
|
||||
Reference in New Issue
Block a user