Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(1.113.14-sp): backport critical bug fixes #993

Merged
merged 5 commits into from Sep 28, 2021
Merged

fix(1.113.14-sp): backport critical bug fixes #993

merged 5 commits into from Sep 28, 2021

Conversation

JesseLovelace and others added 4 commits September 1, 2021 14:45
* Remove client side vaildation for lifecycle conditions

* fix lint and suggest updating

(cherry picked from commit 5ec84cc)
… state (#846)

Add new checks to ensure a more informative error than NullPointerException is thrown if the StorageObject or it's size are unable to be resolved on the last chunk.

Fixes #839

(cherry picked from commit d0f2184)
Add new method StorageRpc#queryResumableUpload which allows getting a shallow StorageObject for a resumable upload session which is complete.

Update BlobWriteChannel to use StoageRpc#queryResumableUpload instead of StorageRpc#get when attempting to validate the upload size of an object when it determines the upload is complete and is on the last chunk.

If a BlobWriteChannel is opened with a conditional like IfGenerationMatch it is not possible to simply get the object, as the object can drift generationally while the resumable upload is being performed.

Related to #839

(cherry picked from commit ab0228c)
@BenWhitehead BenWhitehead requested a review from a team September 1, 2021 18:56
@BenWhitehead BenWhitehead requested a review from a team as a code owner September 1, 2021 18:56
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/java-storage API. label Sep 1, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 1, 2021
@codecov
Copy link

codecov bot commented Sep 1, 2021

Codecov Report

Merging #993 (42e1f6e) into 1.113.14-sp (8614975) will decrease coverage by 0.12%.
The diff coverage is 48.27%.

Impacted file tree graph

@@                Coverage Diff                @@
##             1.113.14-sp     #993      +/-   ##
=================================================
- Coverage          64.61%   64.48%   -0.13%     
+ Complexity           634      633       -1     
=================================================
  Files                 32       32              
  Lines               5313     5336      +23     
  Branches             519      527       +8     
=================================================
+ Hits                3433     3441       +8     
- Misses              1718     1730      +12     
- Partials             162      165       +3     
Impacted Files Coverage Δ
...om/google/cloud/storage/spi/v1/HttpStorageRpc.java 1.55% <0.00%> (-0.01%) ⬇️
...va/com/google/cloud/storage/spi/v1/StorageRpc.java 66.23% <ø> (ø)
...ogle/cloud/storage/testing/StorageRpcTestBase.java 92.30% <0.00%> (-1.81%) ⬇️
...ava/com/google/cloud/storage/BlobWriteChannel.java 75.00% <55.00%> (-5.20%) ⬇️
...main/java/com/google/cloud/storage/BucketInfo.java 83.96% <85.00%> (-0.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8614975...42e1f6e. Read the comment docs.

It looks like the text for this error on the backend has changed
(sometimes) from "Precondition Failed" to "At least one of the
pre-conditions you specified did not hold". I don't think it's
really necessary to check the exact message in any case given
that we do check for a code of 412, which implies a precondition
failure. I added a check of the error Reason instead,  which is more
standardized.

Fixes #853

(cherry picked from commit 146a3d3)
@BenWhitehead BenWhitehead changed the title fix: backport critical bug fixes fix: backport critical bug fixes for 1.113.14-sp Sep 1, 2021
@BenWhitehead BenWhitehead changed the title fix: backport critical bug fixes for 1.113.14-sp fix(1.113.14-sp): backport critical bug fixes Sep 1, 2021
@BenWhitehead BenWhitehead added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Sep 2, 2021
@BenWhitehead BenWhitehead removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Sep 28, 2021
@BenWhitehead BenWhitehead merged commit 447d35d into googleapis:1.113.14-sp Sep 28, 2021
@BenWhitehead BenWhitehead deleted the backports branch September 28, 2021 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/java-storage API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants