Skip to content

S3 binary caches don't work with network proxies #4883

@Fuuzetsu

Description

@Fuuzetsu

Describe the bug

We can't use S3 binary caches with network proxies.

This was hinted at in #3529 . But the symptom is worse: if you try to do nix-build or something, it'll hang somewhere in AWS SDK code and you have to open second terminal and kill -9 the nix process.

Steps To Reproduce

  • set HTTP_PROXY and such values for your nix-daemon
  • set s3:// binary cache
  • run some command like nix-build '<nixpkgs>' -A hello --no-out-link for a package you don't have.

Expected behavior

Binary cache is queried properly.

nix-env --version output

nix-env (Nix) 2.3.3

Looking at source, I have no reason to believe this is not the case still in HEAD.

Additional context

As per aws/aws-sdk-cpp#1049 , the values for any proxy have to be explicitly set by the SDK user. If we look at s3-binary-cache-store.cc, you'll see that nowhere does it do anything like this.

It is pretty annoying that they unset it because now nix presumably has to figure out what the proxy values are set, parse them, pass them to AWS SDK and have that just spit it back out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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