-
Notifications
You must be signed in to change notification settings - Fork 4k
Powershell changes to onboard additional traffic analytics parameters with existing networkwatcher flowlog parameters #6253
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
+@EvgenyAgafonchikov to review |
9f31554
to
a61494d
Compare
c95e351
to
ebc8abb
Compare
I have made fixes and after that also I see build issues but the traces do not show any error. In the build artifacts msbuild.err is 0B. https://azuresdkci.westus2.cloudapp.azure.com/job/powershell/4632/artifact/ Is this an intermittent issue? PS: In local I have ran the FlowLog test and its functional. |
Looks like the above build fail was intermittent :) |
@sayghosh Have you filled out a cmdlet design review? If so, please link in the description. If not, please fill one out here: https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues |
@@ -503,24 +503,21 @@ function Test-FlowLog | |||
# Setup | |||
$resourceGroupName = Get-ResourceGroupName | |||
$nwName = Get-ResourceName | |||
$location = "eastus" | |||
$location = "eastus2euap" |
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.
Please use Get-Location for both of these: https://github.com/Azure/azure-powershell/wiki/Azure-Powershell-Developer-Guide#using-common-code
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.
Did not update as the same location field is used to create many resources and no all of them are available in new france regions. Let me know your thoughts 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.
You should use a different location variable for each resource type and use Get-Location. This guarentees that you will be able to rerecord even when permissions to different regions change, or when you are in a different cloud (China, Fairfax).
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.
Actually the NSG, NetworkWatcher and Storage Account has to be in same azure region while the workspace can be in any indepedent region, that is why there are 2 location variables used here. And to enable Traffic analytics, both the networkwatcher and WS has to be in a Traffic Analytics supported region. But currently Traffic Analytics is availble only on 14 azure regions. FOr now I can add a comment to it with reason why I could not use Get-Location there. Does this make sense? PLease adivse.
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.
Okay, adding the comment should be fine.
|
||
try | ||
{ | ||
# Create Resource group | ||
New-AzureRmResourceGroup -Name $resourceGroupName -Location "$location" | ||
|
||
# Create the Virtual Network | ||
$subnet = New-AzureRmVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix 10.0.1.0/24 |
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 this just never used?
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.
No, this was never used
<package id="Microsoft.Azure.Management.Redis" version="3.1.1-preview" targetFramework="net45" /> | ||
<package id="Microsoft.Azure.Management.ResourceManager" version="1.6.0-preview" targetFramework="net452" /> | ||
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" /> | ||
<package id="Microsoft.Azure.Management.Storage" version="6.1.0-preview" targetFramework="net45" /> | ||
<package id="Microsoft.Azure.OperationalInsights" version="0.9.0.1-preview" 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.
Don't think you need this package.
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.
Removed
@@ -47,6 +47,9 @@ | |||
<Reference Include="Hyak.Common"> | |||
<HintPath>..\..\..\packages\Hyak.Common.1.0.3\lib\portable-net403+win+wpa81\Hyak.Common.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Microsoft.Azure.Commands.OperationalInsights"> |
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.
I don't think you need 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.
Removed
@@ -87,6 +93,9 @@ | |||
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Redis.3.1.1-preview\lib\net45\Microsoft.Azure.Management.Redis.dll</HintPath> | |||
<Private>True</Private> | |||
</Reference> | |||
<Reference Include="Microsoft.Azure.OperationalInsights, Version=0.9.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, 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.
I don't think you need this package - if it does not work without this package let me know.
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.
Removed
|
||
if (ParameterSetName.Contains(TAByDetails)) | ||
{ | ||
if (this.WorkspaceResourceId == null || this.WorkspaceGUId == null || this.WorkspaceLocation == null) |
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.
You don't need to have this check - powershell will not allow the user to not enter mandatory parameters for a parameter 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.
Removed
throw new System.ArgumentException("Either the Workspace parameter or all of WorkspaceResourceId,WorkspaceGUId,WorkspaceLocation must be provided"); | ||
} | ||
|
||
string[] workspaceDetailsComponents = this.WorkspaceResourceId.Split('/'); |
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.
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.
None of these APIs validate check of exact 8 components (They check >= 8). Is it advisabel to use that check still?
} | ||
else | ||
{ | ||
if (this.Workspace == null) |
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.
remove this check.
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.
Removed
@@ -118,7 +118,7 @@ public void TestRemoveAzureRmServiceFabricNode() | |||
TestController.NewInstance.RunPsTest("Test-RemoveAzureRmServiceFabricNode"); | |||
} | |||
|
|||
[Fact] | |||
[Fact(Skip = "Test is failing and needs a fix from the owning team")] |
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.
What is happening 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.
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.
Can you work with @juhacket to get this test passing? I don't want to submit a PR that could possibly be breaking a 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.
Sure, I have sent a note. But since the test does not use the cmdlets I touched, this PR should not add any new breaking change and I guess the test might already be failing in the merged changes.
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.
I am more worried about the bump to the network version breaking the cmdlet than any changes you made. As I would likely gate the release of the new Network module on this change (and because code complete is not until Monday), I'd like to get this test rerecorded before merging this PR.
@@ -6,7 +6,7 @@ | |||
<package id="Microsoft.Azure.Gallery" version="2.6.2-preview" targetFramework="net45" /> | |||
<package id="Microsoft.Azure.Graph.RBAC" version="3.2.0-preview" targetFramework="net45" /> | |||
<package id="Microsoft.Azure.Management.Authorization" version="2.0.0" targetFramework="net45" /> | |||
<package id="Microsoft.Azure.Management.Network" version="19.0.0-preview" targetFramework="net452" /> | |||
<package id="Microsoft.Azure.Management.Network" version="19.0.1-preview" targetFramework="net452" /> | |||
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" /> | |||
<package id="Microsoft.Azure.Management.Sql" version="1.13.0-preview" targetFramework="net452" /> | |||
<package id="Microsoft.Azure.Management.Storage" version="2.4.0-preview" targetFramework="net45" /> |
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.
Please remove/revert changes to the files after this:
src/StackAdmin/AzureRM/AzureRM.psm1
src/StackAdmin/AzureStack/AzureStack.psm1
tools/AzureRM/AzureRM.psm1
tools/LocalFeed/Microsoft.Azure.Management.Network.19.0.1-preview.nupkg
tools/LocalFeed/Microsoft.Azure.Management.Network.19.0.1-preview.symbols.nupkg
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.
Ping - these files need to be reverted or deleted before the PR is accepted.
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.
I shall do these after all changes are accepted. As doing these will cause the build to break.
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 will not cause the build to break - they are created during the msbuild, but reverting them will not cause the build to break.
98c6948
to
54ebe15
Compare
All changes are approved - this will be merged once the ServiceFabric changes have been merged. |
@sayghosh If you get a moment today, can you resolve the merge conflicts above? If you don't have time, I'll do it tomorrow, but would like to get that done ASAP so we can run final tests and merge. |
@maddieclayton I am working on them and updating the PR after a quick validation on my side. |
@azuresdkci test this please |
@maddieclayton Again some test falied which is unrelated: Retriggered the build anyhow. |
@maddieclayton On demaind build succeeded: https://azuresdkci.westus2.cloudapp.azure.com/view/PowerShell/job/powershell-demand/879/ |
… with existing networkwatcher flowlog parameters (Azure#6253) * Powershell changes satge 1 * Some small changes in required assembly list * Basic commandlets working * Basic implementations done * Implementatioan and test file changes * Workspace object usage coded * Changes done * Optional and mandatory variables sorted * Version updates * Updating test * Reverting changes in service fabric test and squashing all commits into one * Reverting service fabric changes * Adding help generation text * Cleaning the signatureIssues.csv file * Pushing minor string update to retrigger build * Revising the service fabric changes
… with existing networkwatcher flowlog parameters (Azure#6253) * Powershell changes satge 1 * Some small changes in required assembly list * Basic commandlets working * Basic implementations done * Implementatioan and test file changes * Workspace object usage coded * Changes done * Optional and mandatory variables sorted * Version updates * Updating test * Reverting changes in service fabric test and squashing all commits into one * Reverting service fabric changes * Adding help generation text * Cleaning the signatureIssues.csv file * Pushing minor string update to retrigger build * Revising the service fabric changes
Description
Checklist
CONTRIBUTING.md
platyPS
module