Storage: Make signurl work with objects containing tildes.#8200
Storage: Make signurl work with objects containing tildes.#8200MewX wants to merge 1 commit intogoogleapis:masterfrom MewX:patch-1
Conversation
|
This PR breaks existing unit tests which assert that a slash in the blob name is not escaped, e.g.: __________________ Test_Blob.test_public_url_w_slash_in_name ___________________
self = <tests.unit.test_blob.Test_Blob testMethod=test_public_url_w_slash_in_name>
def test_public_url_w_slash_in_name(self):
BLOB_NAME = "parent/child"
bucket = _Bucket()
blob = self._make_one(BLOB_NAME, bucket=bucket)
self.assertEqual(
> blob.public_url, "https://storage.googleapis.com/name/parent/child"
)
E AssertionError: 'https://storage.googleapis.com/name/parent%2Fchild' != 'https://storage.googleapis.com/name/parent/child'
E - https://storage.googleapis.com/name/parent%2Fchild
E ? ^^^
E + https://storage.googleapis.com/name/parent/child
E ? ^
tests/unit/test_blob.py:344: AssertionError |
|
Hi @MewX, could you add "/" as a safe character as well? gsutil also does this at https://github.com/GoogleCloudPlatform/gsutil/pull/783/files#diff-2203ca5e293c09b69dae32ab51ee067aR543 |
|
Hi @MewX, that's our CI being flaky. I've re-triggered the tests. |
|
Hi @busunkim96, the test failed again with the same error message. Would you like to take a look at the issue? |
|
The Core Kokoro job fails due to a Kokoro-internal glitch. |
|
Hi @tseaver, could you or anyone please take a look at this bug fix? A customer might be waiting for this bug fix. Thanks! |
|
@MewX rerunning tests. Thank you for your patience. |
|
@frankyn No idea if that's normal or not, but I just kicked off the storage job manually. |
Fixes https://issuetracker.google.com/issues/133359302
Similar to this one: GoogleCloudPlatform/gsutil#783