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

nix copy --to s3:// progress bar is incorrect #12084

Open
2 tasks
arianvp opened this issue Dec 18, 2024 · 4 comments
Open
2 tasks

nix copy --to s3:// progress bar is incorrect #12084

arianvp opened this issue Dec 18, 2024 · 4 comments
Labels

Comments

@arianvp
Copy link
Member

arianvp commented Dec 18, 2024

Describe the bug

When uploading to S3 with nix copy the progress bar will show hundreds of thousands of megabytes copied for a 1GB closure

Steps To Reproduce

[arian@framework:~/Projects/terraform-aws-ssm-nixos-deploy-document/examples/nix-store-path]$ nix copy --to "s3://cache2024912328328&secret-key=./key.sec" "${out_path}"
[8/460/639 copied (150616.3/143782.0 MiB)] 

Expected behavior

The progress bar shows a sane number. Not 150616.3/143782.0 MiB

Metadata

nix --version
nix (Nix) 2.24.9

Additional context

Checklist


Add 👍 to issues you find important.

@arianvp arianvp added the bug label Dec 18, 2024
@Mic92
Copy link
Member

Mic92 commented Dec 19, 2024

Is this maybe caused by transparent http compression? I noticed something similar when downloading nars from harmonia and zstd compression.

@Mic92
Copy link
Member

Mic92 commented Dec 19, 2024

Mhm. But than the value should be actually smaller instead of bigger.

@Mic92
Copy link
Member

Mic92 commented Dec 19, 2024

In any case, can you see compression beeing used for upload?
Run nix copy -vvvvvvv (or add enough -v until you can see http headers).

@NaN-git
Copy link

NaN-git commented Jan 3, 2025

Is it possible to develop some test cases for this or a minimal example?

Some of the logic seems to be quite dirty. According to my understanding the progress bar should not work for S3 at all. I wrote some code, but I don't know whether it actually works: https://github.com/NaN-git/nix/tree/s3-upload

Can someone test it?

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

No branches or pull requests

3 participants