checkout: incorrectly states files are modified when they are executable
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.9k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Bug Report
checkout: incorrectly states files are modified when they are executable
Description
When tracking a file that is executable, using a shared cache with symlinks, dvc checkout keeps stating changes are applied to the file.
Reproduce
contents of dvc.yaml:
stages:
add_some_text:
wdir: ../
desc: write some text
cmd:
- >
touch data/some_new_file.txt
deps:
- data/data.txt
outs:
- data/some_new_file.txt
contents of config
[cache]
dir = ../../cache
type = symlink
shared = group
['remote "temp"']
url = ../../remote
[core]
remote = temp
steps to reproduce:
mkdir -p dvc_mwe/dvc_mwe/data dvc_mwe/cache dvc_mwe/remotetouch dvc_mwe/dvc_mwe/data/data.txt && chmod +x dvc_mwe/dvc_mwe/data/data.txtcd dvc_mwe/dvc_mwegit init && dvc init- Copy contents of dvc.yaml to
dvc_mwe/dvc_mwe/data/dvc.yaml - Copy contents of config to
dvc_mwe/dvc_mwe/.dvc/config dvc add data/data.txtdvc repro data/dvc.yamldvc pushdvc checkoutdvc checkout
dvc checkout will keep stating that some_new_file.txt has been modified
Expected
repeatedly calling dvc checkout without any data changes should not print any files that have been modified
Environment information
python==3.10.12
dvc==3.55.2
Output of dvc doctor:
$ dvc doctor
DVC version: 3.55.2 (pip)
-------------------------
Platform: Python 3.10.13 on Linux-6.9.3-76060903-generic-x86_64-with-glibc2.35
Subprojects:
dvc_data = 3.16.6
dvc_objects = 5.1.0
dvc_render = 1.0.2
dvc_task = 0.40.2
scmrepo = 3.3.8
Supports:
http (aiohttp = 3.10.10, aiohttp-retry = 2.8.3),
https (aiohttp = 3.10.10, aiohttp-retry = 2.8.3)
Config:
Global: /home/joostdorscheidt/.config/dvc
System: /etc/xdg/xdg-pop/dvc
Cache types: hardlink, symlink
Cache directory: ext4 on /dev/mapper/data-root
Caches: local
Remotes: local
Workspace directory: ext4 on /dev/mapper/data-root
Repo: dvc, git
Repo.site_cache_dir: /var/tmp/dvc/repo/8324f5dfe498694db375810644b6aa5a
Additional Information (if any):
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the supplied dvc.yaml, .dvc/config, symlink cache, and repeated dvc checkout commands. Start by tracing the checkout handling for executable files and symlinks; done means repeated checkout runs no longer report unchanged files as modified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100