Skip to content

dvc: lock file ignored when command is run more than one time #2822

@algomaster99

Description

@algomaster99

Version

DVC version: 0.70.0
Python version: 3.7.3
Platform: Linux-5.0.0-36-generic-x86_64-with-Ubuntu-18.04-bionic
Binary: False
Package: pip
Cache: reflink - False, hardlink - True, symlink - True

Problem

.dvc/lock is ignored when a dvc command is run for the second time.
Screenshot from 2019-11-20 18-21-29

Expected behaviour

When dvc status is run for the second time, it should throw an error since .dvc/lock isn't deleted yet so it should have prevented the command from running.

Reproduce

  1. Manually created lock file.
$ touch .dvc/lock
  1. Run dvc status. (Throws error)
>>>
ERROR: failed to obtain data status - cannot perform the command because another DVC process seems to be running on this project. If that is not the case, manually remove `.dvc/lock` and try again.
  1. Run ls .dvc to check if lock is still present.
$ ls .dvc
>>> cache  config  lock  state  tmp  updater
  1. Run dvc status again.
    Runs successfully. It should not since lock is still present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugDid we break something?research

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions