-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Enhance plugin interface with timeout #3355
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
base: main
Are you sure you want to change the base?
Enhance plugin interface with timeout #3355
Conversation
Signed-off-by: Hoang, Phuong <[email protected]>
Signed-off-by: Hoang, Phuong <[email protected]>
Signed-off-by: Hoang, Phuong <[email protected]>
dsu-igeek
left a comment
There was a problem hiding this 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
Do you want me to add this list to the design doc itself? |
Signed-off-by: Hoang, Phuong <[email protected]>
|
@dsu-igeek I have added the list of new functions. |
|
This is blocked on #3285 |
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.