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

Storage: add support for Per-Object Storage Class #2991

Closed
omaray opened this issue Feb 9, 2017 · 9 comments
Closed

Storage: add support for Per-Object Storage Class #2991

omaray opened this issue Feb 9, 2017 · 9 comments
Assignees
Labels
api: storage Issues related to the Cloud Storage API. priority: p0 Highest priority. Critical issue. P0 implies highest priority. release blocking Required feature/issue must be fixed prior to next release.

Comments

@omaray
Copy link
Contributor

omaray commented Feb 9, 2017

We need to add support for Per-Object Storage Class (POSC).

Here some extra information to help:

On top of that, google-cloud-dotnet has made an implementation which can be used as reference.

If you have any implementation questions, please direct them at jskeet

/cc @jskeet @danoscarmike

@omaray omaray added the api: storage Issues related to the Cloud Storage API. label Feb 9, 2017
@lukesneeringer
Copy link
Contributor

@tseaver Is this something you would be able to take on?

@tseaver tseaver added priority: p0 Highest priority. Critical issue. P0 implies highest priority. release blocking Required feature/issue must be fixed prior to next release. labels Feb 22, 2017
@tseaver
Copy link
Contributor

tseaver commented Feb 22, 2017

Wrinkles on the per-object API:

  • The storageClass property can only be "set" during object creation.
  • "Updating" a blob's storage class cannot be done via PATCH: instead, one must perform a rewrite, passing the storageClass property dict in the body.

To handle this properly, we can't just re-use the Bucket.storage_class setter: we should only allow setting the value if the object does not already exist (e.g., has no createdTime). We will need to provide another API-invoking method, update_storage_class, which performs the POST request to the appropriate rewriteTo URL, passing the new property in the body.

@tseaver
Copy link
Contributor

tseaver commented Feb 22, 2017

Because we don't send along blob properties during upload_* operations (#754, #1660), there is no point in adding a storage_class setter at all.

@lukesneeringer
Copy link
Contributor

@tseaver This change is purely additive, correct? I can cut a storage 0.23.1 safely?

@tseaver
Copy link
Contributor

tseaver commented Mar 3, 2017

@lukesneeringer Sorry for the lag: yes, it is purely additive.

@lukesneeringer
Copy link
Contributor

@tseaver No worries, and thanks. I will probably cut minor updates to things on Monday morning.

@tseaver
Copy link
Contributor

tseaver commented Mar 3, 2017

@lukesneeringer It occurs to me that calling the release 0.23.1 is actually a semver violation: it isn't a bugfix, but a feature addition.

@lukesneeringer
Copy link
Contributor

My understanding is that semver is picky about that post 1.0, but less so in the 0 phase.
I have basically been using the middle-number bump for breaking changes, because we version using >=0.23.x, <0.24, and for these types of changes, my goal is to opt people in automatically.

Open to another approach.

@daspecster
Copy link
Contributor

I talked to @lukesneeringer a tiny bit about this offline. I think we don't have a solid plan of how versioning should work since we split out the services from gcloud. I could be wrong but I think the umbrella package should be incrementing a lot faster and be at a higher number now?

richkadel pushed a commit to richkadel/google-cloud-python that referenced this issue May 6, 2017
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 Cloud Storage API. priority: p0 Highest priority. Critical issue. P0 implies highest priority. release blocking Required feature/issue must be fixed prior to next release.
Projects
None yet
Development

No branches or pull requests

5 participants