-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Added cmdlets instant file recovery and enhanced tests #4834
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
Conversation
|
This PR already includes changes proposed in #4821. Once this PR gets merged, will pull from upstream and update the current PR. |
cormacpayne
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.
@dragonfly91 a few initial comments
Also, would you mind updating the RecoveryServices.Backup change log to reflect the changes you are making in this PR?
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.
@dragonfly91 for all of the files where you find this applies, please make sure the ```yaml string at the end of this parameter description is moved to a line by itself. See other parameters in this file for how this should look.
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.
@dragonfly91 it looks like there might have been some bad encoding on the first two lines of this example
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.
@dragonfly91 same comment about bad encoding in the example
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.
@dragonfly91 this parameter should not have the ValueFromPipeline attribute
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.
@dragonfly91 I would recommend writing this as a part of the debug or verbose stream
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.
This text needs to be displayed as it contains a password. When the script is run, it asks for this password to be able to mount the files of the recovery point. Do you have any other option to display the text?
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.
@dragonfly91 WriteInformation is only available in PowerShell 5. Please use one of the other streams. If this needs to be displayed, then it should be part of the output object for the cmdlet
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.
@dragonfly91 instead of using "Get" as the action, I would say something like "Downloading script..."
|
Hi Cormac, I've addressed all of your comments. Can you please take a look? |
c88008d to
ed66bdf
Compare
|
Hi @markcowl and @cormacpayne I've addressed @markcowl 's comments. Can you please take a look? |
cormacpayne
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.
@dragonfly91 a few more comments
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.
@dragonfly91 what is this package being used for?
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.
@dragonfly91 do we need to check if rp is null before accessing a property of it?
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.
This case would never happen as we have [ValidateNotNullOrEmpty] declared on top of the RecoveryPoint parameter in the cmdlet definition. So, I don't think a null check is needed.
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.
@dragonfly91 we should check for the existence of absoluteFilePath before writing to it
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.
The designed behavior is that the cmdlet overwrites any existing files. However, the file name already contains a randomized string (based on timestamp) and thus every time a new file is generated. So, there's no point in checking for the existence of the file.
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.
@dragonfly91 also, please use AzureSession.Instance.DataStore to read from/write to a file.
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.
@dragonfly91 make sure this cmdlet has an OutputType, even if it's void or RecoveryPointBase
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.
Taken this.
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.
@dragonfly91 it should be made clear in the documentation that if no Path is provided, then you use the current directory as the save location of the script
|
Hi @cormacpayne and @markcowl , I've addressed all the given comments. Can you please take a look? |
…very Services Backup. Updating Microsoft.Azure.Management.RecoveryServices.Backup dll version to 2.1.0-preview Updating Microsoft.Azure.Management.RecoveryServices.Backup dll version to 2.1.0-preview in Test projects Updating hint path for Microsoft.Azure.Management.RecoveryServices.Backup dll version to 2.1.0-preview
Renaming model for RecoveryPointAccessInfo Fixing few bugs Fex bug fixes Adding timezone info changes Bug fixes Bug fixes
disabling create vault vm rg backup test test infra betterments, job tests wait job test recording job and get rp tests ilr test get item test recording add protection and backup test recordings get rps test recording Fixes to item tests all tests except restore tests working in both record and playback modes Updated help files Edits to make restore test work upstream pull + full restore test pass ILR test test fixes
Test fixes Renaming instant file restore cmdlets based on design review comments.
Fix 12577430: In Get-Container, should use exact equal check instead of contains check when checking for container name.
…d to the user in Get-AzureRmRSBRPMountScript cmdlet as per PR review comments.
Description
This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.
General Guidelines
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcessand haveSupportShouldProcess=truespecified in the cmdlet attribute. You can find more information onShouldProcesshere.OutputTypeattribute if any output is produced - if the cmdlet produces no output, it should implement aPassThruparameter.Cmdlet Parameter Guidelines