Closed
Conversation
added 3 commits
June 14, 2021 20:17
…le/BackupEngine interfaces to support populating BackupInfo.Status Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
ajm188
commented
Jun 15, 2021
| // read-only backups (created by ListBackups). Returns a boolean to indicate | ||
| // if the file exists, and an error. Variants of "file not found" errors do | ||
| // result in an error, but instead result in (false, nil). | ||
| CheckFile(ctx context.Context, filename string) (bool, error) |
Contributor
Author
There was a problem hiding this comment.
Note: I've only implemented this for filebackupstorage and s3backupstorage for now.
| // This must only be called after flags have been parsed. | ||
| func GetBackupEngine() (BackupEngine, error) { | ||
| name := *backupEngineImplementation | ||
| return getBackupEngine(name) |
Contributor
Author
There was a problem hiding this comment.
very small method extraction to let me reuse the error codes, but specifying a particular engine name rather than "whatever value the flag pointer has"
This was referenced Jun 15, 2021
Contributor
|
This PR is being marked as stale because it has been open for 30 days with no activity. To rectify, you may do any of the following:
If no action is taken within 7 days, this PR will be closed. |
Contributor
|
This PR was closed because it has been stale for 7 days with no activity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Demo
Note that for this, I made a quick change to
builtinbackupengine'sGetBackupStatusmethod to return a random status, via:Anyway, the results, showing limiting and details (more to show that the backend impl is correct than anything about the CLI usability -- i am going to change the way we marshal json to convert enums from ints to their actual names separately):
Related Issue(s)
Checklist
Deployment Notes