Skip to content

Conversation

@phuongatemc
Copy link
Contributor

Adding context object to the functions of the Velero plugin. This context object can be used to set timeout for the operation by the caller. To ensure backward compatibility and avoid forcing all plugin vendor upgrade their code in lock-step, a new interface would be created to wrap around the existing interface and new functions would be created with additional parameter ctx context.Context as the first parameter. The plugin vendor can decide to implement new function (with context) or keep using existing one.

@jenting jenting added the Area/Design Design Documents label Jan 28, 2021
@dsu-igeek dsu-igeek added the kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes label Jan 28, 2021
Copy link
Contributor

@dsu-igeek dsu-igeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's list out the APIs that will get contexts here. I think the list is

BackupItemAction.Execute
DeleteItemAction.Execute

ObjectStore.PutObject
ObjectStore.ObjectExists
ObjectStore.GetObject
ObjectStore.ListCommonPrefixes
ObjectStore.ListObjects
ObjectStore.DeleteObject

RestoreItemAction.Execute

VolumeSnapshotter.CreateVolumeFromSnapshot

VolumeSnapshotter.GetVolumeInfo
VolumeSnapshotter.CreateSnapshot
VolumeSnapshotter.DeleteSnapshot

@phuongatemc
Copy link
Contributor Author

Let's list out the APIs that will get contexts here. I think the list is

BackupItemAction.Execute
DeleteItemAction.Execute

ObjectStore.PutObject
ObjectStore.ObjectExists
ObjectStore.GetObject
ObjectStore.ListCommonPrefixes
ObjectStore.ListObjects
ObjectStore.DeleteObject

RestoreItemAction.Execute

VolumeSnapshotter.CreateVolumeFromSnapshot

VolumeSnapshotter.GetVolumeInfo
VolumeSnapshotter.CreateSnapshot
VolumeSnapshotter.DeleteSnapshot

Do you want me to add this list to the design doc itself?

@github-actions github-actions bot requested a review from dsu-igeek February 9, 2021 16:37
@phuongatemc
Copy link
Contributor Author

@dsu-igeek I have added the list of new functions.

@nrb
Copy link
Contributor

nrb commented Mar 11, 2021

This is blocked on #3285

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area/Design Design Documents Blocked kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants