Skip to content
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

CloudBackup enumerate status conversion. #957

Merged
merged 1 commit into from
Mar 20, 2019
Merged

Conversation

talakad
Copy link
Contributor

@talakad talakad commented Mar 19, 2019

Also fix bug in the default creds path for enumerate.

Signed-off-by: veda [email protected]

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 <[email protected]>
@talakad talakad requested a review from lpabon March 19, 2019 21:25
t SdkCloudBackupStatusType,
) string {
switch t {
case SdkCloudBackupStatusType_SdkCloudBackupStatusTypeNotStarted:
Copy link
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"

Copy link
Member

@lpabon lpabon Mar 20, 2019

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
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

Copy link
Contributor

@disrani-px disrani-px Mar 20, 2019

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
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
Member

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
Member

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
Member

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