Skip to content

CloudBackup enumerate status conversion.#957

Merged
lpabon merged 1 commit into
masterfrom
cloudbackup-enumerate-fixes
Mar 20, 2019
Merged

CloudBackup enumerate status conversion.#957
lpabon merged 1 commit into
masterfrom
cloudbackup-enumerate-fixes

Conversation

@talakad

@talakad talakad commented Mar 19, 2019

Copy link
Copy Markdown
Contributor

Also fix bug in the default creds path for enumerate.

Signed-off-by: veda veda@portworx.com

What this PR does / why we need it:
Status conversion to string while enumerating cloud backups.
Which issue(s) this PR fixes (optional)
Closes #

Special notes for your reviewer:

Also fix bug in the default creds path for enumerate.

Signed-off-by: veda <veda@portworx.com>
@talakad talakad requested a review from lpabon March 19, 2019 21:25
Comment thread api/api.go
t SdkCloudBackupStatusType,
) string {
switch t {
case SdkCloudBackupStatusType_SdkCloudBackupStatusTypeNotStarted:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this is a problem with the SDK types. This fixes the issue with the status for the REST API but the SDK status strings still are "SdkCloudBackupStatusTypeDone". Why do users care about what interface was being used in the status string? And the status is already stored in the Backup Status field, so it doesn't need to have redundant information. The status string should just be "Done"

@lpabon lpabon Mar 20, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Strings cannot be stored or described in gRPC proto file, only enums that is why it is called SdkCloudBackupStatusTypeDone.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That just means the variable names need to be fixed. Please don't merge PRs when changes are requested on them

@disrani-px disrani-px Mar 20, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can look at the CloudMigrate status and stage strings on how to do this correctly: https://github.com/libopenstorage/openstorage/blob/master/api/api.pb.go#L992

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

And this needs to be fixed for all the other SDK strings too

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@disrani-px the method you have above works well. Please write an issue so that we can fix all the values in the SDK to use that model. In the mean time, release-6.0 needs to have the current model.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually, I'll create it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Filed #962

@lpabon lpabon merged commit 5bc0056 into master Mar 20, 2019
@talakad talakad deleted the cloudbackup-enumerate-fixes branch September 2, 2020 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants