-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
PROPOSAL: Storage API consistency fix #632
Comments
Closing #545 and focusing on this+sub-bugs sounds good to me; this captures the concerns I had there. |
Thanks! |
Aside: I made a list of all the 34 API methods and the corresponding code paths. |
@tseaver I'd like to get moving on this soon. WDYT of the proposals? |
@dhermes I'm in "quick hit" mode today, but can review in more depth tomorrow. |
I'm in Portland mostly AFK, so next few days is fine. |
@tseaver Can we move forward on this? |
I'm not sure debate here is the right thing: this is a large set of changes, and I'm not sure what the goals are: we should be talking about them, first, before we try to plan out an implementation. |
The goal is really just making the API more usable. The current behavior of "sync" whenever a property is added outside a batch shouldn't be the default behavior (see #545). Most of the changes above relate to making network interaction occur more transparently. |
This decouples Bucket.exists() from Connection.get_bucket(). Relevant to googleapis#632.
Hi. Is there any progress on the part that says Having to use
These are currently blocking me from using gcloud-python. User @pdknsk seems to have provided a patch in #536. I think it would make sense implementing that even before/without having the " I'd be happy to provide a pull request if that helps. |
* docs: Fix formatting of request arg in docstring chore: Update gapic-generator-python to v1.9.1 PiperOrigin-RevId: 518604533 Source-Link: googleapis/googleapis@8a085ae Source-Link: googleapis/googleapis-gen@b2ab4b0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjJhYjRiMGEwYWUyOTA3ZTgxMmMyMDkxOThhNzRlMDg5OGFmY2IwNCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Guiding principles:
but only when it involves instance creation / other local (non-network bound) behavior. For example, in
Bucket.acl
this already happens:Blob
,Bucket
, and*ACL
(the only nouns) instances should haveload()
,exists()
,create()
,delete()
, andupdate()
methods. This design gives rise to code like(this maybe screams for
get_or_create()
, we'll feel it out as we develop). It's unclear if it's worth making a distinction betweenstorage.NOUN.update <--> PUT
andstorage.NOUN.patch <--> PATCH
. (As of right now, we don't implementPUT
/update
anywhere.)exists()
should usefields
in the requests to minimize the payload.Connection
should not be required to be bound to any object (one of the nounsBucket
,ACL
, orBlob
) but should be an optional argument to methods which actually talk to the API.last_updated
field to classes to indicate the last time the values were updated (from the server).and then
bucket.get_all_objects()
. It's unclear how the other 3 nouns (objectAccessControls
,bucketAccessControls
anddefaultObjectAccessControls
) will handle this. Right now they are handled viaObjectACL.reload()
andBucketACL.reload()
(a superclass ofDefaultObjectACL
).@tseaver Please weigh in. This was inspired by our discussion at the end of #604.
/cc @thobrla I'd like to close #545 and focus on this (possibly broken down into sub-bugs). Does that sound OK?
The text was updated successfully, but these errors were encountered: