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

eksctl: init at 0.1.35 #63041

Merged
merged 1 commit into from Jun 15, 2019

Conversation

Projects
None yet
3 participants
@xrelkd
Copy link
Contributor

commented Jun 12, 2019

Motivation for this change

eksctl is a CLI for Amazon EKS
https://eksctl.io
https://github.com/weaveworks/eksctl

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 nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.


meta = with stdenv.lib; {
description = "A CLI for Amazon EKS";
homepage = https://github.com/weaveworks/eksctl;

This comment has been minimized.

Copy link
@JohnAZoidberg

JohnAZoidberg Jun 12, 2019

Contributor

Hint: We're probably going to deprecate unquotes URL syntax when RFC 45 is approved.

Suggested change
homepage = https://github.com/weaveworks/eksctl;
homepage = "https://github.com/weaveworks/eksctl";

goPackagePath = "github.com/weaveworks/eksctl";

buildPhase =

This comment has been minimized.

Copy link
@JohnAZoidberg

JohnAZoidberg Jun 12, 2019

Contributor

Do you need the custom buildPhase?
I left it out and it builds fine - I have no AWS however, so I can't test.

@@ -0,0 +1,40 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:

This comment has been minimized.

Copy link
@JohnAZoidberg

JohnAZoidberg Jun 12, 2019

Contributor
Suggested change
{ stdenv, buildGoPackage, fetchFromGitHub }:
{ lib, buildGoPackage, fetchFromGitHub }:

If you're only using stdenv.lib you might as well just use lib directly here.

@xrelkd xrelkd force-pushed the xrelkd:add/eksctl branch from 5adde8b to 7ff24e8 Jun 13, 2019

@xrelkd

This comment has been minimized.

Copy link
Contributor Author

commented Jun 13, 2019

@JohnAZoidberg Thanks for the review!
I need the custom buildPhase, because

  1. I want to add netgo and release tag.
  2. We do not need to build result-bin/bin/build

@xrelkd xrelkd force-pushed the xrelkd:add/eksctl branch from 7ff24e8 to ccb7bf8 Jun 13, 2019

@JohnAZoidberg

This comment has been minimized.

Copy link
Contributor

commented Jun 13, 2019

I think if we replace the buildPhase with

  subPackages = [ "cmd/eksctl" ];

  buildFlags = ''
    -ldflags=-c
    -ldflags=-w
    -tags netgo
    -tags release
  '';

it does exactly what you want.
I just couldn't get the ldflags and tags to combine as one argument each.

@xrelkd xrelkd force-pushed the xrelkd:add/eksctl branch from ccb7bf8 to 3c924f0 Jun 13, 2019

@xrelkd

This comment has been minimized.

Copy link
Contributor Author

commented Jun 13, 2019

@JohnAZoidberg Thank you!
I have updated the code as your suggestions.

@JohnAZoidberg

This comment has been minimized.

Copy link
Contributor

commented Jun 13, 2019

What do the linkerflags do and why do you include them?

@xrelkd xrelkd force-pushed the xrelkd:add/eksctl branch from 3c924f0 to 66ee3ae Jun 13, 2019

@xrelkd

This comment has been minimized.

Copy link
Contributor Author

commented Jun 13, 2019

The -w turns off DWARF debugging information.
The -s turns off generation of the Go symbol table.

Take a look at this file: https://github.com/weaveworks/eksctl/blob/master/.goreleaser.yml

@xrelkd

This comment has been minimized.

Copy link
Contributor Author

commented Jun 15, 2019

@JohnAZoidberg Thanks for the review.
@marsam Could we merge this PR? Thank you!

@JohnAZoidberg

This comment has been minimized.

Copy link
Contributor

commented Jun 15, 2019

I haven't tried whether it works and does the right thing. I trust that you have?

@xrelkd

This comment has been minimized.

Copy link
Contributor Author

commented Jun 15, 2019

@JohnAZoidberg
Yes, I have tried to use eksctl to create a AWS EKS cluster and delete the created AWS EKS cluster after that.
eksctl works as expected.

BTW, could you invoke @GrahamcOfBorg build eksctl, if possible?
Thank you!

@marsam

This comment has been minimized.

Copy link
Contributor

commented Jun 15, 2019

LGTM, Thanks!
@GrahamcOfBorg build eksctl

@marsam marsam merged commit 1cafe46 into NixOS:master Jun 15, 2019

15 checks passed

Evaluation Performance Report Evaluator Performance Report
Details
eksctl on aarch64-linux Success
Details
eksctl on x86_64-linux Success
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@xrelkd

This comment has been minimized.

Copy link
Contributor Author

commented Jun 15, 2019

@JohnAZoidberg @marsam Thank you very much!

@xrelkd xrelkd deleted the xrelkd:add/eksctl branch Jun 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.