Skip to content

ADL Updates to latest SDK in preparation for GA #3152

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 14 commits into from
Oct 28, 2016
Merged

ADL Updates to latest SDK in preparation for GA #3152

merged 14 commits into from
Oct 28, 2016

Conversation

begoldsm
Copy link
Contributor

@begoldsm begoldsm commented Oct 27, 2016

Description

This brings ADL powershell up to the latest SDK version in preparation for GA. The latest SDK is still preview, however it is our first GA candidate SDK and needs to be included in powershell to bring the following features:

  1. Drastically improved download performance for distributed file and folder downloads
  2. Better error handling and messaging for uploads and downloads
  3. Full credential CRUD management, which is replacing Secret CRUD (secret CRUD is deprecated this release)
  4. Full Firewall Rule CRUD
  5. Full TrustedIdProvider CRUD
  6. ADLS Account encryption support
  7. Help improvements to better explain the difference between GET and LIST jobs
  8. Get-AdlCatalogItem fixes for bad input.

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 9 commits October 26, 2016 21:24
This enables us to test out a fix for download throttling scenarios.

update the package to have more robust logic

This gives more retries and better error messages.
Encryption
Trusted ID providers
Credential management
Firewall rule management.
Bug fixes for documentation.
Updates for upload and download performance.

Credential updates for internal testing.

missed one file.

add should process support for static analysis

This makes static analysis happy and, for these cases, should be fine to
include.

update ga candidate private package

and enable list credentials.
All packages are published now and should be pulled from nuget.
This will give users a heads up that all of this is changing/going away.
@begoldsm
Copy link
Contributor Author

@markcowl is there anything else needed here to make sure this gets merged into the release?


namespace Microsoft.Azure.Commands.DataLakeAnalytics
{
[Cmdlet(VerbsCommon.New, "AzureRmDataLakeAnalyticsCatalogCredential", SupportsShouldProcess = true), OutputType(typeof(USqlCredential))]
Copy link
Member

Choose a reason for hiding this comment

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

Since there are multiple parameter sets, need a default parameter set name

@@ -22,6 +22,7 @@ namespace Microsoft.Azure.Commands.DataLakeAnalytics
{
[Cmdlet(VerbsCommon.New, "AzureRmDataLakeAnalyticsCatalogSecret"), OutputType(typeof(USqlSecret))]
[Alias("New-AdlCatalogSecret")]
[Obsolete("Catalog secrets are being deprecated in the next release. Please use New-AzureRmDataLakeAnalyticsCatalogCredential directly instead.")]
Copy link
Member

Choose a reason for hiding this comment

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

...in a future release...

[ValidateNotNull]
public PSCredential Password { get; set; }

[Parameter(Position = 4, Mandatory = false, HelpMessage = "Do not ask for confirmation.")]
Copy link
Member

Choose a reason for hiding this comment

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

Switch parameters should not be positional.

Also, do you need a Force parameter? If there aren't special conditions you want to prompt the user about, consider not having a Force parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I maintain the force parameter to keep consistent with how the secret functionality prompts, for now, since it is the replacement. There shouldn't be an issue with removing it though, since credential removal doesn't have cascading ramifications. Thoughts there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just chose to remove it, no force required for remove credential.

using System.Management.Automation;

namespace Microsoft.Azure.Commands.DataLakeAnalytics
{
[Cmdlet(VerbsCommon.Remove, "AzureRmDataLakeAnalyticsCatalogSecret", SupportsShouldProcess = true), OutputType(typeof(bool))]
[Alias("Remove-AdlCatalogSecret")]
[Obsolete("Catalog secrets are being deprecated in the next release. Please use Remove-AzureRmDataLakeAnalyticsCatalogCredential directly instead.")]
Copy link
Member

Choose a reason for hiding this comment

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

... in a future release


namespace Microsoft.Azure.Commands.DataLakeAnalytics
{
[Cmdlet(VerbsCommon.Set, "AzureRmDataLakeAnalyticsCatalogCredential", SupportsShouldProcess = true), OutputType(typeof(USqlCredential))]
Copy link
Member

Choose a reason for hiding this comment

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

Since there are multiple parameter sets, you should specify a default parameter set name


namespace Microsoft.Azure.Commands.DataLakeStore
{
[Cmdlet(VerbsCommon.Get, "AzureRmDataLakeStoreTrustedIdProvider"), OutputType(typeof(TrustedIdProvider), typeof(IList<TrustedIdProvider>))]
Copy link
Member

Choose a reason for hiding this comment

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

same comment on output types

HelpMessage =
"Indicates the delete should be immediately performed with no confirmation or prompting. Use carefully."
)]
public SwitchParameter Force { 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.

(1) switch parameters should not be positional

(2) You don't need a Force in this case - there are no special conditions you are prompting for

HelpMessage =
"Indicates the delete should be immediately performed with no confirmation or prompting. Use carefully."
)]
public SwitchParameter Force { 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.

switch parameters should not be positional

You don't need the Force parameter


namespace Microsoft.Azure.Commands.DataLakeStore
{
[Cmdlet(VerbsCommon.Set, "AzureRmDataLakeStoreFirewallRule", SupportsShouldProcess = true), OutputType(typeof(FirewallRule))]
Copy link
Member

Choose a reason for hiding this comment

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

same comment on output type


namespace Microsoft.Azure.Commands.DataLakeStore
{
[Cmdlet(VerbsCommon.Set, "AzureRmDataLakeStoreTrustedIdProvider", SupportsShouldProcess = true), OutputType(typeof(TrustedIdProvider))]
Copy link
Member

Choose a reason for hiding this comment

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

same comment on output types

@cormacpayne
Copy link
Member

@markcowl markcowl merged commit 8d62464 into Azure:release-3.1.0 Oct 28, 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