Storage: add generation arguments (from #7023).#7444
Storage: add generation arguments (from #7023).#7444tseaver merged 15 commits intogoogleapis:masterfrom tseaver:7023-storage-add_generation_arguments
Conversation
tseaver
commented
Feb 25, 2019
- Uses Storage: ensure that 'Blob.reload' passes encryption headers. #7441 as a base.
- Merges in @jmcarp's work from Add missing generation arguments for bucket and blob methods. #7023, with my requested changes from that PR.
- Closes Add missing generation arguments for bucket and blob methods. #7023.
- Implements Storage: fetch specific object version #5546, Storage: add support for deleting specific blob generations #5781, storage: cannot access / delete versioned objects #2463, support versioning options when fetching cloud storage buckets and objects #2538.
|
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the ℹ️ Googlers: Go here for more info. |
|
I've created #7478 to track the flaky systest, which I believe is unrelated to the changes in this PR (I cannot reproduce locally). |
frankyn
left a comment
There was a problem hiding this comment.
Adding one question. Overall LGTM.
|
The flaky module tear-down for storage system tests is unrelated: I've reported it in #7505. |
|
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
Duplicates base class version.
Create a 'Blob' instance w/ approprite name / generation, and use its 'path' and '_query_params' to generate the request.
|
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the ℹ️ Googlers: Go here for more info. |
|
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
|
Thank you for this! Is there a timeframe on when we can expect this to appear in a pypi release of google-cloud-storage? |
|
FYI this broke some of our tests - potentially on us but posting at least for others. Now if a process has a Specifically, this was our fixture: @pytest.fixture()
def existing_blob_name(project, bucket, blob_name_expanded, data):
blob = gcs.client(project).get_bucket(
bucket).blob(blob_name_expanded)
blob.upload_from_string(dill.dumps(data))
assert blob.exists()
yield blob.name
blob.delete()This was our test (for an internal wrapper method): def test_set_overwrite(existing_blob_name, bucket, project):
# could do this with a parameter but so small
with pytest.raises(ValueError):
gcs.set(existing_blob_name, 'abc', bucket=bucket,
project=project, overwrite=False)
gcs.set(existing_blob_name, 'abc', bucket=bucket,
project=project, overwrite=True)This failed on |