Title: Change Blob to eagerly get a BlobInfo if constructed with only id. · Issue #253 · googleapis/google-cloud-java · GitHub
Open Graph Title: Change Blob to eagerly get a BlobInfo if constructed with only id. · Issue #253 · googleapis/google-cloud-java
X Title: Change Blob to eagerly get a BlobInfo if constructed with only id. · Issue #253 · googleapis/google-cloud-java
Description: I wonder if in the cases where BlobInfo is not provided to Blob we should actually get it from the service, and use empty if not exists (and document that). My reason is, considering the following Blob operations: info, exists, content, ...
Open Graph Description: I wonder if in the cases where BlobInfo is not provided to Blob we should actually get it from the service, and use empty if not exists (and document that). My reason is, considering the following ...
X Description: I wonder if in the cases where BlobInfo is not provided to Blob we should actually get it from the service, and use empty if not exists (and document that). My reason is, considering the following ...
Opengraph URL: https://github.com/googleapis/google-cloud-java/issues/253
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Change Blob to eagerly get a BlobInfo if constructed with only id.","articleBody":"I wonder if in the cases where `BlobInfo` is not provided to `Blob` we should actually get it from the service, and use empty if not exists (and document that).\n\nMy reason is, considering the following `Blob` operations:\n`info`, `exists`, `content`, `update`, `delete`, `copyTo`, `reader`, `writer` and `signUrl`\n\nIn all cases info matters if options are used (created #252 for `exists` method) and in many cases info matters even without the options (e.g. `info`, `copyTo`).\nAlso, considering our example, I think this will make the API cleaner (and will not require\nthe explicit blob = blob.reload() pattern).\n\nThe reasons I think we don't want to force-get when BlobInfo is provided are:\n- we don't want to double-reload when our API is returning the Blob. I guess we can get around that with a \"special\" constructor...\n- That is the way for a user to force a new Info (e.g. for write).\n\nNow when we clearly separate between blob identity and blob metadata, I think it is not\nthat unexpected that if one supply the metadata we should respect it as is (though documentation should make it clear).\n\nThis issue was discussed in #251 and @mziccard suggested that instead of getting the info in the identity constructors (`BlobId` or bucket \u0026 name) to provide a `Blob.fetch(storage, identity)` methods and only have one constructor that accepts `BlobInfo` (no force loading in that one).\n\nI am in favor of the above suggestion though maybe we should name it `load` to be consistent with the existing `reload`.\n","author":{"url":"https://github.com/aozarov","@type":"Person","name":"aozarov"},"datePublished":"2015-10-13T21:00:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/253/google-cloud-java/issues/253"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:49d70220-7c51-989f-d720-80ca7825cb93 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B400:100AB9:B72D2B:FB9D13:6A4DC3EC |
| html-safe-nonce | a67e954b054b03798bf51b8e4d23260d92b4294a8d2e80621d3d9dab0eec472c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDAwOjEwMEFCOTpCNzJEMkI6RkI5RDEzOjZBNERDM0VDIiwidmlzaXRvcl9pZCI6IjUzNDUzNTY4Nzc3ODg5ODgzOTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 97f8cdc1e6ddc23007077704c0dde5f76568f22e7e21422de418cb6d22e1b5eb |
| hovercard-subject-tag | issue:111269988 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-java/253/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f399493ee777637bf3b48496cfc59d488961e9a04e0b21ccc84173dea43bc881/googleapis/google-cloud-java/issues/253 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f399493ee777637bf3b48496cfc59d488961e9a04e0b21ccc84173dea43bc881/googleapis/google-cloud-java/issues/253 |
| og:image:alt | I wonder if in the cases where BlobInfo is not provided to Blob we should actually get it from the service, and use empty if not exists (and document that). My reason is, considering the following ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aozarov |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-java git https://github.com/googleapis/google-cloud-java.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 26181278 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 26181278 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width