Skip to content

Generated Confluent Azure Powershell cmdlets#29151

Draft
Shekar2004 wants to merge 2 commits intoAzure:mainfrom
Shekar2004:users/pgnanashekar/ConnectorPSH
Draft

Generated Confluent Azure Powershell cmdlets#29151
Shekar2004 wants to merge 2 commits intoAzure:mainfrom
Shekar2004:users/pgnanashekar/ConnectorPSH

Conversation

@Shekar2004
Copy link
Member

Description

Connector Management Support for Azure Confluent Module
This PR adds support for Confluent Connector management operations in the Az.Confluent PowerShell module. The changes include new cmdlets for creating, retrieving, updating, and deleting Confluent connectors within organizations, environments, and clusters.

Related API Version: 2025-08-18-preview

Changes Made:

  1. Updated Swagger Specification:
    Updated commit reference from a71245db9eb5b27e3d95f266422c65be4df8789e to da3e3a42110d96609505c4bcb5b4d768341203a8 in Readme.md

  2. Added support for connector resource types under organizations/environments/clusters hierarchy
    New Cmdlets:

  • New-AzConfluentConnector - Create a new Confluent connector
  • Get-AzConfluentConnector - Retrieve connector details
  • Remove-AzConfluentConnector - Delete a connector
  • Update-AzConfluentConnector - Update connector configuration
  • Set-AzConfluentConnector - Set connector state
  1. Documentation Updates:
  • Added examples and parameter descriptions for all connector cmdlets
  • Updated help markdown files with real-world usage examples
  • Examples include Azure Blob Storage Source connector scenarios
  1. Test Coverage:
  • Added Pester tests for connector CRUD operations
  • Updated test utilities with connector-specific environment variables
  • Recording files generated for all connector operations
  1. UX Metadata:
    Generated UX JSON files for Azure Portal integration

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • 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.
    • 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

Copilot AI review requested due to automatic review settings February 7, 2026 07:19
@azure-client-tools-bot-prd
Copy link

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Confluent Connector management support to the Az.Confluent module by updating the API spec reference, generating new cmdlets/docs/UX metadata, and introducing (mostly stubbed) Pester test scaffolding and recordings.

Changes:

  • Updated AutoRest configuration to target 2025-08-18-preview via a new swagger/spec commit.
  • Generated/updated cmdlet help docs and examples for new Confluent organization/environment/cluster/connector operations.
  • Added Pester tests + recordings and updated test environment utilities for connector scenarios.

Reviewed changes

Copilot reviewed 155 out of 175 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
src/Confluent/Confluent/help/Get-AzConfluentOrganizationEnvironment.md Adds help stub for environment retrieval/listing.
src/Confluent/Confluent/help/Get-AzConfluentOrganizationClusterApiKey.md Adds help stub for cluster API key retrieval.
src/Confluent/Confluent/help/Get-AzConfluentOrganization.md Refines parameter descriptions (ResourceGroupName/SubscriptionId).
src/Confluent/Confluent/help/Get-AzConfluentMarketplaceAgreement.md Refines SubscriptionId description.
src/Confluent/Confluent/help/Get-AzConfluentAccessUser.md Adds help stub for access user listing.
src/Confluent/Confluent/help/Get-AzConfluentAccessInvitation.md Adds help stub for access invitation listing.
src/Confluent/Confluent/help/Get-AzConfluentAccessEnvironment.md Adds help stub for access environment listing.
src/Confluent/Confluent/help/Get-AzConfluentAccessCluster.md Adds help stub for access cluster listing.
src/Confluent/Confluent/help/Az.Confluent.md Updates module help index to include newly generated cmdlets.
src/Confluent/Confluent/ChangeLog.md Adds release notes for connector management + API version/spec commit updates.
src/Confluent/Confluent/Az.Confluent.psd1 Updates required Az.Accounts version and exported function list.
src/Confluent/Confluent.sln Updates the Az.Confluent project GUID mapping in the solution.
src/Confluent/Confluent.Autorest/test/utils.ps1 Adds connector-specific env vars used by tests.
src/Confluent/Confluent.Autorest/test/env.json Updates recorded test environment values for connector scenarios.
src/Confluent/Confluent.Autorest/test/Update-AzConfluentTopic.Tests.ps1 Adds (skipped) test scaffold for topic update.
src/Confluent/Confluent.Autorest/test/Update-AzConfluentConnector.Tests.ps1 Adds (skipped) test scaffold for connector update.
src/Confluent/Confluent.Autorest/test/Test-AzConfluentValidationOrganizationV2.Tests.ps1 Adds (skipped) test scaffold for validation v2.
src/Confluent/Confluent.Autorest/test/Test-AzConfluentValidationOrganization.Tests.ps1 Adds (skipped) test scaffold for validation.
src/Confluent/Confluent.Autorest/test/Set-AzConfluentEnvironment.Tests.ps1 Adds (skipped) test scaffold for environment set.
src/Confluent/Confluent.Autorest/test/Set-AzConfluentConnector.Tests.ps1 Adds (skipped) test scaffold for connector set.
src/Confluent/Confluent.Autorest/test/Set-AzConfluentCluster.Tests.ps1 Adds (skipped) test scaffold for cluster set.
src/Confluent/Confluent.Autorest/test/Remove-AzConfluentTopic.Tests.ps1 Adds (skipped) test scaffold for topic removal.
src/Confluent/Confluent.Autorest/test/Remove-AzConfluentOrganizationClusterApiKey.Tests.ps1 Adds (skipped) test scaffold for API key removal.
src/Confluent/Confluent.Autorest/test/Remove-AzConfluentEnvironment.Tests.ps1 Adds (skipped) test scaffold for environment removal.
src/Confluent/Confluent.Autorest/test/Remove-AzConfluentConnector.Tests.ps1 Adds a non-skipped connector delete test (with timeout swallowing).
src/Confluent/Confluent.Autorest/test/Remove-AzConfluentConnector.Recording.json Adds recording for connector delete request/response.
src/Confluent/Confluent.Autorest/test/Remove-AzConfluentCluster.Tests.ps1 Adds (skipped) test scaffold for cluster removal.
src/Confluent/Confluent.Autorest/test/Remove-AzConfluentAccessRoleBinding.Tests.ps1 Adds (skipped) test scaffold for role binding removal.
src/Confluent/Confluent.Autorest/test/README.md Fixes relative path formatting in test README.
src/Confluent/Confluent.Autorest/test/New-AzConfluentTopic.Tests.ps1 Adds (skipped) test scaffold for topic create.
src/Confluent/Confluent.Autorest/test/New-AzConfluentOrganizationApiKey.Tests.ps1 Adds (skipped) test scaffold for API key create.
src/Confluent/Confluent.Autorest/test/New-AzConfluentEnvironment.Tests.ps1 Adds (skipped) test scaffold for environment create.
src/Confluent/Confluent.Autorest/test/New-AzConfluentConnector.Tests.ps1 Adds a non-skipped connector create test (with timeout swallowing).
src/Confluent/Confluent.Autorest/test/New-AzConfluentCluster.Tests.ps1 Adds (skipped) test scaffold for cluster create.
src/Confluent/Confluent.Autorest/test/New-AzConfluentAccessRoleBinding.Tests.ps1 Adds (skipped) test scaffold for role binding create.
src/Confluent/Confluent.Autorest/test/Invoke-AzConfluentInviteAccessUser.Tests.ps1 Adds (skipped) test scaffold for invite operation.
src/Confluent/Confluent.Autorest/test/Get-AzConfluentTopic.Tests.ps1 Adds (skipped) test scaffold for topic get/list.
src/Confluent/Confluent.Autorest/test/Get-AzConfluentOrganizationSchemaRegistryCluster.Tests.ps1 Adds (skipped) test scaffold for schema registry cluster get/list.
src/Confluent/Confluent.Autorest/test/Get-AzConfluentOrganizationRegion.Tests.ps1 Adds (skipped) test scaffold for region listing.
src/Confluent/Confluent.Autorest/test/Get-AzConfluentOrganizationEnvironment.Tests.ps1 Adds (skipped) test scaffold for environment get/list.
src/Confluent/Confluent.Autorest/test/Get-AzConfluentOrganizationClusterApiKey.Tests.ps1 Adds (skipped) test scaffold for cluster API key get.
src/Confluent/Confluent.Autorest/test/Get-AzConfluentOrganizationCluster.Tests.ps1 Adds (skipped) test scaffold for cluster get/list.
src/Confluent/Confluent.Autorest/test/Get-AzConfluentMarketplaceAgreement.Recording.json Updates recording to preview API version and new subscription.
src/Confluent/Confluent.Autorest/test/Get-AzConfluentConnector.Tests.ps1 Adds non-skipped connector get test (with timeout swallowing).
src/Confluent/Confluent.Autorest/test/Get-AzConfluentConnector.Recording.json Adds connector get recording (currently a 500 response).
src/Confluent/Confluent.Autorest/test/Get-AzConfluentAccessUser.Tests.ps1 Adds (skipped) test scaffold for access users.
src/Confluent/Confluent.Autorest/test/Get-AzConfluentAccessServiceAccount.Tests.ps1 Adds (skipped) test scaffold for service accounts.
src/Confluent/Confluent.Autorest/test/Get-AzConfluentAccessRoleBindingNameList.Tests.ps1 Adds (skipped) test scaffold for role binding name list.
src/Confluent/Confluent.Autorest/test/Get-AzConfluentAccessRoleBinding.Tests.ps1 Adds (skipped) test scaffold for role bindings.
src/Confluent/Confluent.Autorest/test/Get-AzConfluentAccessInvitation.Tests.ps1 Adds (skipped) test scaffold for invitations.
src/Confluent/Confluent.Autorest/test/Get-AzConfluentAccessEnvironment.Tests.ps1 Adds (skipped) test scaffold for environments.
src/Confluent/Confluent.Autorest/test/Get-AzConfluentAccessCluster.Tests.ps1 Adds (skipped) test scaffold for clusters.
src/Confluent/Confluent.Autorest/resources/README.md Fixes relative path formatting in resources README.
src/Confluent/Confluent.Autorest/generate-info.json Updates generation ID.
src/Confluent/Confluent.Autorest/examples/Update-AzConfluentTopic.md Adds placeholder examples for topic update.
src/Confluent/Confluent.Autorest/examples/Update-AzConfluentConnector.md Adds a concrete example for connector update.
src/Confluent/Confluent.Autorest/examples/Test-AzConfluentValidationOrganizationV2.md Adds placeholder examples for validation v2.
src/Confluent/Confluent.Autorest/examples/Test-AzConfluentValidationOrganization.md Adds placeholder examples for validation.
src/Confluent/Confluent.Autorest/examples/Set-AzConfluentEnvironment.md Adds placeholder examples for environment set.
src/Confluent/Confluent.Autorest/examples/Set-AzConfluentConnector.md Adds a concrete example for connector set.
src/Confluent/Confluent.Autorest/examples/Set-AzConfluentCluster.md Adds placeholder examples for cluster set.
src/Confluent/Confluent.Autorest/examples/Remove-AzConfluentTopic.md Adds placeholder examples for topic removal.
src/Confluent/Confluent.Autorest/examples/Remove-AzConfluentOrganizationClusterApiKey.md Adds placeholder examples for API key removal.
src/Confluent/Confluent.Autorest/examples/Remove-AzConfluentEnvironment.md Adds placeholder examples for environment removal.
src/Confluent/Confluent.Autorest/examples/Remove-AzConfluentConnector.md Adds a concrete example for connector removal.
src/Confluent/Confluent.Autorest/examples/Remove-AzConfluentCluster.md Adds placeholder examples for cluster removal.
src/Confluent/Confluent.Autorest/examples/Remove-AzConfluentAccessRoleBinding.md Adds placeholder examples for role binding removal.
src/Confluent/Confluent.Autorest/examples/New-AzConfluentTopic.md Adds placeholder examples for topic creation.
src/Confluent/Confluent.Autorest/examples/New-AzConfluentOrganizationApiKey.md Adds placeholder examples for API key creation.
src/Confluent/Confluent.Autorest/examples/New-AzConfluentEnvironment.md Adds placeholder examples for environment creation.
src/Confluent/Confluent.Autorest/examples/New-AzConfluentConnector.md Adds a concrete example + sample output for connector creation.
src/Confluent/Confluent.Autorest/examples/New-AzConfluentCluster.md Adds placeholder examples for cluster creation.
src/Confluent/Confluent.Autorest/examples/New-AzConfluentAccessRoleBinding.md Adds placeholder examples for role binding creation.
src/Confluent/Confluent.Autorest/examples/Invoke-AzConfluentInviteAccessUser.md Adds placeholder examples for invite operation.
src/Confluent/Confluent.Autorest/examples/Get-AzConfluentTopic.md Adds placeholder examples for topic get.
src/Confluent/Confluent.Autorest/examples/Get-AzConfluentOrganizationSchemaRegistryCluster.md Adds placeholder examples for schema registry cluster get.
src/Confluent/Confluent.Autorest/examples/Get-AzConfluentOrganizationRegion.md Adds placeholder examples for region listing.
src/Confluent/Confluent.Autorest/examples/Get-AzConfluentOrganizationEnvironment.md Adds placeholder examples for environment get.
src/Confluent/Confluent.Autorest/examples/Get-AzConfluentOrganizationClusterApiKey.md Adds placeholder examples for API key get.
src/Confluent/Confluent.Autorest/examples/Get-AzConfluentOrganizationCluster.md Adds placeholder examples for cluster get.
src/Confluent/Confluent.Autorest/examples/Get-AzConfluentConnector.md Adds a concrete example for connector get.
src/Confluent/Confluent.Autorest/examples/Get-AzConfluentAccessUser.md Adds placeholder examples for access users.
src/Confluent/Confluent.Autorest/examples/Get-AzConfluentAccessServiceAccount.md Adds placeholder examples for service accounts.
src/Confluent/Confluent.Autorest/examples/Get-AzConfluentAccessRoleBindingNameList.md Adds placeholder examples for role binding name list.
src/Confluent/Confluent.Autorest/examples/Get-AzConfluentAccessRoleBinding.md Adds placeholder examples for role bindings.
src/Confluent/Confluent.Autorest/examples/Get-AzConfluentAccessInvitation.md Adds placeholder examples for invitations.
src/Confluent/Confluent.Autorest/examples/Get-AzConfluentAccessEnvironment.md Adds placeholder examples for environments.
src/Confluent/Confluent.Autorest/examples/Get-AzConfluentAccessCluster.md Adds placeholder examples for clusters.
src/Confluent/Confluent.Autorest/docs/Update-AzConfluentOrganization.md Improves casing and parameter descriptions.
src/Confluent/Confluent.Autorest/docs/Remove-AzConfluentOrganizationClusterApiKey.md Adds generated cmdlet docs with placeholder examples.
src/Confluent/Confluent.Autorest/docs/Remove-AzConfluentAccessRoleBinding.md Adds generated cmdlet docs with placeholder examples.
src/Confluent/Confluent.Autorest/docs/README.md Fixes relative path formatting in docs README.
src/Confluent/Confluent.Autorest/docs/New-AzConfluentOrganization.md Adds new parameters and improves parameter descriptions.
src/Confluent/Confluent.Autorest/docs/Get-AzConfluentOrganizationEnvironment.md Adds generated cmdlet docs with placeholder examples.
src/Confluent/Confluent.Autorest/docs/Get-AzConfluentOrganizationClusterApiKey.md Adds generated cmdlet docs with placeholder examples.
src/Confluent/Confluent.Autorest/docs/Get-AzConfluentOrganization.md Improves ResourceGroupName/SubscriptionId descriptions.
src/Confluent/Confluent.Autorest/docs/Get-AzConfluentMarketplaceAgreement.md Improves SubscriptionId description.
src/Confluent/Confluent.Autorest/docs/Get-AzConfluentAccessUser.md Adds generated cmdlet docs with placeholder examples.
src/Confluent/Confluent.Autorest/docs/Get-AzConfluentAccessRoleBinding.md Adds generated cmdlet docs with placeholder examples.
src/Confluent/Confluent.Autorest/docs/Get-AzConfluentAccessInvitation.md Adds generated cmdlet docs with placeholder examples.
src/Confluent/Confluent.Autorest/docs/Get-AzConfluentAccessEnvironment.md Adds generated cmdlet docs with placeholder examples.
src/Confluent/Confluent.Autorest/docs/Get-AzConfluentAccessCluster.md Adds generated cmdlet docs with placeholder examples.
src/Confluent/Confluent.Autorest/docs/Az.Confluent.md Updates generated cmdlet index (and module GUID).
src/Confluent/Confluent.Autorest/custom/README.md Fixes relative path formatting in custom README.
src/Confluent/Confluent.Autorest/custom/Az.Confluent.custom.psm1 Updates paths to be more cross-platform friendly.
src/Confluent/Confluent.Autorest/UX/Microsoft.Confluent/organizations.json Updates UX apiVersion to preview.
src/Confluent/Confluent.Autorest/UX/Microsoft.Confluent/organizations-environments.json Adds UX metadata for org/environments commands.
src/Confluent/Confluent.Autorest/UX/Microsoft.Confluent/organizations-environments-schemaRegistryClusters.json Adds UX metadata for schema registry clusters.
src/Confluent/Confluent.Autorest/UX/Microsoft.Confluent/organizations-environments-clusters.json Adds UX metadata for clusters + cluster deletion.
src/Confluent/Confluent.Autorest/UX/Microsoft.Confluent/organizations-environments-clusters-topics.json Adds UX metadata for topics under clusters.
src/Confluent/Confluent.Autorest/UX/Microsoft.Confluent/organizations-environments-clusters-connectors.json Adds UX metadata for connectors under clusters.
src/Confluent/Confluent.Autorest/UX/Microsoft.Confluent/organizations-deleteRoleBinding.json Adds UX metadata for role binding delete action.
src/Confluent/Confluent.Autorest/UX/Microsoft.Confluent/organizations-apiKeys.json Adds UX metadata for org API key get/remove.
src/Confluent/Confluent.Autorest/README.md Updates spec commit and switches to spec repo readme-based configuration.
src/Confluent/Confluent.Autorest/Properties/AssemblyInfo.cs Bumps assembly version to 0.3.0.


## EXAMPLES

### Example 1: {{ Add title here }}
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

The help file still contains template placeholders for examples (titles/code/output/description). These should be replaced with at least one real, runnable example (or the placeholder example sections removed) so published help isn’t shipped with “{{ Add ... }}” content.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,22 @@
### Example 1: {{ Add title here }}
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

The examples file is still boilerplate. Since these examples are used to generate user-facing cmdlet help, please replace the placeholders with a real scenario or remove the empty examples file to avoid shipping incomplete docs.

Copilot uses AI. Check for mistakes.
- New cmdlet `Update-AzConfluentConnector` to update connector configuration
- New cmdlet `Set-AzConfluentConnector` to manage connector state
* Updated to API version 2025-08-18-preview
* Updated swagger specification commit to da3e3a42110d96609505c4bcb5b4d768341203a8
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

ChangeLog.md is user-facing; “Updated swagger specification commit …” is mostly an implementation detail and not very actionable for users. Consider rephrasing this entry to focus on user impact (for example, “Updated underlying REST API specification to support connector management”) and, if available, add a related GitHub issue reference.

Suggested change
* Updated swagger specification commit to da3e3a42110d96609505c4bcb5b4d768341203a8
* Updated underlying REST API specification to align connector operations with the latest Confluent service behavior

Copilot uses AI. Check for mistakes.

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '4.2.0'; })
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '5.3.2'; })
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

Raising the minimum required Az.Accounts version can be a breaking change for users who have older Az installs. If the new cmdlets don’t strictly require 5.3.2, consider keeping the previous minimum (or setting to the repo-wide minimum supported Az.Accounts version) to preserve compatibility.

Copilot uses AI. Check for mistakes.
Comment on lines +47 to +50
commit: da3e3a42110d96609505c4bcb5b4d768341203a8
require:
- $(this-folder)/../../readme.azure.noprofile.md
# lock the commit
input-file:
- $(repo)/specification/confluent/resource-manager/Microsoft.Confluent/stable/2020-03-01/confluent.json
- $(repo)/specification/confluent/resource-manager/readme.md
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

module-version: 0.2.0 looks out of sync with the assembly version bump to 0.3.0 in this PR. If the module version is intended to change, align the AutoRest module-version, assembly version, and changelog/versioning scheme to avoid confusing package/version outputs.

Copilot uses AI. Check for mistakes.
"Content-Type": [ "application/json" ],
"Expires": [ "-1" ]
},
"Content": "{\"error\":{\"code\":\"RP Internal Server Error\",\"message\":\"Error occured while getting connector Resource with name testConnSrc-y07jl4. Please Verify the entered resource details or try again!!\"}}",
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

The recording for Get-AzConfluentConnector captured an HTTP 500 “Internal Server Error”. In playback, this will replay the failure and likely cause the test to fail (since the test expects no throw). Please re-record with a successful response (or update the test to explicitly assert the expected error behavior if failures are the intent).

Copilot uses AI. Check for mistakes.
"Expires": [ "-1" ]
},
"Content": "bnVsbA==",
"isContentBase64": false
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

The response body appears to be base64 (bnVsbA== decodes to null), but isContentBase64 is set to false. This mismatch can break playback/deserialization (the framework will treat bnVsbA== as literal JSON). Please fix the recording to either store Content as null/"null" with isContentBase64: false, or set isContentBase64: true with the base64 payload.

Suggested change
"isContentBase64": false
"isContentBase64": true

Copilot uses AI. Check for mistakes.
Comment on lines +19 to +31
{
try {
New-AzConfluentConnector -Name $env.connectorName -ResourceGroupName $env.connectorResourceGroup -OrganizationName $env.connectorOrganization -EnvironmentId $env.connectorEnvironmentId -ClusterId $env.connectorClusterId -SubscriptionId $env.SubscriptionId -ConnectorBasicInfoConnectorClass $env.connectorClass -ConnectorBasicInfoConnectorName $env.connectorName -ConnectorBasicInfoConnectorType $env.connectorType -ConnectorServiceTypeInfoConnectorServiceType $env.connectorServiceType -PartnerConnectorInfoPartnerConnectorType $env.connectorPartnerType
}
catch {
if ($_.Exception.Message -match "HttpClient.Timeout") {
Write-Host "Received 'Timeout' response"
}
else {
throw $_
}
}
} | Should -Not -Throw
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

The test treats timeouts as success, which can mask real failures and produce false positives (especially in CI). Prefer to either (1) fail on timeout, or (2) implement a bounded retry with an assertion that the cmdlet eventually succeeds, and validate the returned object/state rather than only asserting “no throw”.

Suggested change
{
try {
New-AzConfluentConnector -Name $env.connectorName -ResourceGroupName $env.connectorResourceGroup -OrganizationName $env.connectorOrganization -EnvironmentId $env.connectorEnvironmentId -ClusterId $env.connectorClusterId -SubscriptionId $env.SubscriptionId -ConnectorBasicInfoConnectorClass $env.connectorClass -ConnectorBasicInfoConnectorName $env.connectorName -ConnectorBasicInfoConnectorType $env.connectorType -ConnectorServiceTypeInfoConnectorServiceType $env.connectorServiceType -PartnerConnectorInfoPartnerConnectorType $env.connectorPartnerType
}
catch {
if ($_.Exception.Message -match "HttpClient.Timeout") {
Write-Host "Received 'Timeout' response"
}
else {
throw $_
}
}
} | Should -Not -Throw
$maxAttempts = 3
$attempt = 0
$result = $null
$succeeded = $false
while (-not $succeeded -and $attempt -lt $maxAttempts) {
$attempt++
try {
$result = New-AzConfluentConnector -Name $env.connectorName -ResourceGroupName $env.connectorResourceGroup -OrganizationName $env.connectorOrganization -EnvironmentId $env.connectorEnvironmentId -ClusterId $env.connectorClusterId -SubscriptionId $env.SubscriptionId -ConnectorBasicInfoConnectorClass $env.connectorClass -ConnectorBasicInfoConnectorName $env.connectorName -ConnectorBasicInfoConnectorType $env.connectorType -ConnectorServiceTypeInfoConnectorServiceType $env.connectorServiceType -PartnerConnectorInfoPartnerConnectorType $env.connectorPartnerType
$succeeded = $true
}
catch {
if ($_.Exception.Message -match "HttpClient.Timeout" -and $attempt -lt $maxAttempts) {
Write-Host "Attempt $attempt received 'Timeout' response. Retrying..."
Start-Sleep -Seconds 5
}
else {
throw
}
}
}
$succeeded | Should -BeTrue
$result | Should -Not -BeNullOrEmpty

Copilot uses AI. Check for mistakes.
Comment on lines +17 to +28
Describe 'Update-AzConfluentConnector' {
It 'UpdateExpanded' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}

It 'UpdateViaIdentityOrganizationExpanded' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}

It 'UpdateViaIdentityEnvironmentExpanded' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

These tests are permanently skipped and don’t validate connector update behavior, even though the PR introduces/advertises connector management cmdlets. Please add at least one non-skipped playback test that exercises Update-AzConfluentConnector (and similarly for Set-*) and asserts on a meaningful outcome (response properties or subsequent Get-* state).

Copilot uses AI. Check for mistakes.
Comment on lines +9 to +13
$currentPath = $PSScriptRoot
while(-not $mockingPath) {
$mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File
$currentPath = Split-Path -Path $currentPath -Parent
}
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

This loop can become infinite if HttpPipelineMocking.ps1 is not found (at filesystem root, Split-Path -Parent stops changing). Add a termination condition (for example, break when $currentPath no longer changes / is empty) and throw a clear error if the mocking script can’t be located.

Suggested change
$currentPath = $PSScriptRoot
while(-not $mockingPath) {
$mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File
$currentPath = Split-Path -Path $currentPath -Parent
}
$mockingPath = $null
$currentPath = $PSScriptRoot
$previousPath = $null
while(-not $mockingPath -and $currentPath -and $currentPath -ne $previousPath) {
$mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File -ErrorAction SilentlyContinue
$previousPath = $currentPath
$currentPath = Split-Path -Path $currentPath -Parent
}
if (-not $mockingPath) {
throw "HttpPipelineMocking.ps1 could not be found starting from path '$PSScriptRoot'. Ensure the test mocking script is available."
}

Copilot uses AI. Check for mistakes.
@isra-fel
Copy link
Member

isra-fel commented Feb 7, 2026

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

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.

2 participants