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

[WIP] docker, dockerTools: Unpin Go 1.9 (remove Go from Docker closure) #41435

Closed
wants to merge 3 commits into from

Conversation

Anton-Latukha
Copy link
Contributor

@Anton-Latukha Anton-Latukha commented Jun 4, 2018

Motivation for this change

Go would not longer going to be present in the Docker closure.

Fixes:

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@Anton-Latukha Anton-Latukha changed the title docker, dockerTools: Unpin Go (removes Go from closure) docker, dockerTools: Unpin Go (remove Go from Docker closure) Jun 4, 2018
@Anton-Latukha Anton-Latukha changed the title docker, dockerTools: Unpin Go (remove Go from Docker closure) docker, dockerTools: Unpin Go 1.9 (remove Go from Docker closure) Jun 4, 2018
@orivej
Copy link
Contributor

orivej commented Jun 4, 2018

@nlewo
Copy link
Member

nlewo commented Jun 4, 2018

@GrahamcOfBorg test docker-tools docker

@srhb
Copy link
Contributor

srhb commented Jun 4, 2018

Yes, I think we should still attempt to use the same versions that upstream does.

@GrahamcOfBorg
Copy link

Success on aarch64-linux

Attempted: tests.docker-tools, tests.docker

No partial log is available.

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: tests.docker-tools, tests.docker

Partial log (click to expand)

fixing missing hash on '/nix/store/ykdgcy5ssgpv7qfw94jdxip7jpdznh4v-nghttp2-1.32.0-lib'
updating size field on '/nix/store/ykdgcy5ssgpv7qfw94jdxip7jpdznh4v-nghttp2-1.32.0-lib' to 188136
Packing layer...
Computing layer checksum...
builder for '/nix/store/z3vmskdmcq95shpkds54pwckv16hi7m4-docker-layer-nix.drv' failed with exit code 1
cannot build derivation '/nix/store/qgivdlfjad49rhzmafgcswwb5z4m8hah-runtime-deps.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/db46ar5mfh11fi07xaq2zgrdg896i0qq-docker-image-nix.tar.gz.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/va7z1pam988zyi842li11qqif9pll0qy-nixos-test-driver-docker-tools.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/8prgrlmb24fi28zhvx5kzzhdw8bwjgwc-vm-test-run-docker-tools.drv': 1 dependencies couldn't be built
error: build of '/nix/store/8prgrlmb24fi28zhvx5kzzhdw8bwjgwc-vm-test-run-docker-tools.drv' failed

@Anton-Latukha Anton-Latukha changed the title docker, dockerTools: Unpin Go 1.9 (remove Go from Docker closure) [WIP] docker, dockerTools: Unpin Go 1.9 (remove Go from Docker closure) Jun 4, 2018
@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jun 4, 2018

I am figuring-out why:

{  go ? null, go_1_9 ? null }:    # <---
rec {
  dockerGen = { ... }:
    let
      docker-containerd = containerd.overrideAttrs (oldAttrs: rec {
        go = (if versionAtLeast version "18.05.5-ce" then go else go_1_9);    # <---
        buildInputs = [ removeReferencesTo go ];
      });
    in
    stdenv.mkDerivation ( rec {
      inherit docker-containerd;
      buildInputs = [ removeReferences go ];
    });

  docker_18_03 = dockerGen rec { ... };

  docker_18_05 = dockerGen rec { ... };
}

Makes Go to come back.
Note, both in (18_03 && 18_05) versions.

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jun 4, 2018

So the main question is: how to manage package version override, so that removeReferencesTo works?

Maybe the real question is formulated backwards. It is a quirk, and we need to change removeReferencesTo itself, to work with normal overrides.

@orivej
Copy link
Contributor

orivej commented Jun 4, 2018

You don't have to introduce go_1_9 into docker/default.nix, you can simply put this in all-packages.nix:

  inherit (callPackage ../applications/virtualization/docker { go = go_1_9; })
    docker_18_03;
  inherit (callPackage ../applications/virtualization/docker { go = go_1_10; })
    docker_18_05;

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jun 4, 2018

Putting it in docker/default.nix, makes:

  • obvious for everyone who looks at docker
  • since situation with Docker&Go versions soon can change, that means people would automatically maintain this topic
  • here we work to solve removeReferencesTo for overrides.

Putting it in all-packages.nix would result in the same:

  • I would not track it.
  • everyone looks at docker/default.nix, and try to figure-out what is going on.
  • we return to initial position with Docker closure includes Go, while Go with introduction of 1.10 became gargantuan 1,368,973,064 (graphic), and it adds to Docker 673,164,112 at current moment.

@Anton-Latukha
Copy link
Contributor Author

Since removeReferencesTo is a cool concept, and at this moment not really used, so we better figure-out how to make it work with overrides of buildInputs.

@Anton-Latukha
Copy link
Contributor Author

Closed in favor of: #41849
I did not found that solution.

@Anton-Latukha Anton-Latukha deleted the docker-go-fix branch June 11, 2018 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants