GoogleCloudPlatform / gsutil

A command line tool for interacting with cloud storage services.
Apache License 2.0
864 stars 331 forks source link

Remove the use of load_pkcs12 from signurl command #1782

Closed googlyrahman closed 1 month ago

googlyrahman commented 1 month ago

If you haven't already, it would probably be worth giving this a go with some actual .p12 files to make sure the output URLs work.

I've did some manual testing with .p12 keys, and .json keys. Everything works fine. Though i would request you as well to pull changes locally, and try this out!

googlyrahman commented 1 month ago

Adressed!

rrauber commented 1 month ago

It looks like the tests aren't providing much signal right now because of an org policy constraint. For example, the python 3.11 tests end with 404/930 finished and 323 failures with the following message:

ERROR 0610 09:51:24.661415 retry_decorator.py] Retrying in 7.37 seconds ...
Traceback (most recent call last):
  File "/tmpfs/src/github/src/gsutil/third_party/retry-decorator/retry_decorator/retry_decorator.py", line 20, in f_retry
    return f(*args, **kwargs)
  File "/tmpfs/src/github/src/gsutil/gslib/tests/testcase/integration_testcase.py", line 630, in _CreateBucketWithExponentialBackoff
    bucket_uri.create_bucket(storage_class=storage_class,
  File "/tmpfs/src/github/src/gsutil/gslib/vendored/boto/boto/storage_uri.py", line 556, in create_bucket
    return conn.create_bucket(self.bucket_name, headers, location, policy,
  File "/tmpfs/src/github/src/gsutil/gslib/vendored/boto/boto/gs/connection.py", line 116, in create_bucket
    raise self.provider.storage_response_error(
boto.exception.GSResponseError: GSResponseError: 412 Precondition Failed
<?xml version='1.0' encoding='UTF-8'?><Error><Code>OrgPolicyConstraintFailed</Code><Message>Request violates OrgPolicy constraint.</Message><Details>'0' violates constraint 'constraints/storage.softDeletePolicySeconds'</Details></Error>

It'd be best if we were able to resolve this before merging, either by opting the test project out of the org policy constraint, or by giving the create bucket call in tests a default value for the field it constrains that's allowed.

googlyrahman commented 1 month ago

File "/tmpfs/src/github/src/gsutil/gslib/vendored/boto/boto/gs/connection.py", line 116, in create_bucket

We've removed the org policy constraint, and it should be fine now.