Skip to content

exp show: branch name containing path separator not returned for HEAD #7933

@mattseddon

Description

@mattseddon

Bug Report

From iterative/vscode-dvc#1946

Description

exp show will not return the full name of a branch for the HEAD revision if it contains a path separator.

This causes two issues in the extension:

  1. The wrong name is shown in our experiments table.
  2. We call plots diff with the incomplete branch name and it fails (we use the name to fetch the HEAD revision).

e.g when the branch name is readme/known-limitations the output is as follows:

/vscode-dvc/demo readme/known-limitations *1 !2 ❯ dvc exp show --show-json
{
  "workspace": {
  ...
  },
  "4d78b9e7158ee1d6504028f79f65daf48d2d9af3": {
    "baseline": {
      "data": {
       ...
        "name": "known-limitations"
      }
    }
  }
}

Reproduce

  1. checkout a branch with a name which includes a file path separator (e.g readme/known-limitations)
  2. run exp show
  3. the last part of the branch name will be returned as the name for the HEAD commit (e.g known-limitations).

Expected

exp show returns the full branch name including file separators.

Environment information

Output of dvc doctor:

$ dvc doctor
DVC version: 2.11.0 (brew)
---------------------------------
Platform: Python 3.9.13 on macOS-12.4-x86_64-i386-64bit
Supports:
        azure (adlfs = 2022.4.0, knack = 0.9.0, azure-identity = 1.10.0),
        gdrive (pydrive2 = 1.10.1),
        gs (gcsfs = 2022.5.0),
        webhdfs (fsspec = 2022.5.0),
        http (aiohttp = 3.8.1, aiohttp-retry = 2.4.6),
        https (aiohttp = 3.8.1, aiohttp-retry = 2.4.6),
        s3 (s3fs = 2022.5.0, boto3 = 1.21.21),
        ssh (sshfs = 2022.6.0),
        oss (ossfs = 2021.8.0),
        webdav (webdav4 = 0.9.7),
        webdavs (webdav4 = 0.9.7)
Cache types: reflink, hardlink, symlink
Cache directory: apfs on /dev/disk1s5s1
Caches: local
Remotes: s3
Workspace directory: apfs on /dev/disk1s5s1
Repo: dvc (subdir), git

Additional Information (if any):

Please LMK if this behaviour is by design. Thank you.

Original issue: iterative/vscode-dvc#1946

I have tested to see if calling dvc plots diff nested/branch works and it fails if there are any static plots involved. I will raise a separate issue for this.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions