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

Should we make Project a real thing in gcloud? Particular for gcloud.storage? #613

Closed
jgeewax opened this issue Feb 10, 2015 · 4 comments
Closed
Assignees
Labels
api: core auth type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. type: question Request for information or clarification. Not an issue.

Comments

@jgeewax
Copy link
Contributor

jgeewax commented Feb 10, 2015

Our discussions in the past have said that we want Connection to remain stateless and really just handle sending data over the wire as well as authentication.

However, if you think about it, now that we're planning to push the "transformation" (from Python objects -> JSON) down to Buckets, Blobs, and ACLs, the connection object isn't really just doing transport, it's also representing a connection to a specific project.

Do you guys think it's worthwhile to make "project" a first-class citizen so that it makes more sense to do things like project.get_all_buckets() ?

This leads to a question of "what is the relationship with connections and projects? We could have a one-to-one between them (where what you really do is instantiate a project and under the hood it instantiates a connection which handles auth, etc). Or we could have a singleton connection that all the projects use with their own set of credentials...?

I am +0 on doing this kind of thing, and only just thought of it now given we need a "clean" place to put get_all_buckets() -- so feel free to close out as "stfu, that's dumb".

/cc @dhermes

@jgeewax jgeewax added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. type: question Request for information or clarification. Not an issue. api: core auth labels Feb 10, 2015
@jgeewax jgeewax added this to the Core Future milestone Feb 10, 2015
@tseaver
Copy link
Contributor

tseaver commented Feb 11, 2015

The only bit of storage.Connection that relies directly on self.project is build_api_url, but that method is the core of everything else the connection does. I can't see us usefully breaking out a Project object: I don't think there would be anything left of 'Connection'.

@jgeewax
Copy link
Contributor Author

jgeewax commented Feb 11, 2015

OK - so what I'm hearing is: there really isn't a need. Is that right?

@dhermes
Copy link
Contributor

dhermes commented Feb 11, 2015

Ditto what @tseaver says

@tseaver
Copy link
Contributor

tseaver commented Feb 11, 2015

Sounds like consensus to me.

@tseaver tseaver closed this as completed Feb 11, 2015
vchudnov-g pushed a commit that referenced this issue Sep 20, 2023
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: core auth type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

3 participants