-
Notifications
You must be signed in to change notification settings - Fork 4k
ADL Updates to use latest GA packages. #3261
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 also includes: 1. Protecting against breaking SDK changes 2. Re-run of tests 3. Fixing bugs in cmdlets 3a. Remove the ability to try and set default data lake store account. This has never been supported for customers. 3b. Remove the ability to try and set unsupported fields in Set-Accounts (which has never been supported) 3c. Remove "return" value for NewSecret, since it has never returned anything. 3d. Remove ability to try and set encryption in an existing account (has never been supported) 4. Add support for new properties in ADLA accounts (parallelism and retention policies)
"Optionally indicates that this should now be the default storage account for the DataLakeAnalytics account." | ||
)] | ||
[ValidateNotNullOrEmpty] | ||
public SwitchParameter Default { get; set; } |
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.
@begoldsm why are you removing this parameter? This will result in a breaking change
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.
Because it was a bug. If any customer tried to pass this parameter the cmdlet would fail (always) since this has never been supported. It was a test gap miss that was corrected recently during a test debt payment.
@@ -54,6 +54,24 @@ public class NewAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase | |||
[ValidateNotNull] | |||
public Hashtable Tags { get; set; } | |||
|
|||
[Parameter(ValueFromPipelineByPropertyName = true, Position = 5, Mandatory = false, |
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.
@begoldsm more than four positional parameters for a cmdlet is too many. Please get ready of the position for the parameters you are adding to this cmdlet
@@ -72,8 +72,8 @@ public override void ExecuteCmdlet() | |||
|
|||
var toUse = Uri ?? new Uri(string.Format("https://{0}:{1}", DatabaseHost, Port)); | |||
|
|||
WriteObject(DataLakeAnalyticsClient.CreateSecret(Account, DatabaseName, Secret.UserName, | |||
Secret.GetNetworkCredential().Password, toUse.AbsoluteUri)); | |||
DataLakeAnalyticsClient.CreateSecret(Account, DatabaseName, Secret.UserName, |
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.
@begoldsm this cmdlet won't return anything anymore?
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.
It never returned anything. The object would be null/empty since the service has never returned anything. This was detected during the time spent adding more robust test support across our service.
@@ -30,35 +30,38 @@ public class SetAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase | |||
|
|||
[Parameter(ValueFromPipelineByPropertyName = true, Position = 1, Mandatory = false, | |||
HelpMessage = | |||
"Name of the new Data Lake account to set as the default storage for this DataLakeAnalytics account.")] | |||
[ValidateNotNullOrEmpty] | |||
public string DefaultDataLakeStore { get; set; } |
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.
@begoldsm why is this parameter being remove? This is a breaking change
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.
Was never supported. Same comment as above. We were lucky no one tried to use this option, since it would have always resulted in an exception from the server saying "changes to default store are not allowed"
"A string,string dictionary of tags associated with this account that should replace the current set of tags" | ||
)] | ||
[ValidateNotNull] | ||
public Hashtable Tags { get; set; } | ||
|
||
[Parameter(ValueFromPipelineByPropertyName = true, Position = 2, Mandatory = false, |
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.
@begoldsm same comment about too many positional parameters
ParameterSetName = DataLakeParameterSetName, | ||
HelpMessage = "The name of the Data Lake Store to add to the account.")] | ||
[ValidateNotNullOrEmpty] | ||
public string DataLakeStore { get; set; } |
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.
@begoldsm same breaking change 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.
Same comment as before. Since you can't set anything for a DataLakeStore data source (as of today) I have optimized this command for only Azure blob. We have 100% confidence that no customers have been trying to use it this way, since the command would always fail.
[ValidateNotNullOrEmpty] | ||
[Alias("AzureBlob")] | ||
public string Blob { get; set; } | ||
|
||
[Parameter(ValueFromPipelineByPropertyName = true, Position = 2, Mandatory = true, | ||
ParameterSetName = BlobParameterSetName, |
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.
@begoldsm removing the parameter sets from this cmdlet causes breaking changes. For this parameter, if a user has a script that was using the parameter set DataLakeParameterSet
, it will no longer work because AccessKey
is now a required parameter in every call of this 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.
Back to my previous comments. Any customer who did that had a broken script anyway, since the command would throw an exception deterministically saying "changing default data lake store is not supported"
"Optionally indicates that this should now be the default storage account for the DataLakeAnalytics account." | ||
)] | ||
[ValidateNotNullOrEmpty] | ||
public SwitchParameter Default { get; set; } |
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.
@begoldsm same breaking change 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.
Same response :)
[Parameter(ValueFromPipelineByPropertyName = true, Position = 6, Mandatory = false, | ||
HelpMessage = "If the encryption type is User assigned, this is the key version of the key the user wishes to use")] | ||
[ValidateNotNull] | ||
public string KeyVersion { get; set; } |
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.
@begoldsm why are you removing four parameters in this 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.
Same issue as the others. When adding tests, I discovered that this wasn't actually supported and will always fail. Removing it protects both us and our customers from assuming they can do things that are not supported. Unfortunately we should have caught this previously, but we did not have the bandwidth (or a good way) to test it until this cycle, where I have found the bugs before customers and am proactively fixing them.
And fix the conversion to utilize UTC.
@begoldsm @cormacpayne as discussed api changes that would previously have resulted in errors are not breaking changes for our purposes, so this should be ok. on demand run here: http://azuresdkci.cloudapp.net/view/1-AzurePowerShell/job/powershell-demand/1336/ |
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
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThrough
parameter.Cmdlet Parameter Guidelines