Skip to content

[Bug]: Some locally committed files are empty in runs #1679

@jvstme

Description

@jvstme

Steps to reproduce

Clone a git repo and commit any binary file or a large (e.g. 1GB) text file. Do not push to remote.

> git clone https://github.com/dstackai/gpuhunt.git
Cloning into 'gpuhunt'...
remote: Enumerating objects: 1264, done.
remote: Counting objects: 100% (623/623), done.
remote: Compressing objects: 100% (294/294), done.
remote: Total 1264 (delta 417), reused 458 (delta 321), pack-reused 641 (from 1)
Receiving objects: 100% (1264/1264), 272.24 KiB | 1010.00 KiB/s, done.
Resolving deltas: 100% (686/686), done.

> cd gpuhunt/

> dd if=/dev/zero of=test-file bs=65536 count=1
1+0 records in
1+0 records out
65536 bytes (66 kB, 64 KiB) copied, 0.000250103 s, 262 MB/s

> git add test-file

> git commit -m test

Run a dstack configuration in this repo.

> printf "type: dev-environment\nide: vscode\nname: test-run" > .dstack.yml
> dstack init
OK
> dstack apply -y

Wait until the run is running.

Actual behaviour

The file is empty in the run.

> ssh test-run ls -lh /workflow/test-file
-rw-r--r-- 1 root root 0 Sep 10 08:09 /workflow/test-file

Expected behaviour

The file is not empty.

> ssh test-run ls -lh /workflow/test-file
-rw-r--r-- 1 root root 64K Sep 10 08:09 /workflow/test-file

Additional information

Here git diff only returns file names for binary or large files, not the actual diff.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstale

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions