Skip to content

Making sure that the parameters provided in the metadatalocation getting passed to the nfs provider #144

Open
vineela1999 wants to merge 3 commits into
soda-cdm:mainfrom
vineela1999:paramters
Open

Making sure that the parameters provided in the metadatalocation getting passed to the nfs provider #144
vineela1999 wants to merge 3 commits into
soda-cdm:mainfrom
vineela1999:paramters

Conversation

@vineela1999

@vineela1999 vineela1999 commented Jan 31, 2023

Copy link
Copy Markdown
Contributor

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind new feature

kind bug fix

/kind cleanup
/kind revert change
/kind design
/kind documentation
/kind enhancement

What this PR does / why we need it:
The parameters provided in the metadatalocation should be reached to the NFS provider
this PR implements the code required for that
Which issue(s) this PR fixes:

Fixes #

Test Report Added?:

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

kind TESTED

/kind NOT-TESTED

Test Report:

for the resource:
Screenshot from 2023-01-31 11-38-05

Screenshot from 2023-01-31 11-37-14
when trying to restore backup and delete backup parameters are getting passed
Screenshot from 2023-02-02 15-03-30

Special notes for your reviewer:

@vineela1999 vineela1999 changed the title [WIP]Making sure that the parameters provided in the metadatalocation getting passed to the nfs provider Making sure that the parameters provided in the metadatalocation getting passed to the nfs provider Feb 2, 2023
if err != nil {
return err
}
log.Infof("88888attributes are:8888 %v", attributes)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please do change the logs properly.....don't add 888 etc . please do change this all the places

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

changed

Parameters: parameters,
},
}
ctrl.logger.Infof("paramteres in deleteMetadataBackup:%v", parameters)

@sushanthakumar sushanthakumar Mar 1, 2023

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not needed

if err != nil {
return err
}
log.Infof("attributes in upload are: %v", attributes)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Follow log msg convention, applicable for other places as well

return status.Errorf(codes.Unknown, "failed to get backup handle during backup")
return status.Errorf(codes.Unknown, "failed to get backupHandle and parameters during backup")
}
log.Infof("***parameters are******%v", parameters)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can be deleted

// Validate the Metadatalocation
locationName := backup.Spec.MetadataLocation
backup.Status.ValidationErrors = []string{}
ctrl.logger.Infof("Preparing backup for backup location: %s ", locationName)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is the delete flow, update accordingly


// Validate the Metadatalocation
locationName := backup.Spec.MetadataLocation
backup.Status.ValidationErrors = []string{}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not required to update ValidationErrors

return status.Error(codes.InvalidArgument, "download file id is empty")
}
attributes := request.GetAttributes()
log.Infof("******attributes in Download are***** %v", attributes)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Combine this with subsequent log

fileId := request.GetFileIdentifier()

attributes := request.GetAttributes()
log.Infof("******attributes in Delete are***** %v", attributes)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Combine this with subsequent log

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