FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

docs: Add preconditions to some samples by JesseLovelace · Pull Request #1600 · googleapis/java-storage · GitHub

docs: Add preconditions to some samples - #1600

Merged
JesseLovelace merged 7 commits into
mainfrom
jesseprecon
Sep 23, 2022
Merged

docs: Add preconditions to some samples#1600
JesseLovelace merged 7 commits into
mainfrom
jesseprecon

Conversation

Copy link
Copy Markdown
Contributor

Adds preconditions to some Java samples. This is half the samples that need to be added, @sydney-munro is going to do the other half

JesseLovelace requested a review from frankyn August 31, 2022 01:13
product-auto-label Bot added size: m Pull request size is medium. api: storage Issues related to the googleapis/java-storage API. samples Issues that are directly related to samples. labels Aug 31, 2022
gcf-owl-bot Bot requested review from a team August 31, 2022 01:16

Shabirmean left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM Overall.

Some minor formatting related comments. Also PTAL at the failing tests

// conditions and data corruptions. The request to upload returns a 412 error if
// the object's generation number does not match your precondition.
Storage.BlobSourceOption precondition =
Storage.BlobSourceOption.generationMatch(storage.get(blobId).getGeneration());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This could 404 and return null if there isn't an object for blobId. Possibly move it to it's own line to ease debugging?

// conditions and data corruptions. The request to upload returns a 412 error if
// the object's generation number does not match your precondition.
Storage.BlobSourceOption precondition =
Storage.BlobSourceOption.generationMatch(storage.get(blobId).getGeneration());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

ditto

// the object's generation number does not match your precondition.
Storage.BlobSourceOption precondition =
Storage.BlobSourceOption.generationMatch(
storage.get(bucketName, objectName).getGeneration());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

ditto

// conditions and data corruptions. The request to upload returns a 412 error if
// the object's generation number does not match your precondition.
Storage.BlobSourceOption precondition =
Storage.BlobSourceOption.generationMatch(storage.get(blobId).getGeneration());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

ditto

BenWhitehead left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks for adding the null checks!

JesseLovelace added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 12, 2022
yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 12, 2022
JesseLovelace merged commit 4b3be44 into main Sep 23, 2022
JesseLovelace deleted the jesseprecon branch September 23, 2022 18:15
gcf-merge-on-green Bot pushed a commit that referenced this pull request Oct 4, 2022
🤖 I have created a release *beep* *boop*
---


## [2.13.0](https://togithub.com/googleapis/java-storage/compare/v2.12.0...v2.13.0) (2022-10-03)


### Features

* Regenerate gapic storage v2 client as of googleapis/googleapis@844d0f7 ([#1673](https://togithub.com/googleapis/java-storage/issues/1673)) ([bd818b3](https://togithub.com/googleapis/java-storage/commit/bd818b311186c37ceb527630ed56755d89e2b71b))


### Documentation

* Add preconditions to some samples ([#1600](https://togithub.com/googleapis/java-storage/issues/1600)) ([4b3be44](https://togithub.com/googleapis/java-storage/commit/4b3be44bd4c53613f08bbd01d3b4a9ded419565d))


### Dependencies

* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#1685](https://togithub.com/googleapis/java-storage/issues/1685)) ([3d8f550](https://togithub.com/googleapis/java-storage/commit/3d8f550e4d646a7d4bda6f9e74bc5996d573d5b4))
* Update dependency gcp-releasetool to v1.8.9 ([#1684](https://togithub.com/googleapis/java-storage/issues/1684)) ([54a5159](https://togithub.com/googleapis/java-storage/commit/54a5159707efd6a2d4abd0273ab7c279f507005b))
* Update dependency importlib-metadata to v4.13.0 ([#1682](https://togithub.com/googleapis/java-storage/issues/1682)) ([2487aff](https://togithub.com/googleapis/java-storage/commit/2487affad5a1adf1c39589d8f8a976c7f245b0c9))
* Update dependency importlib-metadata to v5 ([#1683](https://togithub.com/googleapis/java-storage/issues/1683)) ([020fe8c](https://togithub.com/googleapis/java-storage/commit/020fe8ce7991e8c72135a2912f615ed50cc68fd4))
* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.14 ([#1643](https://togithub.com/googleapis/java-storage/issues/1643)) ([ab3a198](https://togithub.com/googleapis/java-storage/commit/ab3a198115ae637710982f838231d2d36c029486))
* Update dependency org.junit.vintage:junit-vintage-engine to v5.9.1 ([#1635](https://togithub.com/googleapis/java-storage/issues/1635)) ([ba85ab6](https://togithub.com/googleapis/java-storage/commit/ba85ab6ce9304b4c426538d2bacc99ef73ed2b0e))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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. samples Issues that are directly related to samples. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL