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

google-cloud-sdk: fix gsutil startup crash #80010

Merged
merged 2 commits into from Feb 18, 2020
Merged

Conversation

edef1c
Copy link
Member

@edef1c edef1c commented Feb 13, 2020

This fixes #79754, by removing the two places where the tests are referenced by runtime code.

There's still a bunch of chaff that we could cull left, although it won't buy us much in closure size:

edef@vixen ~> rg -li '^(from.*tests.*import|import.*test)' (nix-build '<nixpkgs>' -A google-cloud-sdk --no-out-link) | wc -l
63
edef@vixen ~> du -ch (rg -li '^(from.*tests.*import|import.*test)' (nix-build '<nixpkgs>' -A google-cloud-sdk --no-out-link)) | tail -n1
858K	total
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-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)
  • Fits CONTRIBUTING.md.

@edef1c
Copy link
Member Author

edef1c commented Feb 13, 2020

Since #79250 seems to have made it into https://github.com/NixOS/nixpkgs/releases/tag/20.03-beta, this'll need a backport.

@edef1c edef1c requested a review from flokli February 13, 2020 11:49
The update checking mechanism references the tests, and thus
dbaafbb turned it into a crash at
startup.

It isn't much use in nixpkgs, so we're better off without it.
The command module references the tests, and since all command modules
get imported at startup, dbaafbb
turned it into a startup crash.

Unless you're actively hacking on gsutil, this command isn't much use,
so we're better off without it.
@edef1c edef1c closed this Feb 18, 2020
@edef1c edef1c reopened this Feb 18, 2020
@flokli flokli merged commit ac1e949 into NixOS:master Feb 18, 2020
@flokli
Copy link
Contributor

flokli commented Feb 18, 2020

backported to 20.03 in 45217d0 and 370505a.

@edef1c edef1c deleted the fix-gsutil-crash branch February 18, 2020 14:50
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.

google-cloud-sdk: gsutil does not work
2 participants