Skip to content
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

[NetAppFiles] Change to api-version 2024-09-01 #27360

Merged
merged 14 commits into from
Apr 8, 2025

Conversation

audunn
Copy link
Member

@audunn audunn commented Mar 17, 2025

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • For SDK-based development mode, update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • For autorest-based development mode, include the changelog in the PR description.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@notyashhh
Copy link
Member

/azp run

1 similar comment
@audunn
Copy link
Member Author

audunn commented Mar 18, 2025

/azp run

Copy link
Contributor

Commenter does not have sufficient privileges for PR 27360 in repo Azure/azure-powershell

@notyashhh
Copy link
Member

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@audunn
Copy link
Member Author

audunn commented Mar 18, 2025

/azp run

Copy link
Contributor

Commenter does not have sufficient privileges for PR 27360 in repo Azure/azure-powershell

@notyashhh
Copy link
Member

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@notyashhh notyashhh self-assigned this Mar 19, 2025
Copy link

This PR was labeled "needs-revision" because it has unresolved review comments or CI failures.
Please resolve all open review comments and make sure all CI checks are green. Refer to our guide to troubleshoot common CI failures.

@audunn
Copy link
Member Author

audunn commented Mar 19, 2025

/azp run

Copy link
Contributor

Commenter does not have sufficient privileges for PR 27360 in repo Azure/azure-powershell

@audunn
Copy link
Member Author

audunn commented Mar 20, 2025

/azp run

Copy link
Contributor

Commenter does not have sufficient privileges for PR 27360 in repo Azure/azure-powershell

@vidai-msft
Copy link
Contributor

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@audunn
Copy link
Member Author

audunn commented Mar 20, 2025

When approved is it possible to relase asap? This contains feature that has been announced but was missing from the PowerShell module?

@audunn
Copy link
Member Author

audunn commented Mar 27, 2025

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@VeryEarly
Copy link
Collaborator

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@VeryEarly
Copy link
Collaborator

hi @audunn , please re-record 'Test-AccountCMK', it was not correctly recorded before because az.keyvault was not set up properly

@audunn
Copy link
Member Author

audunn commented Apr 4, 2025

hi @audunn , please re-record 'Test-AccountCMK', it was not correctly recorded before because az.keyvault was not set up properly
@VeryEarly Looks like it is failing to load the nested extension Az.KeyVault.Extension, the Az.KeyVault.Extension module is there in the artifacts directory in a folder

  Message: 
System.Management.Automation.RuntimeException : Test failed due to a non-empty error stream. First error: PowerShell Error Record: The module to process './Az.KeyVault.Extension', listed in field 'NestedModules' of module manifest 'C:\Users\****\source\repos\azure\azure-powershell\artifacts\Debug\Az.KeyVault\Az.KeyVault.psd1' was not processed because no valid module was found in any module directory.
Exception:System.Management.Automation.PSInvalidOperationException: The module to process './Az.KeyVault.Extension', listed in field 'NestedModules' of module manifest 'C:\Users\*****\source\repos\azure\azure-powershell\artifacts\Debug\Az.KeyVault\Az.KeyVault.psd1' was not processed because no valid module was found in any module directory.
 ---> System.IO.FileNotFoundException: The module to process './Az.KeyVault.Extension', listed in field 'NestedModules' of module manifest 'C:\Users\*****\source\repos\azure\azure-powershell\artifacts\Debug\Az.KeyVault\Az.KeyVault.psd1' was not processed because no valid module was found in any module directory.
   --- End of inner exception stack trace ---
   at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModuleManifest(String moduleManifestPath, ExternalScriptInfo manifestScriptInfo, Hashtable data, Hashtable localizedData, ManifestProcessingFlags manifestProcessingFlags, Version minimumVersion, Version maximumVersion, Version requiredVersion, Nullable`1 requiredModuleGuid, ImportModuleOptions& options, Boolean& containedErrors)
   at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModuleManifest(ExternalScriptInfo scriptInfo, ManifestProcessingFlags manifestProcessingFlags, Version minimumVersion, Version maximumVersion, Version requiredVersion, Nullable`1 requiredModuleGuid, ImportModuleOptions& options)
   at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(PSModuleInfo parentModule, String fileName, String moduleBase, String prefix, SessionState ss, Object privateData, ImportModuleOptions& options, ManifestProcessingFlags manifestProcessingFlags, Boolean& found, Boolean& moduleFileFound)
   at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(String fileName, String moduleBase, String prefix, SessionState ss, ImportModuleOptions& options, ManifestProcessingFlags manifestProcessingFlags, Boolean& found)
   at Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName(ImportModuleOptions importModuleOptions, String name)

@VeryEarly
Copy link
Collaborator

it looks like dependency in your local was not built properly.

Please try below and record test again:

.\tools\buildScripts\buildModules.ps1 -TargetModule NetAppFiles

@NoriZC
Copy link
Contributor

NoriZC commented Apr 7, 2025

/azp run

1 similar comment
@VeryEarly
Copy link
Collaborator

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

1 similar comment
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@audunn
Copy link
Member Author

audunn commented Apr 7, 2025

/azp run

Copy link
Contributor

Commenter does not have sufficient privileges for PR 27360 in repo Azure/azure-powershell

@audunn
Copy link
Member Author

audunn commented Apr 7, 2025

@VeryEarly for some reason this did not work in the first go but did after re-trying and re-building. I cannot run pipeline can you run it to verify?

@dolauli
Copy link
Contributor

dolauli commented Apr 8, 2025

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@audunn
Copy link
Member Author

audunn commented Apr 8, 2025

@VeryEarly Still fails in pipeline but works in local. Seems like the error is in Set-AzKeyVaultAccessPolicy calling Graph client
We need help to resolve this as this is cause massive delays.

EXEC : PowerShell error Record: Unable to find a matching HTTP request for URL 'POST /v1.0/directoryObjects/microsoft.graph.getByIds'. Calling method Item(). [D:\a\_work\1\s\build.proj]
  Exception:System.Collections.Generic.KeyNotFoundException: Unable to find a matching HTTP request for URL 'POST /v1.0/directoryObjects/microsoft.graph.getByIds'. Calling method Item().
      at Microsoft.Azure.Commands.TestFx.Recorder.Records.get_Item(String key) in D:\a\_work\1\s\tools\TestFx\Recorder\Records.cs:line 53
      at Microsoft.Azure.Test.HttpRecorder.HttpMockServer.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in D:\a\_work\1\s\tools\TestFx\DelegatingHandlers\HttpMockServer.cs:line 138
      at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
      at Microsoft.Azure.Commands.Common.MSGraph.Version1_0.DirectoryObjects.DirectoryObjectsOperations.GetByIdsWithHttpMessagesAsync(Body body, Dictionary`2 customHeaders, CancellationToken cancellationToken)
      at Microsoft.Azure.Commands.Common.MSGraph.Version1_0.DirectoryObjects.DirectoryObjectsOperationsExtensions.GetByIdsAsync(IDirectoryObjectsOperations operations, Body body, CancellationToken cancellationToken)
      at Microsoft.Azure.Commands.Common.MSGraph.Version1_0.DirectoryObjects.DirectoryObjectsOperationsExtensions.GetByIds(IDirectoryObjectsOperations operations, Body body)
      at Microsoft.Azure.Commands.KeyVault.ModelExtensions.GetObjectsByObjectIds(List`1 objectIds, IMicrosoftGraphClient graphClient) in D:\a\_work\1\s\src\KeyVault\KeyVault\Models\ModelExtensions.cs:line 199
      at Microsoft.Azure.Commands.KeyVault.ModelExtensions.ToPSKeyVaultAccessPolicies(IEnumerable`1 accessPolicies, IMicrosoftGraphClient graphClient) in D:\a\_work\1\s\src\KeyVault\KeyVault\Models\ModelExtensions.cs:line 243
      at Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault..ctor(Vault vault, IMicrosoftGraphClient graphClient) in D:\a\_work\1\s\src\KeyVault\KeyVault\Models\PSKeyVault.cs:line 51
      at Microsoft.Azure.Commands.KeyVault.Models.VaultManagementClient.UpdateVault(PSKeyVault existingVault, PSKeyVaultAccessPolicy[] updatedPolicies, Nullable`1 updatedEnabledForDeployment, Nullable`1 updatedEnabledForTemplateDeployment, Nullable`1 updatedEnabledForDiskEncryption, Nullable`1 updatedSoftDeleteSwitch, Nullable`1 updatedPurgeProtectionSwitch, Nullable`1 updatedRbacAuthorization, Nullable`1 softDeleteRetentionInDays, PSKeyVaultNetworkRuleSet updatedNetworkAcls, IMicrosoftGraphClient graphClient) in D:\a\_work\1\s\src\KeyVault\KeyVault\Models\Client\VaultManagementClient.cs:line 302
      at Microsoft.Azure.Commands.KeyVault.SetAzureKeyVaultAccessPolicy.ExecuteCmdlet() in D:\a\_work\1\s\src\KeyVault\KeyVault\Commands\SetAzureKeyVaultAccessPolicy.cs:line 558
      at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.<>c__3`1.<ExecuteSynchronouslyOrAsJob>b__3_0(T c)
      at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet, Action`1 executor)
      at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet)
      at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
  Details:
  Script Stack Trace: at Test-AccountCMK, D:\a\_work\1\s\src\NetAppFiles\NetAppFiles.Test\bin\Debug\net8.0\ScenarioTests\AccountTests.ps1: line 276


@VeryEarly
Copy link
Collaborator

@VeryEarly Still fails in pipeline but works in local. Seems like the error is in Set-AzKeyVaultAccessPolicy calling Graph client We need help to resolve this as this is cause massive delays.

EXEC : PowerShell error Record: Unable to find a matching HTTP request for URL 'POST /v1.0/directoryObjects/microsoft.graph.getByIds'. Calling method Item(). [D:\a\_work\1\s\build.proj]
  Exception:System.Collections.Generic.KeyNotFoundException: Unable to find a matching HTTP request for URL 'POST /v1.0/directoryObjects/microsoft.graph.getByIds'. Calling method Item().
      at Microsoft.Azure.Commands.TestFx.Recorder.Records.get_Item(String key) in D:\a\_work\1\s\tools\TestFx\Recorder\Records.cs:line 53
      at Microsoft.Azure.Test.HttpRecorder.HttpMockServer.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in D:\a\_work\1\s\tools\TestFx\DelegatingHandlers\HttpMockServer.cs:line 138
      at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
      at Microsoft.Azure.Commands.Common.MSGraph.Version1_0.DirectoryObjects.DirectoryObjectsOperations.GetByIdsWithHttpMessagesAsync(Body body, Dictionary`2 customHeaders, CancellationToken cancellationToken)
      at Microsoft.Azure.Commands.Common.MSGraph.Version1_0.DirectoryObjects.DirectoryObjectsOperationsExtensions.GetByIdsAsync(IDirectoryObjectsOperations operations, Body body, CancellationToken cancellationToken)
      at Microsoft.Azure.Commands.Common.MSGraph.Version1_0.DirectoryObjects.DirectoryObjectsOperationsExtensions.GetByIds(IDirectoryObjectsOperations operations, Body body)
      at Microsoft.Azure.Commands.KeyVault.ModelExtensions.GetObjectsByObjectIds(List`1 objectIds, IMicrosoftGraphClient graphClient) in D:\a\_work\1\s\src\KeyVault\KeyVault\Models\ModelExtensions.cs:line 199
      at Microsoft.Azure.Commands.KeyVault.ModelExtensions.ToPSKeyVaultAccessPolicies(IEnumerable`1 accessPolicies, IMicrosoftGraphClient graphClient) in D:\a\_work\1\s\src\KeyVault\KeyVault\Models\ModelExtensions.cs:line 243
      at Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault..ctor(Vault vault, IMicrosoftGraphClient graphClient) in D:\a\_work\1\s\src\KeyVault\KeyVault\Models\PSKeyVault.cs:line 51
      at Microsoft.Azure.Commands.KeyVault.Models.VaultManagementClient.UpdateVault(PSKeyVault existingVault, PSKeyVaultAccessPolicy[] updatedPolicies, Nullable`1 updatedEnabledForDeployment, Nullable`1 updatedEnabledForTemplateDeployment, Nullable`1 updatedEnabledForDiskEncryption, Nullable`1 updatedSoftDeleteSwitch, Nullable`1 updatedPurgeProtectionSwitch, Nullable`1 updatedRbacAuthorization, Nullable`1 softDeleteRetentionInDays, PSKeyVaultNetworkRuleSet updatedNetworkAcls, IMicrosoftGraphClient graphClient) in D:\a\_work\1\s\src\KeyVault\KeyVault\Models\Client\VaultManagementClient.cs:line 302
      at Microsoft.Azure.Commands.KeyVault.SetAzureKeyVaultAccessPolicy.ExecuteCmdlet() in D:\a\_work\1\s\src\KeyVault\KeyVault\Commands\SetAzureKeyVaultAccessPolicy.cs:line 558
      at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.<>c__3`1.<ExecuteSynchronouslyOrAsJob>b__3_0(T c)
      at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet, Action`1 executor)
      at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet)
      at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
  Details:
  Script Stack Trace: at Test-AccountCMK, D:\a\_work\1\s\src\NetAppFiles\NetAppFiles.Test\bin\Debug\net8.0\ScenarioTests\AccountTests.ps1: line 276

Hi @audunn ,
My bad. Didn't realize this is a data plane cmdlet which cannot be recorded in our test framework for now, I'll mark this new testcase as liveonly (which means it was verified in your local but cannot be record/playback in pr validation). Please let me know if you have concerns.

@VeryEarly
Copy link
Collaborator

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@audunn
Copy link
Member Author

audunn commented Apr 8, 2025

Hi @audunn ,
My bad. Didn't realize this is a data plane cmdlet which cannot be recorded in our test framework for now, I'll mark this new testcase as liveonly (which means it was verified in your local but cannot be record/playback in pr validation). Please let me know if you have concerns.

@VeryEarly Sounds good to me, no concerns. Thank you

@VeryEarly VeryEarly merged commit 0c90114 into Azure:main Apr 8, 2025
12 checks passed
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.

6 participants