Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/java-storage
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.1.7
Choose a base ref
...
head repository: googleapis/java-storage
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.1.8
Choose a head ref

Commits on Oct 4, 2021

  1. chore: release 2.1.8-SNAPSHOT (#1063)

    🤖 I have created a release \*beep\* \*boop\*
    ---
    ### Updating meta-information for bleeding-edge SNAPSHOT release.
    ---
    
    
    This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
    release-please[bot] authored Oct 4, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d0a146d View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d46f00b View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f0033eb View commit details

Commits on Oct 5, 2021

  1. fix: address errors raised rewites(mapping 58) (#1066)

    Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
    - [x] Ensure the tests and linter pass
    - [x] Code coverage does not decrease (if any source code was changed)
    
    
    Fixes #1067☕️
    frankyn authored Oct 5, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2ef5ec0 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9111d35 View commit details
  3. test(retry): decouple querying retry_test state from test success (#1072

    )
    
    when debugging a failing test, the retry_test state will now be queried allowing for its presence to show in request logs to aid debugging.
    BenWhitehead authored Oct 5, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6e450e3 View commit details

Commits on Oct 6, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3f7ed5f View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    822da41 View commit details
  3. test(retry): configure project id in TestRetryConformance along with …

    …other parameters (#1080)
    
    Add new `projectId` field to TestRetryConformance to manage and provide project id literal value that can be used everywhere.
    BenWhitehead authored Oct 6, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b196d0c View commit details
  4. test(retry): update storage.*.delete mappings (#1082)

    Delete operations against StorageRpc return a boolean rather than throwing an exception for certain scenarios (404). Update mappings to assert that the returned boolean is true.
    
    Fixes #1081
    BenWhitehead authored Oct 6, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    df2251a View commit details

Commits on Oct 7, 2021

  1. test(retry): fix 48 and 114 (#1084)

    com.google.cloud.storage.Storage.create(com.google.cloud.storage.BlobInfo, java.io.InputStream, com.google.cloud.storage.Storage.BlobWriteOption...) is never safe to retry as it does not wrap the inputstream provided to allow it to be safely read multiple times
    
    Fixes #1083
    BenWhitehead authored Oct 7, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2c4e6c1 View commit details
  2. deps: update kms.version to v0.93.1 (#1079)

    [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
    
    This PR contains the following updates:
    
    | Package | Change | Age | Adoption | Passing | Confidence |
    |---|---|---|---|---|---|
    | [com.google.api.grpc:proto-google-cloud-kms-v1](https://togithub.com/googleapis/java-kms) | `0.93.0` -> `0.93.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-cloud-kms-v1/0.93.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-cloud-kms-v1/0.93.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-cloud-kms-v1/0.93.1/compatibility-slim/0.93.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-cloud-kms-v1/0.93.1/confidence-slim/0.93.0)](https://docs.renovatebot.com/merge-confidence/) |
    | [com.google.api.grpc:grpc-google-cloud-kms-v1](https://togithub.com/googleapis/java-kms) | `0.93.0` -> `0.93.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:grpc-google-cloud-kms-v1/0.93.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:grpc-google-cloud-kms-v1/0.93.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:grpc-google-cloud-kms-v1/0.93.1/compatibility-slim/0.93.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:grpc-google-cloud-kms-v1/0.93.1/confidence-slim/0.93.0)](https://docs.renovatebot.com/merge-confidence/) |
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: At any time (no schedule defined).
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
    
    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
    
    🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.
    
    ---
    
     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.
    
    ---
    
    This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-storage).
    renovate-bot authored Oct 7, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1c52b3d View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8788a62 View commit details
  4. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ebece5a View commit details
  5. test(retry): fix mapping 78 (#1090)

    * move creation of object from withTest to withSetup to ensure it doesn't consume the instructions for the test
    * update RetryTestFixture to set max attempts to 3 to match what our conformance tests expect
    * update Exception Handler Interceptor to handle HttpResponseExceptions related to resumable media operations
    
    Fixes #1089
    BenWhitehead authored Oct 7, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4e30e18 View commit details

Commits on Oct 8, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    477024e View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    238d8af View commit details
  3. test(retry): fix incorrect precondition option mapping 119 (#1097)

    The precondition to assert the absence of an object is IfGenerationMatch=0 not IfGenerationMatch=1
    
    Fixes #1096
    BenWhitehead authored Oct 8, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3ee3bb8 View commit details
  4. test(deps): update dependency org.mockito:mockito-core to v4 (#1086)

    * test(deps): update dependency org.mockito:mockito-core to v4
    
    * Fix dependency problem
    
    Co-authored-by: Chanseok Oh <chanseok@google.com>
    renovate-bot and chanseokoh authored Oct 8, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1c233a9 View commit details

Commits on Oct 11, 2021

  1. chore(retry): cleanup RpcMethodMappings and associated setup (#1098)

    * Cleanup left over todo's that have been addressed
    * Ensure all setup operations are taking place during setup and not in the test
    * Update CtxFunctions to narrow scope of package public functions
    * Update object setup to also set BlobInfo and BlobId
    BenWhitehead authored Oct 11, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    04d9a8c View commit details
  2. test(retry): update temp file cleanup code (#1099)

    Update temp file cleanup code to ensure everything is cleaned up in the proper scope and order.
    BenWhitehead authored Oct 11, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bf9dccc View commit details

Commits on Oct 12, 2021

  1. test(retry): refactor things to ensure teardown is run per test (#1100)

    * Refactor teardown function to be tolerant of multiple objects being created during a test (copy, rewrite etc.), and bucket and hmac key existence.
    * Fix RpcMethodMapping.Builder not correctly carrying though a specified tearDown operation
    * Update mapping 26 (storage.hmacKey.delete) not fully clearing the state it was modifying
    
    Related to #1095 (I don't think cleanup is the sole reason for test failures, but this does seem to alleviate the failures for several of the seeds.)
    BenWhitehead authored Oct 12, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    17d884b View commit details
  2. test(retry): pin version of testbench image to v0.8.0 (#1102)

    * update testNamesWhichShouldSucceed.txt to match fixes from testbench:v0.8.0
    BenWhitehead authored Oct 12, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0cd4ec0 View commit details
  3. test(retry): invert GracefulConformanceEnforcement to be allow list (#…

    …1103)
    
    Now that the retry conformance test suite is mostly passing we want to assume passing and allow for the occasional failure rather than expecting failure and disallowing selective failures.
    BenWhitehead authored Oct 12, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7c3640c View commit details

Commits on Oct 13, 2021

  1. build(deps): update dependency com.google.cloud:google-cloud-shared-c…

    …onfig to v1.1.0 (#1104)
    
    [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
    
    This PR contains the following updates:
    
    | Package | Change | Age | Adoption | Passing | Confidence |
    |---|---|---|---|---|---|
    | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.0.3` -> `1.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.1.0/compatibility-slim/1.0.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.1.0/confidence-slim/1.0.3)](https://docs.renovatebot.com/merge-confidence/) |
    
    ---
    
    ### Release Notes
    
    <details>
    <summary>googleapis/java-shared-config</summary>
    
    ### [`v1.1.0`](https://togithub.com/googleapis/java-shared-config/blob/master/CHANGELOG.md#&#8203;110-httpswwwgithubcomgoogleapisjava-shared-configcomparev103v110-2021-10-12)
    
    [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.0.3...v1.1.0)
    
    ##### Features
    
    -   introduce Maven configuration for GraalVM testing ([#&#8203;314](https://www.togithub.com/googleapis/java-shared-config/issues/314)) ([28fbeb8](https://www.github.com/googleapis/java-shared-config/commit/28fbeb86c4466a58a05d6933584564dbf3352e79))
    
    ##### Bug Fixes
    
    -   update doclet version ([#&#8203;332](https://www.togithub.com/googleapis/java-shared-config/issues/332)) ([3fd0350](https://www.github.com/googleapis/java-shared-config/commit/3fd035030e4f0954dd1f62f7b8ea62583685880c))
    
    ##### Dependencies
    
    -   update dependency com.puppycrawl.tools:checkstyle to v9.0.1 ([#&#8203;327](https://www.togithub.com/googleapis/java-shared-config/issues/327)) ([b6c9b65](https://www.github.com/googleapis/java-shared-config/commit/b6c9b657550db2dee6b36edbb9a6084baee125e2))
    -   update dependency org.graalvm.buildtools:junit-platform-native to v0.9.6 ([#&#8203;330](https://www.togithub.com/googleapis/java-shared-config/issues/330)) ([271ed7d](https://www.github.com/googleapis/java-shared-config/commit/271ed7dba35623e22fc8a7f7d477e6043e772014))
    -   update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.6 ([#&#8203;331](https://www.togithub.com/googleapis/java-shared-config/issues/331)) ([4f9ba15](https://www.github.com/googleapis/java-shared-config/commit/4f9ba1551df0a2d4fc8c9acca8a951afbe8cb78a))
    -   update dependency org.junit.vintage:junit-vintage-engine to v5.8.1 ([#&#8203;329](https://www.togithub.com/googleapis/java-shared-config/issues/329)) ([4a8789e](https://www.github.com/googleapis/java-shared-config/commit/4a8789ee814ba8a3480beecc76c16fd1cb4e5f12))
    
    ##### [1.0.3](https://www.github.com/googleapis/java-shared-config/compare/v1.0.2...v1.0.3) (2021-09-21)
    
    ##### Bug Fixes
    
    -   update java-docfx-doclet version ([#&#8203;315](https://www.togithub.com/googleapis/java-shared-config/issues/315)) ([07af07c](https://www.github.com/googleapis/java-shared-config/commit/07af07c188447ea5728ecd2700121ff477d1c58a))
    
    ##### [1.0.2](https://www.github.com/googleapis/java-shared-config/compare/v1.0.1...v1.0.2) (2021-09-13)
    
    ##### Bug Fixes
    
    -   specify animal-sniffer-maven-plugin version ([#&#8203;308](https://www.togithub.com/googleapis/java-shared-config/issues/308)) ([378bf43](https://www.github.com/googleapis/java-shared-config/commit/378bf431383306c1cdd0a4f922956c87edf321b5))
    -   update java docfx doclet version ([#&#8203;312](https://www.togithub.com/googleapis/java-shared-config/issues/312)) ([dd7f6e0](https://www.github.com/googleapis/java-shared-config/commit/dd7f6e0c1a7cc73831b74b4475457611a8c097d3))
    
    ##### Dependencies
    
    -   update dependency com.puppycrawl.tools:checkstyle to v9 ([#&#8203;303](https://www.togithub.com/googleapis/java-shared-config/issues/303)) ([71faea3](https://www.github.com/googleapis/java-shared-config/commit/71faea38d4132407598550e2bb4c77f9d4a4d83d))
    
    ##### [1.0.1](https://www.github.com/googleapis/java-shared-config/compare/v1.0.0...v1.0.1) (2021-08-18)
    
    ##### Dependencies
    
    -   update dependency com.puppycrawl.tools:checkstyle to v8.45.1 ([#&#8203;292](https://www.togithub.com/googleapis/java-shared-config/issues/292)) ([66bf6e6](https://www.github.com/googleapis/java-shared-config/commit/66bf6e6fb95997b9eb4b34268b8d20c2fbe9ed5a))
    
    </details>
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: At any time (no schedule defined).
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
    
    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
    
    🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
    
    ---
    
     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.
    
    ---
    
    This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-storage).
    renovate-bot authored Oct 13, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    cdb86dc View commit details

Commits on Oct 15, 2021

  1. test(retry): add validation to ensure at least one test case is resol…

    …ved (#1109)
    
    * If an overly specific allowed filter can prevent any test cases from being passed to the runner, add validation to ensure there is at least one test case.
    BenWhitehead authored Oct 15, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ada8d94 View commit details

Commits on Oct 18, 2021

  1. fix: regenerate google.cloud.storage.v2 protos

    * fix!: rename committed_size to persisted_size
    * fix!: replace string key_sha256 with bytes key_sha256_bytes
    * fix: deprecate zone_affinity field
    * fix: add INHERITED to PublicAccessPrevention enum
    
    PiperOrigin-RevId: 402986756
    
    Source-Author: Google APIs <noreply@google.com>
    Source-Date: Wed Oct 13 20:18:42 2021 -0700
    Source-Repo: googleapis/googleapis
    Source-Sha: 877d3d9d02591ad612a2c8654b42c37ba09ff9ec
    Source-Link: googleapis/googleapis@877d3d9
    
    * chore: add clirr rules to allow field renaming in alpha protos
    
    Co-authored-by: BenWhitehead <BenWhitehead@users.noreply.github.com>
    yoshi-automation and BenWhitehead authored Oct 18, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a7e3b94 View commit details
  2. chore: release 2.1.8 (#1068)

    * chore: release 2.1.8
    
    * chore: fix changelog
    
    Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
    Co-authored-by: BenWhitehead <BenWhitehead@users.noreply.github.com>
    release-please[bot] and BenWhitehead authored Oct 18, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    88c03a2 View commit details
Showing with 1,467 additions and 1,899 deletions.
  1. +1 −1 .repo-metadata.json
  2. +12 −0 CHANGELOG.md
  3. +2 −2 gapic-google-cloud-storage-v2/pom.xml
  4. +7 −7 gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java
  5. +3 −3 google-cloud-storage/pom.xml
  6. +17 −15 google-cloud-storage/src/main/java/com/google/cloud/storage/NewRetryAlgorithmManager.java
  7. +107 −42 google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/CtxFunctions.java
  8. +0 −9 google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/Functions.java
  9. +10 −11 ...rage/src/test/java/com/google/cloud/storage/conformance/retry/GracefulConformanceEnforcement.java
  10. +47 −21 ...loud-storage/src/test/java/com/google/cloud/storage/conformance/retry/ITRetryConformanceTest.java
  11. +19 −14 google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/RetryTestFixture.java
  12. +9 −2 google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/RpcMethodMapping.java
  13. +762 −810 google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/RpcMethodMappings.java
  14. +0 −6 google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/State.java
  15. +8 −5 google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/TestBench.java
  16. +9 −1 ...-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/TestRetryConformance.java
  17. +16 −0 ...d-storage/src/test/resources/com/google/cloud/storage/conformance/retry/testNamesWhichCanFail.txt
  18. +0 −561 ...age/src/test/resources/com/google/cloud/storage/conformance/retry/testNamesWhichShouldSucceed.txt
  19. +2 −2 grpc-google-cloud-storage-v2/pom.xml
  20. +10 −10 grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java
  21. +13 −6 pom.xml
  22. +56 −0 proto-google-cloud-storage-v2/clirr-ignored-differences.xml
  23. +2 −2 proto-google-cloud-storage-v2/pom.xml
  24. +78 −19 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Bucket.java
  25. +16 −4 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketOrBuilder.java
  26. +38 −130 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Object.java
  27. +25 −25 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/QueryWriteStatusResponse.java
  28. +6 −6 ...oogle-cloud-storage-v2/src/main/java/com/google/storage/v2/QueryWriteStatusResponseOrBuilder.java
  29. +130 −129 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageProto.java
  30. +4 −4 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectRequest.java
  31. +1 −1 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectRequestOrBuilder.java
  32. +25 −25 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectResponse.java
  33. +6 −6 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectResponseOrBuilder.java
  34. +17 −11 proto-google-cloud-storage-v2/src/main/proto/google/storage/v2/storage.proto
  35. +1 −1 samples/install-without-bom/pom.xml
  36. +1 −1 samples/snapshot/pom.xml
  37. +3 −3 synth.metadata
  38. +4 −4 versions.txt
2 changes: 1 addition & 1 deletion .repo-metadata.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"name": "storage",
"name_pretty": "Cloud Storage",
"product_documentation": "https://cloud.google.com/storage",
"client_documentation": "https://googleapis.dev/java/google-cloud-storage/latest/index.html",
"client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-storage/latest/history",
"api_description": "is a durable and highly available object storage service. Google Cloud Storage is almost infinitely scalable and guarantees consistency: when a write succeeds, the latest copy of the object will be returned to any GET, globally.",
"issue_tracker": "https://issuetracker.google.com/savedsearches/559782",
"release_level": "ga",
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

### [2.1.8](https://www.github.com/googleapis/java-storage/compare/v2.1.7...v2.1.8) (2021-10-18)


### Bug Fixes

* regenerate google.cloud.storage.v2 protos ([a7e3b94](https://www.github.com/googleapis/java-storage/commit/a7e3b94e4a3e03599b0dbe51fbe574ed4ea1a0d8))


### Dependencies

* update kms.version to v0.93.1 ([#1079](https://www.github.com/googleapis/java-storage/issues/1079)) ([1c52b3d](https://www.github.com/googleapis/java-storage/commit/1c52b3db6699c2ad325853e95231e1a908da069f))

### [2.1.7](https://www.github.com/googleapis/java-storage/compare/v2.1.6...v2.1.7) (2021-10-04)


4 changes: 2 additions & 2 deletions gapic-google-cloud-storage-v2/pom.xml
Original file line number Diff line number Diff line change
@@ -4,13 +4,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<artifactId>gapic-google-cloud-storage-v2</artifactId>
<version>2.1.7-alpha</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
<version>2.1.8-alpha</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
<name>gapic-google-cloud-storage-v2</name>
<description>GRPC library for gapic-google-cloud-storage-v2</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.1.7</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.1.8</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>
<dependencies>
<dependency>
Original file line number Diff line number Diff line change
@@ -190,7 +190,7 @@ public final ServerStreamingCallable<ReadObjectRequest, ReadObjectResponse> read
* that method an `WriteObjectSpec.` They should then attach the returned `upload_id` to the first
* message of each following call to `Create`. If there is an error or the connection is broken
* during the resumable `Create()`, the client should check the status of the `Create()` by
* calling `QueryWriteStatus()` and continue writing from the returned `committed_size`. This may
* calling `QueryWriteStatus()` and continue writing from the returned `persisted_size`. This may
* be less than the amount of data the client previously sent.
*
* <p>The service will not view the object as complete until the client has sent a
@@ -294,7 +294,7 @@ public final StartResumableWriteResponse startResumableWrite(StartResumableWrite

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Determines the `committed_size` for an object that is being written, which can then be used as
* Determines the `persisted_size` for an object that is being written, which can then be used as
* the `write_offset` for the next `Write()` call.
*
* <p>If the object does not exist (i.e., the object has been deleted, or the first `Write()` has
@@ -303,7 +303,7 @@ public final StartResumableWriteResponse startResumableWrite(StartResumableWrite
* <p>The client &#42;&#42;may&#42;&#42; call `QueryWriteStatus()` at any time to determine how
* much data has been processed for this object. This is useful if the client is buffering data
* and needs to know which data can be safely evicted. For any sequence of `QueryWriteStatus()`
* calls for a given object name, the sequence of returned `committed_size` values will be
* calls for a given object name, the sequence of returned `persisted_size` values will be
* non-decreasing.
*
* <p>Sample code:
@@ -327,7 +327,7 @@ public final QueryWriteStatusResponse queryWriteStatus(String uploadId) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Determines the `committed_size` for an object that is being written, which can then be used as
* Determines the `persisted_size` for an object that is being written, which can then be used as
* the `write_offset` for the next `Write()` call.
*
* <p>If the object does not exist (i.e., the object has been deleted, or the first `Write()` has
@@ -336,7 +336,7 @@ public final QueryWriteStatusResponse queryWriteStatus(String uploadId) {
* <p>The client &#42;&#42;may&#42;&#42; call `QueryWriteStatus()` at any time to determine how
* much data has been processed for this object. This is useful if the client is buffering data
* and needs to know which data can be safely evicted. For any sequence of `QueryWriteStatus()`
* calls for a given object name, the sequence of returned `committed_size` values will be
* calls for a given object name, the sequence of returned `persisted_size` values will be
* non-decreasing.
*
* <p>Sample code:
@@ -362,7 +362,7 @@ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest r

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Determines the `committed_size` for an object that is being written, which can then be used as
* Determines the `persisted_size` for an object that is being written, which can then be used as
* the `write_offset` for the next `Write()` call.
*
* <p>If the object does not exist (i.e., the object has been deleted, or the first `Write()` has
@@ -371,7 +371,7 @@ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest r
* <p>The client &#42;&#42;may&#42;&#42; call `QueryWriteStatus()` at any time to determine how
* much data has been processed for this object. This is useful if the client is buffering data
* and needs to know which data can be safely evicted. For any sequence of `QueryWriteStatus()`
* calls for a given object name, the sequence of returned `committed_size` values will be
* calls for a given object name, the sequence of returned `persisted_size` values will be
* non-decreasing.
*
* <p>Sample code:
6 changes: 3 additions & 3 deletions google-cloud-storage/pom.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>google-cloud-storage</artifactId>
<version>2.1.7</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.1.8</version><!-- {x-version-update:google-cloud-storage:current} -->
<packaging>jar</packaging>
<name>Google Cloud Storage</name>
<url>https://github.com/googleapis/java-storage</url>
@@ -12,11 +12,11 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.1.7</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.1.8</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>
<properties>
<site.installationModule>google-cloud-storage</site.installationModule>
<kms.version>0.93.0</kms.version>
<kms.version>0.93.1</kms.version>
</properties>
<dependencies>
<dependency>
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@
package com.google.cloud.storage;

import com.google.api.client.googleapis.json.GoogleJsonResponseException;
import com.google.api.client.http.HttpResponseException;
import com.google.api.services.storage.model.Bucket;
import com.google.api.services.storage.model.BucketAccessControl;
import com.google.api.services.storage.model.HmacKeyMetadata;
@@ -129,9 +130,8 @@ public ExceptionHandler getForBucketsList(Map<StorageRpc.Option, ?> optionsMap)
@Override
public ExceptionHandler getForBucketsLockRetentionPolicy(
Bucket pb, Map<StorageRpc.Option, ?> optionsMap) {
return optionsMap.containsKey(StorageRpc.Option.IF_METAGENERATION_MATCH)
? IDEMPOTENT_HANDLER
: NON_IDEMPOTENT_HANDLER;
// Always idempotent because IfMetagenerationMatch is required
return IDEMPOTENT_HANDLER;
}

@Override
@@ -143,10 +143,7 @@ public ExceptionHandler getForBucketsGetIamPolicy(
@Override
public ExceptionHandler getForBucketsSetIamPolicy(
String bucket, Policy pb, Map<StorageRpc.Option, ?> optionsMap) {
// TODO: Include etag when it is supported by the library
return optionsMap.containsKey(StorageRpc.Option.IF_METAGENERATION_MATCH)
? IDEMPOTENT_HANDLER
: NON_IDEMPOTENT_HANDLER;
return pb.getEtag() != null ? IDEMPOTENT_HANDLER : NON_IDEMPOTENT_HANDLER;
}

@Override
@@ -274,9 +271,7 @@ public ExceptionHandler getForObjectsList(String bucket, Map<StorageRpc.Option,

@Override
public ExceptionHandler getForObjectsRewrite(RewriteRequest pb) {
return (pb.sourceOptions.containsKey(StorageRpc.Option.IF_SOURCE_GENERATION_MATCH)
|| pb.sourceOptions.containsKey(StorageRpc.Option.IF_GENERATION_MATCH))
&& pb.targetOptions.containsKey(StorageRpc.Option.IF_GENERATION_MATCH)
return pb.targetOptions.containsKey(StorageRpc.Option.IF_GENERATION_MATCH)
? IDEMPOTENT_HANDLER
: NON_IDEMPOTENT_HANDLER;
}
@@ -334,6 +329,9 @@ public RetryResult beforeEval(Exception exception) {
//noinspection StatementWithEmptyBody
if (cause instanceof GoogleJsonResponseException) {
// this is handled by the case for BaseServiceException below
} else if (cause instanceof HttpResponseException) {
int code = ((HttpResponseException) cause).getStatusCode();
return shouldRetryCode(code);
} else if (cause instanceof IOException) {
IOException ioException = (IOException) cause;
return BaseServiceException.isRetryable(idempotent, ioException)
@@ -344,13 +342,17 @@ public RetryResult beforeEval(Exception exception) {

if (exception instanceof BaseServiceException) {
int code = ((BaseServiceException) exception).getCode();
if (retryableCodes.contains(code)) {
return RetryResult.RETRY;
} else {
return RetryResult.NO_RETRY;
}
return shouldRetryCode(code);
}
return RetryResult.CONTINUE_EVALUATION;
}

private RetryResult shouldRetryCode(int code) {
if (retryableCodes.contains(code)) {
return RetryResult.RETRY;
} else {
return RetryResult.NO_RETRY;
}
}
}
}
Loading