-
Notifications
You must be signed in to change notification settings - Fork 4k
Integrating the new custom dataplane sdk for ADLS to the powershell cmdlets #4986
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
…eprecated ConcurrentFileCount parameter and introduced Concurrency in Import-AzureRmDataLakeStore and Export-AzureDataLakeStoreItem 3) Updated help markdown files
…nd Set-AzureRmDataLakeStoreItemExpiry
…) Marked obsolete for parameters that we are going to deprecate 3) Undo the introduction of parameter IfFileExists for New-Item 4) Introduce Mock unittest for playback
@rahuldutta90 Please pull the latest from the branch, there are merge conflicts |
@markcowl Did a latest pull from the main repo and resolved the conflicts. |
@rahuldutta90 You are currently failing the build because of Signature issues - PowerShell generally disapproves of the use of plural parameter names (FileExpiryOptions). If this has been expressly approved in review (I do not think I was in attendance for this review), just add the error (found in the build under view/src/Package/SignatureIssues.csv with error code 1) to the SignatureIssue.csv file here |
@maddieclayton I have fixed parameter name FileExpiryOptions. Thanks. |
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.
@rahuldutta90 a few comments to take a look at
<Reference Include="Microsoft.Azure.Management.DataLake.Store, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Store.2.3.0-preview\lib\net452\Microsoft.Azure.Management.DataLake.Store.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> |
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.
@rahuldutta90 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.
This 3rd party package is used for logging. Without this it wont run.
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.
Has this been through IP review?
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.
@rahuldutta90 ping on this 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.
@cormacpayne NLog is OSS registered package used for logging.
@@ -116,7 +126,15 @@ | |||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |||
</None> | |||
<None Include="MSSharedLibKey.snk" /> | |||
<None Include="packages.config" /> | |||
<Content Include="NLog.config"> |
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.
@rahuldutta90 what are NLog.config
and NLog.xsd
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.
This is not mandatory. It is used to configure NLog. I had a dependency on NLog.config which was not needed. For future release I have removed this dependency. Here I have manually removed these files, updated the csproj and packages.config
@@ -81,29 +76,25 @@ public class ExportAzureDataLakeStoreItem : DataLakeStoreFileSystemCmdletBase | |||
ParameterSetName = DiagnosticParameterSetName)] | |||
public SwitchParameter Resume { get; set; } | |||
|
|||
[Obsolete] |
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.
@rahuldutta90 for all Obsolete
attributes, please make sure you include a message that says what parameter you are deprecating in an upcoming breaking change release and what cmdlet it is in.
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.
Fixed. Also fixed this for ImportAzureRmDataLakeStoreItem and RemoveAzureDataLakeStoreItem.
@@ -113,14 +104,21 @@ public int ConcurrentFileCount | |||
ParameterSetName = DiagnosticParameterSetName)] | |||
public SwitchParameter Force { get; set; } | |||
|
|||
[Parameter(ValueFromPipelineByPropertyName = true, Position = 8, 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.
@rahuldutta90 please remove the Position
from both of the parameter attributes you are adding here
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.
Fixed. Updated the markdown file also. Also did the same fix for ImportAzureDataLakeStoreItem since I introduced the same parameter there.
@@ -130,63 +128,55 @@ public LogLevel DiagnosticLogLevel | |||
|
|||
public override void ExecuteCmdlet() | |||
{ | |||
if (ConcurrentFileCount != -1) | |||
{ | |||
WriteWarning(Resources.IncorrectConcurrentFileCountWarning); |
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.
@rahuldutta90 rather than writing this warning, put these strings inside their corresponding Obsolete
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.
Still not sure. Although updated the obsolete message, but I do not see the warning when I remove WriteWarning even though I have the message in obsolete.
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.
@cormacpayne Do you have any other comments regarding 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.
@cormacpayne , I have maked obsolete. However, that alone does not show the message when running the cmdlet. So I am leaving the WriteWarning in as well.
[Alias("Set-AdlStoreItemExpiry")] | ||
public class SetAzureRmDataLakeStoreItemExpiry : DataLakeStoreFileSystemCmdletBase | ||
{ | ||
internal const string BaseParameterSetName = "Set expiry as Absolute or NeverExpire"; |
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.
@rahuldutta90 make sure parameter set names are not space-separated strings
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.
Fixed. Updated the markdown file also.
[Parameter(ValueFromPipelineByPropertyName = true, Position = 3, ParameterSetName = RelativeExpiryParameterSetName, Mandatory = false, | ||
HelpMessage = "The relative time in milliseconds with respect to now or creation time")] | ||
[ValidateNotNullOrEmpty] | ||
public long? RelativeTime { 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.
@rahuldutta90 nit: make sure there's an empty line between this parameter and ExecuteCmdlet()
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.
Fixed.
|
||
public long? AccessTime { get; } | ||
/// <summary>Gets the block size for the file.</summary> | ||
public long? BlockSize { get; } |
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.
@rahuldutta90 nit: would you mind adding an empty line between each property?
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.
Fixed.
The credentials, account, tenant, and subscription used for communication with azure | ||
|
||
```yaml | ||
The credentials, account, tenant, and subscription used for communication with azure.```yaml |
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.
@rahuldutta90 this is a bug in the platyPS
module - please make sure that you move the ```yaml
string at the end of this line to a line by itself. You can see how this should be done by looking at any other parameter in this 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.
Good catch. This one I missed.
…rameter set, specify message in Obsolete
@cormacpayne I have responded to your reviews. |
@azuresdkci test this please |
@azuresdkci test this please |
…ameter mandatory in SetExpiry
Per email, will create a branch for this after the release candidate goes out to release as a preview. |
@markcowl Azure powershell 5.1.1 is released. Now what do we have to do to release this out of band? Do we have the separate branch? |
@azuresdkci Test this please |
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.
@rahuldutta90 one comment to resolve. To prepare your module to be preview, you will need to do the following:
(1) You will need to update your version of PowerShellGet
to 1.6.0, which you can do by running Install-Module -Name PowerShellGet -Repository PSGallery -Force
(2) Update the ModuleVersion
in AzureRM.DataLakeStore.psd1
to 5.0.1
(3) Update the ReleaseNotes
field in AzureRM.DataLakeStore.psd1
with the contents that you added to your ChangeLog.md
file (the contents underneath the ## Current Release
header)
(4) Update the Prelease
field in AzureRM.DataLakeStore.psd1
to preview
. You can do this by running Update-ModuleManifest -Path PATH_TO_PSD1 -Prelease "preview"
(5) Update the versions in AssemblyInfo.cs
to 5.0.1
<package id="Microsoft.Azure.Management.DataLake.Store" version="2.3.0-preview" targetFramework="net452" /> | ||
<package id="NLog" version="4.4.12" targetFramework="net452" /> |
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.
@rahuldutta90 since we've confirmed that these packages are OK to use, you will need to add them to the RequiredAssemblies
field in the AzureRM.DataLakeStore.psd1
file.
Will update module versions out of band
Description
We have introduced a new custom dataplane SDK for ADLS. This new SDK replaces the dataplane part of the previous SDK. This change is due to integration of the new SDK to the current powershell cmdlets.
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 aPassThru
parameter.Cmdlet Parameter Guidelines