Skip to content

Commit

Permalink
keep stage.dump and dvcfile.dump in sync (#5382)
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry authored Feb 2, 2021
1 parent d05be36 commit 4348832
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dvc/command/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def run(self):

with repo.scm.track_file_changes(config=repo.config):
stage.ignore_outs()
stage.dump()
stage.dump(update_lock=False)
return 0


Expand Down
4 changes: 2 additions & 2 deletions dvc/stage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,8 +701,8 @@ def merge(self, ancestor, other):

self.outs[0].merge(ancestor_out, other.outs[0])

def dump(self, update_lock: bool = False):
self.dvcfile.dump(self, update_lock=update_lock)
def dump(self, **kwargs):
self.dvcfile.dump(self, **kwargs)


class PipelineStage(Stage):
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_repro_unicode(tmp_dir, dvc, dummy_stage):
dummy_stage(params=[{"settings.json": ["Ω_value"]}])
(stage,) = dvc.reproduce(dry=True)
stage.cmd = "foo"
stage.dvcfile._lockfile.dump(stage)
stage.dump()

dvc.remove(stage.name)
assert not (tmp_dir / "dvc.yaml").exists()
Expand Down

0 comments on commit 4348832

Please sign in to comment.