Thanks to visit codestin.com
Credit goes to github.com

Skip to content

storage: add support for object retention #12994

@JesseLovelace

Description

@JesseLovelace

Please implement the object retention feature. The following operations must be supported:

  • Create a bucket with object retention enabled by using the enableObjectRetention bucket create boolean option at bucket create time
  • Get the object retention enabled status of a bucket
  • Create an object with retention enabled (on an retention enabled bucket) by populating the retention object at object create time (retention object has the fields mode which can be Unlocked or Locked, and retainUntilTime which is a timestamp)
  • Update retention for an existing object with a patch operation, by passing the overrideUnlockedRetention boolean patch option
  • Get the retention policy of an object
  • Remove retention for an existing object the same way as above

Support for gRPC is blocked as the protos are not published.

  • Implement FromProto for BucketObjectRetention
  • Support EnableObjectRetention for gRPC plugin
  • Implement ToProto and FromProto for ObjectRetention
  • Support OverrideUnlockedRetention for gRPC plugin
  • Support bucket metadata for object retention in the testbench
  • Support object metadata for object retention in the testbench
  • Upgrade the testbench
  • Enable the object retention samples when running against the emulator

Details in go/gcs-object-retention-client-request

You can use the java implementation as a reference.

The kokoro test project should be allowlisted shortly, let me know if you need access to an allowlisted project for your own testing.

We're aiming to get this in by the November code freeze, let me know if you need any help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: storageIssues related to the Cloud Storage API.externalThis issue is blocked on a bug with the actual product.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions