google-cloud-sdk: fix gcloud storage sign-url error due to missing pyopenssl dependency #301986
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
openssl
instead ofpyopenssl
which seems like a mistake due toopenssl
not existing insidepythonPackages
(and thewith
binding 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 makespyopenssl
compatible with aarch64-darwin.Despite the previous change,
pyopenssl
is 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
pyopenssl
fixes this issue, and the steps to reproduce #135045 still succeed on aarch64-darwin.Unfortunately,
gsutil
will still showpyopenssl
as 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 = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)