GoogleCloudPlatform / GoogleCloudPlatform/gsutil

Failure to load deprecated libraries leads to misleading error message for users

Open
#1,759 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
918
Forks
335
PR merge metrics
No merged PRs in 30d

Description

This `try : except` leads to a misleading error message if the nested dependency of, say `load_pkcs12`, no longer exists

It seems like the `HAVE_OPENSSL` value
https://github.com/GoogleCloudPlatform/gsutil/blob/a872f98b59bad2bb72010afb9b0b90aa91ec5d0c/gslib/commands/signurl.py#L65

leads to the user error message of `CommandException: The signurl command requires the pyopenssl library (try pip install pyopenssl or easy_install pyopenssl)` which leads to confusion about how to proceed.

Workaround: install the current n-1 version of pyopenssl: `pip3 install pyopenssl==23.2.0` which does indeed work

Test case: `gsutil signurl -d 10m `

Related: https://github.com/GoogleCloudPlatform/gsutil/issues/1753

Contributor guide

Open the contributing guide

Research direction

Start in gslib/commands/signurl.py at the HAVE_OPENSSL check linked in the issue, then run the provided gsutil signurl command with the affected dependency versions. Trace how the nested load_pkcs12 failure becomes the pyopenssl-missing message; done means users receive an accurate actionable error when the deprecated library dependency cannot load.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.