`exp show`: branch name containing path separator not returned for HEAD
See original GitHub issueBug Report
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:
- The wrong name is shown in our experiments table.
- 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
- checkout a branch with a name which includes a file path separator (e.g
readme/known-limitations
) - run
exp show
- 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: https://github.com/iterative/vscode-dvc/issues/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.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Git: What's the path separator used in the content of the .git ...
1 Answer 1 ... HEAD uses a reference name and not a path separator. Git always uses forward slashes in reference names, even...
Read more >XPath and XQuery Functions and Operators 3.1 - W3C
These functions and operators are defined for use in [XML Path Language (XPath) 3.1] and [XQuery 3.1: An XML Query Language] and [XSL ......
Read more >GitUtils.ps1 1.7.3 - PowerShell Gallery
Gets the path to the current repository's .git dir. ... is a bare repository, the root directory of the bare repository. ... None....
Read more >CVS--Concurrent Versions System
This file contains per-directory sticky tags or dates. The first character is `T' for a branch tag, `N' for a non-branch tag, or...
Read more >Diff - refs/heads/release-branch.r58^! - go - Git at Google
[release-branch.r58] reflect: disallow Interface method on Value obtained via unexported name Also remove exp/datafmt that depends on the broken reflect ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For experiments this is expected and intentional, exp names are not allowed to contain slashes (even though they are valid in git refs)
see: https://github.com/iterative/dvc/pull/6848#issuecomment-950487613
e: reopened since for branches/tags we should still display them with the slash
If it’s a small effort, could we please address this?