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

checkout: incorrectly states files are modified when they are executable #10588

Open
jldorscheidt opened this issue Oct 15, 2024 · 1 comment

Comments

@jldorscheidt
Copy link

jldorscheidt commented Oct 15, 2024

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:

  1. mkdir -p dvc_mwe/dvc_mwe/data dvc_mwe/cache dvc_mwe/remote
  2. touch dvc_mwe/dvc_mwe/data/data.txt && chmod +x dvc_mwe/dvc_mwe/data/data.txt
  3. cd dvc_mwe/dvc_mwe
  4. git init && dvc init
  5. Copy contents of dvc.yaml to dvc_mwe/dvc_mwe/data/dvc.yaml
  6. Copy contents of config to dvc_mwe/dvc_mwe/.dvc/config
  7. dvc add data/data.txt
  8. dvc repro data/dvc.yaml
  9. dvc push
  10. dvc checkout
  11. dvc 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):

@robince
Copy link

robince commented Dec 4, 2024

I see the same behaviour with files with executable bit set in a tracked folder. The folder is listed as modified on every pull or checkout. Removing the executable permission on all the files stopped this.

DVC version: 3.58.0 (brew)
--------------------------
Platform: Python 3.13.0 on macOS-14.7.1-arm64-arm-64bit-Mach-O
Subprojects:
	dvc_data = 3.16.7
	dvc_objects = 5.1.0
	dvc_render = 1.0.2
	dvc_task = 0.40.2
	scmrepo = 3.3.9
Supports:
	azure (adlfs = 2024.7.0, knack = 0.12.0, azure-identity = 1.19.0),
	gdrive (pydrive2 = 1.21.3),
	gs (gcsfs = 2024.10.0),
	hdfs (fsspec = 2024.10.0, pyarrow = 18.1.0),
	http (aiohttp = 3.11.8, aiohttp-retry = 2.9.1),
	https (aiohttp = 3.11.8, aiohttp-retry = 2.9.1),
	oss (ossfs = 2023.12.0),
	s3 (s3fs = 2024.10.0, boto3 = 1.35.36),
	ssh (sshfs = 2024.9.0),
	webdav (webdav4 = 0.10.0),
	webdavs (webdav4 = 0.10.0),
	webhdfs (fsspec = 2024.10.0)
Config:
	Global: /Users/user/Library/Application Support/dvc
	System: /opt/homebrew/share/dvc
Cache types: reflink, hardlink, symlink
Cache directory: apfs on /dev/disk3s1s1
Caches: local
Remotes: azure
Workspace directory: apfs on /dev/disk3s1s1
Repo: dvc, git
Repo.site_cache_dir: /opt/homebrew/var/cache/dvc/repo/1f3fb65063a5abf9859cedb42ce3cc1f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants