Skip to content

diff: with --targets and --hide-missing produces KeyError: 'not in cache' #5869

Open
@courentin

Description

@courentin

Bug Report

Description

When passing both --targets and --hide-missing to dvc diff, I have the following error:

------------------------------------------------------------
Traceback (most recent call last):
  File "/root/project/.venv/lib/python3.7/site-packages/dvc/main.py", line 55, in main
    ret = cmd.run()
  File "/root/project/.venv/lib/python3.7/site-packages/dvc/command/diff.py", line 143, in run
    del diff["not in cache"]
KeyError: 'not in cache'
------------------------------------------------------------

Ran: dvc diff --hide-missing --targets dvc.yaml -v

Additional Information (if any):

Full log
2021-04-23 14:49:49,376 ERROR: unexpected error - 'not in cache'
------------------------------------------------------------
Traceback (most recent call last):
  File "/root/project/.venv/lib/python3.7/site-packages/dvc/main.py", line 55, in main
    ret = cmd.run()
  File "/root/project/.venv/lib/python3.7/site-packages/dvc/command/diff.py", line 143, in run
    del diff["not in cache"]
KeyError: 'not in cache'
------------------------------------------------------------
2021-04-23 14:49:49,451 DEBUG: Version info for developers:
DVC version: 2.0.18 (pip)
---------------------------------
Platform: Python 3.7.5 on Linux-4.15.0-1092-aws-x86_64-with-Ubuntu-18.04-bionic
Supports: http, https, s3
Cache types: hardlink, symlink
Cache directory: overlay on overlay
Caches: local
Remotes: s3
Workspace directory: overlay on overlay
Repo: dvc, git

Metadata

Metadata

Assignees

No one assigned

    Labels

    A: statusRelated to the dvc diff/list/statusbugDid we break something?p2-mediumMedium priority, should be done, but less importantuiuser interface / interaction

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions