Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exp save: Incorrect warnings about untracked files #9061

Closed
daavoo opened this issue Feb 20, 2023 · 0 comments · Fixed by #9064
Closed

exp save: Incorrect warnings about untracked files #9061

daavoo opened this issue Feb 20, 2023 · 0 comments · Fixed by #9064
Assignees
Labels
A: experiments Related to dvc exp bug Did we break something? ui user interface / interaction

Comments

@daavoo
Copy link
Contributor

daavoo commented Feb 20, 2023

The current check:

if include_untracked:
untracked = [file for file in untracked if file not in include_untracked]

Logs warnings when there is not an exact string match between the untracked in scm.status() and any item in include_untracked.

This causes incorrect warnings in scenarios like passing a folder to --include-untracked:

$ git init
$ dvc init
$ git commit -m "init"
$ mkdir data
$ touch data/foo
$ touch data/bar
$ dvc exp save --include-untracked data
WARNING: The following untracked files were present in the workspace before saving but will not be included in the experiment commit:
	data/foo, data/bar
Experiment has been saved as: paler-tams                              

To promote an experiment to a Git branch run:

	dvc exp branch <exp> <branch>

Where data/foo and data/bar are actually included in the experiment:

$ git show f312d6d
commit f312d6d00ab0ff7d6bb1d2d0fb8eca12e2a8ffb0 (refs/exps/2e/95a6fc1d0347b35f21d03051555f55bd4cf2af/paler-tams)
Author: David de la Iglesia Castro <daviddelaiglesiacastro@gmail.com>
Date:   Mon Feb 20 15:15:31 2023 +0100

    dvc: commit experiment paler-tams

diff --git a/data/bar b/data/bar
new file mode 100644
index 0000000..e69de29
diff --git a/data/foo b/data/foo
new file mode 100644
index 0000000..e69de29
@daavoo daavoo added A: experiments Related to dvc exp ui user interface / interaction bug Did we break something? labels Feb 20, 2023
@daavoo daavoo self-assigned this Feb 20, 2023
@daavoo daavoo added this to DVC Feb 20, 2023
@daavoo daavoo moved this to In Progress in DVC Feb 20, 2023
daavoo added a commit that referenced this issue Feb 20, 2023
@daavoo daavoo linked a pull request Feb 20, 2023 that will close this issue
daavoo added a commit that referenced this issue Feb 21, 2023
daavoo added a commit that referenced this issue Feb 21, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in DVC Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: experiments Related to dvc exp bug Did we break something? ui user interface / interaction
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant