google-cloud-sdk: fix gcloud storage sign-url error due to missing pyopenssl dependency#301986
Merged
marcusramberg merged 1 commit intoNixOS:masterfrom May 12, 2024
Merged
Conversation
…openssl dependency
Contributor
|
Thanks for analysing the issue thoroughly. Those google tools contain some of the worst code I've seen (not saying this lightly). |
Contributor
|
Result of 1 package marked as broken and skipped:
3 packages built:
|
marcusramberg
approved these changes
May 12, 2024
Contributor
marcusramberg
left a comment
There was a problem hiding this comment.
Tested and confirmed this fixes the pyOpenSSL error with sign-url.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#141773 changes the python dependencies to include
opensslinstead ofpyopensslwhich seems like a mistake due toopensslnot existing insidepythonPackages(and thewithbinding picking up the top level dependency instead). The author referenced #135045 which was caused by pyopenssl crashing on aarch64-darwin (pyca/pyopenssl#873), due to cffi's behaviour. Since then, #187636 has fixed cffi and hence makespyopensslcompatible with aarch64-darwin.Despite the previous change,
pyopensslis still required to sign urls to Google Cloud Storage buckets when using a service account private key file. Attempting to do so with the current package results in:Changing the dependency back to
pyopensslfixes this issue, and the steps to reproduce #135045 still succeed on aarch64-darwin.Unfortunately,
gsutilwill still showpyopensslas missing because they rely on the presence of a now-deleted pyopenssl function and fall back to the same (confusing) error message (GoogleCloudPlatform/gsutil#1753).(I have attempted to write a test for this, but gcloud absolutely want to be authenticated to google cloud in order to reach a point where the error would've been displayed)
Description of changes
Fix the pyopenssl dependency by referencing the right package
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)