Skip to content

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

Merged
merged 9 commits into from
Dec 8, 2016
Merged

ADL Updates to use latest GA packages. #3261

merged 9 commits into from
Dec 8, 2016

Conversation

begoldsm
Copy link
Contributor

@begoldsm begoldsm commented Dec 7, 2016

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

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.
  • The pull request does not introduce breaking changes (unless a major version change occurs in the assembly and module).

Testing Guidelines

  • Pull request includes test coverage for the included changes.
  • PowerShell scripts used in tests should do any necessary setup as part of the test or suite setup, and should not use hard-coded values for locations or existing resources.

Cmdlet Signature Guidelines

  • New cmdlets that make changes or have side effects should implement ShouldProcess and have SupportShouldProcess=true specified in the cmdlet attribute. You can find more information on ShouldProcess here.
  • Cmdlet specifies OutputType attribute if any output is produced - if the cmdlet produces no output, it should implement a PassThrough parameter.

Cmdlet Parameter Guidelines

  • Parameter types should not expose types from the management library - complex parameter types should be defined in the module.
  • Complex parameter types are discouraged - a parameter type should be simple types as often as possible. If complex types are used, they should be shallow and easily creatable from a constructor or another cmdlet.
  • Cmdlet parameter sets should be mutually exclusive - each parameter set must have at least one mandatory parameter not in other parameter sets.

begoldsm added 6 commits December 5, 2016 11:50
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; }
Copy link
Member

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

Copy link
Contributor Author

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,
Copy link
Member

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,
Copy link
Member

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?

Copy link
Contributor Author

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; }
Copy link
Member

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

Copy link
Contributor Author

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,
Copy link
Member

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; }
Copy link
Member

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

Copy link
Contributor Author

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,
Copy link
Member

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

Copy link
Contributor Author

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; }
Copy link
Member

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

Copy link
Contributor Author

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; }
Copy link
Member

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?

Copy link
Contributor Author

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.

@markcowl
Copy link
Member

markcowl commented Dec 8, 2016

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

@cormacpayne cormacpayne merged commit 772113c into Azure:dev Dec 8, 2016
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.

4 participants