-
Notifications
You must be signed in to change notification settings - Fork 1.5k
update connectedk8s CLI Extension for Compatibility with API 2025-08-01-preview #9086
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
update connectedk8s CLI Extension for Compatibility with API 2025-08-01-preview #9086
Conversation
* forcedelete * format * add code owner * mypy
* Add parameterization for the airgapped clouds * Fix azdev style * MCR path function * azdev, ruff, and mypy --------- Co-authored-by: Matthew McNeal (from Dev Box) <[email protected]>
Co-authored-by: mmcneal <[email protected]>
* update errors * format * style
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Hi @bavneetsingh16, |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
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.
Pull Request Overview
This PR updates the connectedk8s CLI extension to be compatible with API version 2025-08-01-preview, which includes code regeneration and addition of comprehensive testing infrastructure.
Key changes include:
- Updated API version from 2024-07-01-preview to 2025-08-01-preview in SDK operations and models
- Added comprehensive testing framework with PowerShell scripts for various connectivity scenarios
- Incremented extension version from 1.10.7 to 1.10.8
Reviewed Changes
Copilot reviewed 56 out of 62 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/connectedk8s/setup.py | Version bump to 1.10.8 |
| src/connectedk8s/azext_connectedk8s/vendored_sdks/preview_2025_08_01/operations/ | Updated operations with new API version and modern code generation patterns |
| src/connectedk8s/azext_connectedk8s/vendored_sdks/preview_2025_08_01/models/ | Regenerated models with updated API schema and improved type annotations |
| testing/ | New comprehensive test suite with PowerShell scripts for various scenarios including onboarding, proxy, gateway, workload identity, and troubleshooting |
| BeforeAll { | ||
| . $PSScriptRoot/../helper/Constants.ps1 | ||
|
|
||
| $SelfHostedIssuer = "https://eastus.oic.prod-aks.azure.com/fc50e82b-3761-4218-8691-d98bcgb146da/e6c4bf03-84d9-480c-a269-37a41c28c5cb/" |
Copilot
AI
Aug 25, 2025
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.
The hardcoded self-hosted issuer URL contains what appears to be real GUIDs. These should be replaced with placeholder values or made configurable to prevent potential security exposure.
| $SelfHostedIssuer = "https://eastus.oic.prod-aks.azure.com/fc50e82b-3761-4218-8691-d98bcgb146da/e6c4bf03-84d9-480c-a269-37a41c28c5cb/" | |
| $SelfHostedIssuer = "https://example.com/{TENANT_ID}/{CLUSTER_ID}/" |
| BeforeAll { | ||
| . $PSScriptRoot/../helper/Constants.ps1 | ||
|
|
||
| $gatewayResourceId = "/subscriptions/15c06b1b-01d6-407b-bb21-740b8617dea3/resourceGroups/connectedk8sCLITestResources/providers/Microsoft.HybridCompute/gateways/gateway-test-cli" |
Copilot
AI
Aug 25, 2025
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.
The hardcoded gateway resource ID contains a real subscription ID. This should be replaced with a placeholder or made configurable to avoid exposing actual Azure subscription information.
| $gatewayResourceId = "/subscriptions/15c06b1b-01d6-407b-bb21-740b8617dea3/resourceGroups/connectedk8sCLITestResources/providers/Microsoft.HybridCompute/gateways/gateway-test-cli" | |
| # Use a placeholder or configurable subscription ID to avoid exposing real Azure subscription information | |
| $gatewaySubscriptionId = $ENVCONFIG.subscriptionId | |
| if (-not $gatewaySubscriptionId) { | |
| $gatewaySubscriptionId = "<subscription-id>" | |
| } | |
| $gatewayResourceId = "/subscriptions/$gatewaySubscriptionId/resourceGroups/connectedk8sCLITestResources/providers/Microsoft.HybridCompute/gateways/gateway-test-cli" |
| CLI_REPO_PATH: $(Agent.BuildDirectory)/s | ||
| EXTENSION_NAME: "connectedk8s" | ||
| EXTENSION_FILE_NAME: "connectedk8s" | ||
| SUBSCRIPTION_ID: "15c06b1b-01d6-407b-bb21-740b8617dea3" |
Copilot
AI
Aug 25, 2025
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.
The subscription ID is hardcoded in the pipeline configuration. This should be parameterized or moved to pipeline variables to avoid exposing actual subscription information in code.
| SUBSCRIPTION_ID: "15c06b1b-01d6-407b-bb21-740b8617dea3" | |
| SUBSCRIPTION_ID: $(SUBSCRIPTION_ID) |
|
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.