Skip to content

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

Closed

Description

@arianvp

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.

Activity

  1. Mic92 commented on Dec 19, 2024

    @Mic92
    Member

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

  2. Mic92 commented on Dec 19, 2024

    @Mic92
    Member

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

  3. Mic92 commented on Dec 19, 2024

    @Mic92
    Member

    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).

  4. NaN-git commented on Jan 3, 2025

    @NaN-git
    Contributor

    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?

  5. Mic92 commented on Apr 11, 2025

    @Mic92
    Member

    Tested with aws and minio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions