Skip to content

Commit 2b07a18

Browse files
domainnameGreedygrezhoxing-msyash-nisardaniv-msft
authored
[ASA] Create workspace-based App Insights (#6993)
* use `try_create_application_insights` in custom * create workspace * create workspace & AI * fix UT * fix UT * fix UT * Add UT * Add History and update version * use `try_create_application_insights` in custom * create workspace * create workspace & AI * fix UT * [containerapp] `az containerapp create/update`: Support --customized-keys and clientType in --bind for dev service (#6939) * add test and add clientType and customized keys * fix test * fix * fix test * add test for yaml * fix * add more tests * fix conflict * fix customizedKey for yaml * address comments * add more comments * add test cases * fix test * Update src/containerapp/azext_containerapp/_params.py Co-authored-by: Xing Zhou <[email protected]> * Update src/containerapp/azext_containerapp/_params.py Co-authored-by: Xing Zhou <[email protected]> --------- Co-authored-by: Xing Zhou <[email protected]> * Introduce App Resiliency & Dapr Component Resiliency (#6967) * Introduce App Resiliency & Dapr Component Resiliency Signed-off-by: Yash Nisar <[email protected]> * Address comments and shorten cli flags Signed-off-by: Yash Nisar <[email protected]> * Code cleanup and address review comments Signed-off-by: Yash Nisar <[email protected]> * Fix param_name output errors Signed-off-by: Yash Nisar <[email protected]> --------- Signed-off-by: Yash Nisar <[email protected]> * [containerapp] Give a better error message when customer uses --artif… (#6983) * [containerapp] Give a better error message when customer uses --artifact with ACR Task * Clarify the error message * Minor update * [containerapp] Release version 0.3.44 (#6972) * [Release] Update index.json for extension [ containerapp ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=106681&view=results Last commit: 5214e29 * Update baremetalinstance version (#6975) * Update baremetalinstance version * Re adding v1.0.0 and updating correct sha * Re-record failing source-to-cloud patch tests (#6984) * [confcom] initial commit of katapolicygen (#6974) * initial commit of katapolicygen * only grab genpolicy from genpolicy tagged releases * fixing tests for pipeline * updating docs with more samples * getting rid of unused links in readme * [Release] Update index.json for extension [ confcom ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=107291&view=results Last commit: cdb3dc6 * Release 2.22.0 ml cli extension (#6992) * "Update index.json with ml cli wheel" * Remove duplicate * [Hilo] Onboard new extension. (#6926) * generate init. * Update test cases and recordings * Format code, * Update test * Update params * Update params. * Add info to CODEOWNER. Update help file. * Update param summary and help file. * Update params file. * Add service name. * Update three examples. * Update examples. * rename command group name. * Update a test case. * Update test * Update test records. * Add two examples. * Update examples and add readme file. * Update examples. * Update a example * Remove create_flink_job_property command. * Remove flink-job-property command help and params. --------- Co-authored-by: v-yuchenli <[email protected]> * [Release] Update index.json for extension [ hdinsightonaks ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=107396&view=results Last commit: 4e30684 * [confcom] taking out print statement (#6994) * taking out print statement * updating docs for new version * [Release] Update index.json for extension [ confcom ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=107772&view=results Last commit: a00ea10 * chore(arcdata): version bump to 1.5.7 (#6991) * Arc Appliance CLI November Release (#7000) Co-authored-by: Sai Sankar Gochhayat <[email protected]> * [az fleet] updated help examples (#6995) * updated fleet help text * bumped version * help text fix * white space * More help text updates. * fleet list example +1 * lint * test recording update * bug fix: return response instead of exception * updated version notes * lint fixes --------- Co-authored-by: pdaru <[email protected]> * [Release] Update index.json for extension [ fleet ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=108315&view=results Last commit: 54c84f1 * Updating examples and SKU description for Elastic (#7002) * Updating examples and SKU description for Elastic * Updating VERSIOn in setup.py * [Release] Update index.json for extension [ elastic ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=108437&view=results Last commit: d7e57d8 * Arc Appliance CLI: 1.0.1 [November Release] [with package bump] (#7003) * Arc Appliance CLI November Release * Updated whl for ArcAppliance Nov drop --------- Co-authored-by: Sai Sankar Gochhayat <[email protected]> * {AKS} 'az aks nodepool update': Update enum for --os-sku to match allowed values. (#6999) * fix UT * fix UT * Add UT * Add History and update version * {AKS} Vendor new SDK and bump API version to 2023-10-02-preview (#7001) * update SDK * update recordings * update API version * update history * Adds IoT Operations extension v0.1.0b2 (#7008) * [Bastion] adding rdp file to temp location and adding auth-type for rdp (#7006) * adding rdp file to temp location and adding auth-type for rdp * fixing some pylint issues * fixing some pylint issues * [Release] Update index.json for extension [ bastion ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=109154&view=results Last commit: 1d9de52 * {CI} Update policy rules (#7009) * Update resourceManagement.yml * Update resourceManagement.yml * {CI} Update pipeline to use Python 3.11 (#7010) * Fix param name fix for disk override (#6998) * [Release] Update index.json for extension [ connectedvmware ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=109664&view=results Last commit: 7ebe379 * {AKS} az aks update: Remove outbound limit in update description (#7014) * {AKS} `az aks update`: force `--network-policy=cilium` whenever `--network-dataplane=cilium` (#7011) * CLI extension for AzureLargeInstance (#6858) * WIP, changed azurelargeinstance to large-instance but commands not working anymore * Added readme and changed command name to large-instance, large-storage-instance * [Release] Update index.json for extension [ azurelargeinstance ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=110005&view=results Last commit: 00a0303 * [Bastion] add auth type password for rdp and fix line formatting issue (#7023) * add auth type password for rdp and fix line formatting issue * bump version * lint * add warning message * lint fix * [Release] Update index.json for extension [ bastion ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=110392&view=results Last commit: a9c1aca * [AKS] Fix for app routing CLI (#6968) * [Release] Update index.json for extension [ aks-preview ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=111118&view=results Last commit: 252de21 * [containerapp] `az containerapp up`: support create or update containerapp on connected env (#7004) * [ContainerApp] Cloud Build Bugfix - 500 Internal Server Error (Wrong env selected to create builder) (#7024) * [Vm-repair] Fix in az vm repair run --preview parameter (#6973) * [Release] Update index.json for extension [ vm-repair ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=111789&view=results Last commit: 3f54159 * bump version 0.3.45 (#7039) * [Release] Update index.json for extension [ containerapp ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=111849&view=results Last commit: 13932e4 * APICenter Extension Initial Release (#6918) * create extension, update examples, remove import/export commands for api center * [Release] Update index.json for extension [ apic-extension ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=111909&view=results Last commit: 33bbf02 * [StreamAnalytics] Remove Experimental (#6796) * [Release] Update index.json for extension [ stream-analytics ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=112209&view=results Last commit: abf377d * Connectedk8s - RBAC: Add "arc "mode in Guard for using OBO service and deprecate --app-id & --app-secret params (#6675) * [Release] Update index.json for extension [ connectedk8s ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=112214&view=results Last commit: a3c96db * removing preview and fixing issue with aad (#7042) * [Release] Update index.json for extension [ bastion ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=112220&view=results Last commit: 8511b68 * [Containerapp] `az containerapp update`: Fix issue for --min-replicas is not set when the value is 0 (#7046) * revert connectedk8s 1.5.5 (#7049) * [Containerapp] `az containerapp create`: Fix BadRequest Error about clientType with --bind (#7045) * Revert "Connectedk8s - RBAC: Add "arc "mode in Guard for using OBO service and deprecate --app-id & --app-secret params" (#7048) * Revert "Connectedk8s - RBAC: Add "arc "mode in Guard for using OBO service and deprecate --app-id & --app-secret params (#6675)" This reverts commit a3c96db. * Update setup.py * Stack-hci-vm 0.1.8 (#7052) * Stack-hci-vm 0.1.8 * Update project url * bump version and revert change in scale rule name (#7053) * [Release] Update index.json for extension [ containerapp ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=112395&view=results Last commit: 2c44907 * {AKS} az aks stop: add warning when private link cluster is stopped (#7019) * [Release] Update index.json for extension [ aks-preview ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=112548&view=results Last commit: 93fee25 * Include azure storage library in vendored_sdks (#6909) * [Release] Update index.json for extension [ aosm ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=112572&view=results Last commit: 57320b1 * {Service Connector}: AAD rebranding and fix sql connection (#7041) * prompt for updating sql user * update version * lint * update * update help * update * [Release] Update index.json for extension [ serviceconnector-passwordless ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=112613&view=results Last commit: 3fdc841 * Adding 0.1.2 version of akshybrid cli to fix kubernetes dependency issue (#7051) * Adding 0.1.2 version of akshybrid cli to fix kubernetes dependency issue * Fixed the extension index * Added the whl file for 1.0.0 version of aksarc cli (renamed from akshybrid) (#7043) * Added the whl file for 1.0.0 version of aksarc cli * Removed isExperimental and isPreview flags * [Logic] `az logic workflow`: Add new command group `identity` to support managing identity (#7029) * [Release] Update index.json for extension [ logic ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=112695&view=results Last commit: 8cf7a07 * `az vmware private-cloud list-admin-credentials` bugfix (#7034) * Fix az vmware private-cloud list-admin-credentials not returning nsxtPassword and vcenterPassword * unit tests * [Release] Update index.json for extension [ vmware ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=112935&view=results Last commit: 03f23d6 * [Spring] API Portal try out & SCG response cache (#6988) * [Release] Update index.json for extension [ spring ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=112954&view=results Last commit: 533e873 * Update response format for aks mesh get upgrades and revisions commands (#7033) * [Quota] Add new commands `az quota request list/show` to support managing quota request (#7005) * quota * update test * additional properties * Update __init__.py * [Release] Update index.json for extension [ quota ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=113223&view=results Last commit: b2fbc2a * Change unversioned image aliases to corresponding URN (#6889) * change removed aliases in test to corresponding urn * revert updates in `scheduled-query` * revert updates in `automanage`, `connection-monitor-preview` * revert updates in `image-gallery` * revert updates in `aem` * fix lookup for custom locations rp sp to use appId instead of displayName (#6982) * Adds IoT Ops extension v0.2.0b1 (#7066) * [az vm repair] Win-run-driver script fix (#7061) * Pk5/fix feature flag bug (#7064) * Remove feature flag which is no longer required * Update changelog and version --------- Co-authored-by: Patryk Kulik <[email protected]> Co-authored-by: Andy Churchard <[email protected]> * {Containerapp} Set test region default to northcentralusstage (#7058) * test * rerun test in test_containerapp_scenario.py * rerun tests * fix test for arc * handle storage account related tests * fix * fix hard code of location * format location before compare * format location * import * [Release] Update index.json for extension [ vm-repair ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=114056&view=results Last commit: 3877c87 * Arc Appliance CLI 1.0.2 December Release (#7072) * Added ArcAppliance december release * Remove 0.2.31, 0.2.32, 0.2.33 from index --------- Co-authored-by: Sai Sankar Gochhayat <[email protected]> * Connectedk8s - RBAC: Add "arc "mode in Guard for using OBO service and deprecate --app-id & --app-secret params (#7057) * [k8s-extension] Update extension CLI to v1.5.3 (#7071) * [Release] Update index.json for extension [ connectedk8s ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=114322&view=results Last commit: fbdae29 * {Attestation} `az attestation signer/policy`: Bump API version from 2022-10-01 to 2022-08-01 (#7059) * update * update * update * update * update * update * update * update * Update azext_metadata.json * update * update * Update custom.py * update * update * update * update * update * Update src/attestation/azext_attestation/aaz/latest/__init__.py * update * update --------- Co-authored-by: kai ru <[email protected]> * [Release] Update index.json for extension [ attestation ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=114340&view=results Last commit: 4a69523 * [connectedmachine] release preview version 2023-10-03 (#7032) * [Release] Update index.json for extension [ connectedmachine ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=114440&view=results Last commit: a921d21 * [Release] Update index.json for extension [ k8s-extension ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=114632&view=results Last commit: 984b92d * chore(arcdata): version bump to 1.5.8 (#7076) * Add IoT Extension v0.23.1 (#7078) * feature: allow to read output for failed jobs (#7067) * feature: allow to read output for failed jobs * chore: removing unnecessary whitespaces * fix: linting errors * chore: addressing comments + pylint fixes * chore: addressed PR comments * chore: added SAS token obfuscation step to Run.ps1 * {CI} Fix static analysis (#6509) * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * update * Empty * Update azure-pipelines.yml * Update azdev_setup.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * Empty * update * modify containerapp * update * Update azdev_style_check.py * Update azdev_style_check.py * Update azdev_style_check.py * update * update * Delete azdev_style_check.py * Update test_source.py * Update azdev_linter_style.py * Update __init__.py * todo * update * update * Update __init__.py * Update azure-pipelines.yml * update * update * Update azdev_linter_style.py * update * {CI} Regenerating breaking change report with only_break=True to control length within 65535 (#7081) * chore: releasing az quantum v0.20.0 (#7080) * [Release] Update index.json for extension [ quantum ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=115465&view=results Last commit: 50a6cf9 * Upgrade Helm for connectedk8s (#6915) * [Release] Update index.json for extension [ connectedk8s ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=115498&view=results Last commit: ddc80e1 * [az fleet] Minor style & linter updates to fix checks. (#7092) * Style & Linter updates. * Updated history.rst * Fixes for pipeline detected style issues. * Linter fix from pipeline results. * Update src/fleet/azext_fleet/_completers.py Co-authored-by: Jim Minter <[email protected]> * Trying raise * line break --------- Co-authored-by: Jim Minter <[email protected]> * [Release] Update index.json for extension [ fleet ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=116395&view=results Last commit: f33c6cb * Mircosoft.NetworkCloud Update cli-ext (#7015) * update test and example bmm/bmckeyset cli * Added support to remove the SSH keys on the backend * update cli-ext * revert the advertise empty values --------- Co-authored-by: Mike Pham <[email protected]> * [Release] Update index.json for extension [ networkcloud ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=116422&view=results Last commit: e12af1a * Support --self-contained-interactive-authoring-enabled in integration-runtime self-hosted create (#7084) * Support --self-contained-interactive-authoring-enabled in integration-runtime self-hosted create * fix * fix * fix * fix * change * fix * fix * fix * fix * fix * fix * fix * fix version * [Release] Update index.json for extension [ datafactory ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=116474&view=results Last commit: d88fdb0 * [AKS] Fix for `az aks approuting update` command (#7038) * Added 1.0.2 version of aksarc CLI extension (#7090) * Added 1.0.1 version of aksarc CLI extension * Testing the CI help fix * Fixing the param help * testing * Fixing the help param * Published the extension with help fix * {CI} Add statement for azdev style (#7099) * Update azure-pipelines.yml * Update azure-pipelines.yml * [confcom] updating docs to include new genpolicy info (#7093) * updating docs to include new genpolicy info * updating image hash * updating styling in test files * updating styling and a regex * adding back if statement * fixing syntax bug * {CI} Add statement for azdev style (#7101) * update * Update azdev_linter_style.py * Update azdev_linter_style.py * Update __init__.py * Create commands for 2023-07-01-preview Api version (#7055) * Properly handle k8s clusters of kind provisioned cluster for connectedk8s (#7103) * disabling enable/disable-feature for provisioned clusters * disable additional unsupported subcommands for provisioned clusters * update extension version * update error messages for disabled subcommands for provisioned clsuters * remove test output * address PR comments * address more PR comments * bump extension version number * upgrade api (#7082) * {CI} Update bot workflow (#7091) * update * Update BlockPRMerge.yml * Update BlockPRMerge.yml * Update BlockPRMerge.yml * Update BlockPRMerge.yml * Update AddIssueComment.yml * Update BlockPRMerge.yml * [Release] Update index.json for extension [ confcom ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=117479&view=results Last commit: 4503d9d * [Release] Update index.json for extension [ nsp ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=117484&view=results Last commit: 76d5f00 * [Release] Update index.json for extension [ connectedk8s ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=117492&view=results Last commit: a44482d * [Release] Update index.json for extension [ stack-hci ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=117500&view=results Last commit: a3fb697 * Introduce additional bugfixes, bump CLI extension version (#7111) * [Release] Update index.json for extension [ connectedk8s ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=117603&view=results Last commit: 0c373bc * [devcenter] Update project environment type parameters to be required (#7100) * Update project env type parameters * Fix environment def example and update style * [Release] Update index.json for extension [ devcenter ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=117619&view=results Last commit: 07ad6cd * Added extension support for NNF 4.2 release (#7095) * Added extension support for NNF 4.2 release * added whitespaces in around arithmetic operator * Added new line at end of file * Fixed flake8 linting issues * Removed test_managednetworkfabric.py file as it was not in use --------- Co-authored-by: aytripathi <aytripathi@DESKTOP-DN8JFGH> * [Release] Update index.json for extension [ managednetworkfabric ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=117641&view=results Last commit: 1f408c3 * [Spring] Add new params to support auto binding (#7098) * [Release] Update index.json for extension [ spring ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=117947&view=results Last commit: 57c4830 * [Spring] Support managed component log stream (#7021) * Add support for managed component log stream in Azure Spring Apps * Fix CI failure * [Application-insights] `az monitor app-insights component`: Add new command group `favorite` to support managing favorite (#7108) * app-insights * [Release] Update index.json for extension [ spring ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=118048&view=results Last commit: 057f80c * {AKS} Fix azdev style issues for tests (#7115) * {AKS} Replace Workload Identity related functions in aks-preview with azure-cli (#6987) * [Release] Update index.json for extension [ aks-preview ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=118256&view=results Last commit: 60fbf22 * {Monitor-control-service} Data collection migrate (#7120) * add generated code and adjust rule file json key * [Release] Update index.json for extension [ monitor-control-service ] Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_URL: https://dev.azure.com/azclitools/internal/_build/results?buildId=118275&view=results Last commit: 5bc032e --------- Signed-off-by: Yash Nisar <[email protected]> Co-authored-by: xinyu pang <[email protected]> Co-authored-by: Xing Zhou <[email protected]> Co-authored-by: Yash Nisar <[email protected]> Co-authored-by: daniv-msft <[email protected]> Co-authored-by: Azure CLI Team <[email protected]> Co-authored-by: Alexandra Avendaño <[email protected]> Co-authored-by: Cormac McCarthy <[email protected]> Co-authored-by: Seth Hollandsworth <[email protected]> Co-authored-by: Diondra <[email protected]> Co-authored-by: yuc-Li <[email protected]> Co-authored-by: v-yuchenli <[email protected]> Co-authored-by: Azure ArcData Bot <[email protected]> Co-authored-by: Saisankar Gochhayat <[email protected]> Co-authored-by: Sai Sankar Gochhayat <[email protected]> Co-authored-by: Sean Hobbs <[email protected]> Co-authored-by: pdaru <[email protected]> Co-authored-by: Pooja Shetty <[email protected]> Co-authored-by: Henry Beberman <[email protected]> Co-authored-by: FumingZhang <[email protected]> Co-authored-by: Ryan K <[email protected]> Co-authored-by: aavalang <[email protected]> Co-authored-by: ZelinWang <[email protected]> Co-authored-by: Hang <[email protected]> Co-authored-by: Sayan Naskar <[email protected]> Co-authored-by: Fan Shang Xiang <[email protected]> Co-authored-by: robogatikov <[email protected]> Co-authored-by: Ashwin Jeyaseelan <[email protected]> Co-authored-by: bosesuneha <[email protected]> Co-authored-by: snehapar9 <[email protected]> Co-authored-by: Haider Agha <[email protected]> Co-authored-by: Arpi Shah <[email protected]> Co-authored-by: Zeng Taoxu <[email protected]> Co-authored-by: Vineeth Thumma <[email protected]> Co-authored-by: Arka <[email protected]> Co-authored-by: Li Ma <[email protected]> Co-authored-by: Cyclam <[email protected]> Co-authored-by: Xiaofan Zhou <[email protected]> Co-authored-by: Hari Prasad <[email protected]> Co-authored-by: Jing-song <[email protected]> Co-authored-by: Jonathan He <[email protected]> Co-authored-by: Mason Chen <[email protected]> Co-authored-by: deveshdama <[email protected]> Co-authored-by: Qinkai Wu <[email protected]> Co-authored-by: Bryant <[email protected]> Co-authored-by: Patryk Kulik <[email protected]> Co-authored-by: Andy Churchard <[email protected]> Co-authored-by: Prashanth Koushik <[email protected]> Co-authored-by: Bavneet Singh <[email protected]> Co-authored-by: kai ru <[email protected]> Co-authored-by: yaotongms <[email protected]> Co-authored-by: kikomiss <[email protected]> Co-authored-by: Kit <[email protected]> Co-authored-by: Jim Minter <[email protected]> Co-authored-by: Mike Pham <[email protected]> Co-authored-by: Mike Pham <[email protected]> Co-authored-by: Jingshu918 <[email protected]> Co-authored-by: Kaushal Kumar <[email protected]> Co-authored-by: Simon Diesenreiter <[email protected]> Co-authored-by: am-lim <[email protected]> Co-authored-by: aytripathi <[email protected]> Co-authored-by: aytripathi <aytripathi@DESKTOP-DN8JFGH> Co-authored-by: Moary Chen <[email protected]> Co-authored-by: jiashun0011 <[email protected]> Co-authored-by: AllyW <[email protected]>
1 parent 6fa1cde commit 2b07a18

File tree

6 files changed

+85
-86
lines changed

6 files changed

+85
-86
lines changed

src/spring/HISTORY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
Release History
22
===============
3+
4+
1.19.1
5+
---
6+
* Create workspace-based Application Insights instead, since classic Application Insights will be retired on 29 February 2024.
7+
38
1.19.0
49
---
510
* Add new commands for managed component log streaming `az spring component list`, `az spring component instance list` and `az spring component logs`.

src/spring/azext_spring/apm.py

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from msrestazure.tools import parse_resource_id, is_valid_resource_id
1414

1515
from ._utils import get_portal_uri
16+
from .custom import try_create_application_insights
1617
from .vendored_sdks.appplatform.v2023_11_01_preview import models
1718

1819
logger = get_logger(__name__)
@@ -110,7 +111,7 @@ def _get_connection_string(cmd, resource_group, service_name, location, app_insi
110111

111112
def _create_app_insights_and_get_connection_string(cmd, resource_group, service_name, location):
112113
try:
113-
created_app_insights = _try_create_application_insights(cmd, resource_group, service_name, location)
114+
created_app_insights = try_create_application_insights(cmd, resource_group, service_name, location)
114115
if created_app_insights:
115116
return created_app_insights.connection_string
116117
except Exception: # pylint: disable=broad-except
@@ -154,36 +155,3 @@ def _get_app_insights_connection_string(cli_ctx, resource_group, name):
154155
"Application Insights {} under resource group {} was not found.".format(name, resource_group))
155156

156157
return appinsights.connection_string
157-
158-
159-
def _try_create_application_insights(cmd, resource_group, name, location):
160-
creation_failed_warn = 'Unable to create the Application Insights for the Azure Spring Apps. ' \
161-
'Please use the Azure Portal to manually create and configure the Application Insights, ' \
162-
'if needed.'
163-
164-
ai_resource_group_name = resource_group
165-
ai_name = name
166-
ai_location = location
167-
ai_properties = {
168-
"name": ai_name,
169-
"location": ai_location,
170-
"kind": "web",
171-
"properties": {
172-
"Application_Type": "web"
173-
}
174-
}
175-
176-
app_insights_client = get_mgmt_service_client(cmd.cli_ctx, ApplicationInsightsManagementClient)
177-
appinsights = app_insights_client.components.create_or_update(ai_resource_group_name, ai_name, ai_properties)
178-
179-
if not appinsights or not appinsights.connection_string:
180-
logger.warning(creation_failed_warn)
181-
return None
182-
183-
portal_url = get_portal_uri(cmd.cli_ctx)
184-
# We make this success message as a warning to no interfere with regular JSON output in stdout
185-
logger.warning('Application Insights \"%s\" was created for this Azure Spring Apps. '
186-
'You can visit %s/#resource%s/overview to view your '
187-
'Application Insights component', appinsights.name, portal_url, appinsights.id)
188-
189-
return appinsights

src/spring/azext_spring/buildpack_binding.py

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from .vendored_sdks.appplatform.v2023_11_01_preview import models
88
from azure.cli.core.util import sdk_no_wait
99
from ._utils import get_portal_uri
10+
from .custom import try_create_application_insights
1011
from msrestazure.tools import parse_resource_id, is_valid_resource_id
1112
from azure.cli.core.commands.client_factory import get_mgmt_service_client
1213
from azure.cli.core.azclierror import InvalidArgumentValueError
@@ -112,7 +113,7 @@ def _get_connection_string(cmd, resource_group, service_name, location, app_insi
112113
def _create_app_insights_and_get_connection_string(cmd, resource_group, service_name, location):
113114

114115
try:
115-
created_app_insights = _try_create_application_insights(cmd, resource_group, service_name, location)
116+
created_app_insights = try_create_application_insights(cmd, resource_group, service_name, location)
116117
if created_app_insights:
117118
return created_app_insights.connection_string
118119
except Exception: # pylint: disable=broad-except
@@ -155,36 +156,3 @@ def _get_app_insights_connection_string(cli_ctx, resource_group, name):
155156
raise ResourceNotFoundError("App Insights {} under resource group {} was not found.".format(name, resource_group))
156157

157158
return appinsights.connection_string
158-
159-
160-
def _try_create_application_insights(cmd, resource_group, name, location):
161-
creation_failed_warn = 'Unable to create the Application Insights for the Azure Spring Apps. ' \
162-
'Please use the Azure Portal to manually create and configure the Application Insights, ' \
163-
'if needed.'
164-
165-
ai_resource_group_name = resource_group
166-
ai_name = name
167-
ai_location = location
168-
ai_properties = {
169-
"name": ai_name,
170-
"location": ai_location,
171-
"kind": "web",
172-
"properties": {
173-
"Application_Type": "web"
174-
}
175-
}
176-
177-
app_insights_client = get_mgmt_service_client(cmd.cli_ctx, ApplicationInsightsManagementClient)
178-
appinsights = app_insights_client.components.create_or_update(ai_resource_group_name, ai_name, ai_properties)
179-
180-
if not appinsights or not appinsights.connection_string:
181-
logger.warning(creation_failed_warn)
182-
return None
183-
184-
portal_url = get_portal_uri(cmd.cli_ctx)
185-
# We make this success message as a warning to no interfere with regular JSON output in stdout
186-
logger.warning('Application Insights \"%s\" was created for this Azure Spring Apps. '
187-
'You can visit %s/#resource%s/overview to view your '
188-
'Application Insights component', appinsights.name, portal_url, appinsights.id)
189-
190-
return appinsights

src/spring/azext_spring/custom.py

Lines changed: 51 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
import os
1111
import time
1212
from azure.cli.core._profile import Profile
13+
from azure.core.exceptions import HttpResponseError
14+
from azure.mgmt.loganalytics import LogAnalyticsManagementClient
1315

1416
from ._websocket import WebSocketConnection, recv_remote, send_stdin, EXEC_PROTOCOL_CTRL_C_MSG
1517
from azure.mgmt.cosmosdb import CosmosDBManagementClient
@@ -49,6 +51,8 @@
4951
NO_PRODUCTION_DEPLOYMENT_SET_ERROR = "This app has no production deployment, use \"az spring app deployment create\" to create a deployment and \"az spring app set-deployment\" to set production deployment."
5052
DELETE_PRODUCTION_DEPLOYMENT_WARNING = "You are going to delete production deployment, the app will be inaccessible after this operation."
5153
LOG_RUNNING_PROMPT = "This command usually takes minutes to run. Add '--verbose' parameter if needed."
54+
APP_INSIGHTS_CREATION_FAILURE_WARNING = 'Unable to create the Application Insights for the Azure Spring Apps. ' \
55+
'Please use the Azure Portal to manually create and configure the Application Insights, if needed.'
5256

5357

5458
def _warn_enable_java_agent(enable_java_agent, **_):
@@ -1460,26 +1464,26 @@ def _get_connection_string_from_app_insights(cmd, resource_group, app_insights):
14601464

14611465

14621466
def try_create_application_insights(cmd, resource_group, name, location):
1463-
creation_failed_warn = 'Unable to create the Application Insights for the Azure Spring Apps. ' \
1464-
'Please use the Azure Portal to manually create and configure the Application Insights, ' \
1465-
'if needed.'
1466-
1467-
ai_resource_group_name = resource_group
1468-
ai_name = name
1469-
ai_location = location
1467+
workspace = try_create_log_analytics_workspace(cmd, resource_group, name, location)
1468+
if workspace is None:
1469+
logger.warning(APP_INSIGHTS_CREATION_FAILURE_WARNING)
1470+
return None
14701471

1471-
app_insights_client = get_mgmt_service_client(cmd.cli_ctx, ApplicationInsightsManagementClient)
1472+
app_insights_client = get_mgmt_service_client(cmd.cli_ctx, ApplicationInsightsManagementClient,
1473+
api_version='2020-02-02-preview')
14721474
ai_properties = {
1473-
"name": ai_name,
1474-
"location": ai_location,
1475+
"location": location,
14751476
"kind": "web",
14761477
"properties": {
1477-
"Application_Type": "web"
1478+
"Application_Type": "web",
1479+
"Flow_Type": "Bluefield",
1480+
"Request_Source": "rest",
1481+
"WorkspaceResourceId": workspace.id
14781482
}
14791483
}
1480-
appinsights = app_insights_client.components.create_or_update(ai_resource_group_name, ai_name, ai_properties)
1484+
appinsights = app_insights_client.components.create_or_update(resource_group, name, ai_properties)
14811485
if appinsights is None or appinsights.connection_string is None:
1482-
logger.warning(creation_failed_warn)
1486+
logger.warning(APP_INSIGHTS_CREATION_FAILURE_WARNING)
14831487
return None
14841488

14851489
portal_url = get_portal_uri(cmd.cli_ctx)
@@ -1542,6 +1546,40 @@ def app_insights_show(cmd, client, resource_group, name, no_wait=False):
15421546
return monitoring_setting_properties
15431547

15441548

1549+
def try_create_log_analytics_workspace(cmd, resource_group, name, location):
1550+
client = get_mgmt_service_client(cmd.cli_ctx, LogAnalyticsManagementClient)
1551+
workspace = None
1552+
1553+
try:
1554+
workspace = client.workspaces.get(resource_group, name)
1555+
except HttpResponseError as err:
1556+
if err.status_code != 404:
1557+
raise
1558+
1559+
if workspace is not None:
1560+
return workspace
1561+
1562+
logger.debug("Log Analytics workspace not found. Creating it now...")
1563+
properties = {
1564+
"location": location,
1565+
"properties": {
1566+
"sku": {
1567+
"name": "PerGB2018"
1568+
},
1569+
"retentionInDays": 30
1570+
}
1571+
}
1572+
workspace = client.workspaces.begin_create_or_update(resource_group, name, properties).result()
1573+
1574+
portal_url = get_portal_uri(cmd.cli_ctx)
1575+
# We make this success message as a warning to no interfere with regular JSON output in stdout
1576+
logger.warning('Log Analytics workspace \"%s\" was created for this Azure Spring Apps. '
1577+
'You can visit %s/#resource%s/overview to view your Log Analytics workspace',
1578+
workspace.name, portal_url, workspace.id)
1579+
1580+
return workspace
1581+
1582+
15451583
def app_connect(cmd, client, resource_group, service, name,
15461584
deployment=None, instance=None, shell_cmd='/bin/sh'):
15471585

src/spring/azext_spring/tests/latest/test_asa_create.py

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def _execute(self, resource_group, name, **kwargs):
7171
self.created_resource = call_args[0][0][2]
7272

7373

74-
class TestSpringCloudCreateEnerprise(BasicTest):
74+
class TestSpringCloudCreateEnterprise(BasicTest):
7575
def test_asc_create_enterprise(self):
7676
self._execute('rg', 'asc', sku=self._get_sku('Enterprise'), disable_app_insights=True)
7777
resource = self.created_resource
@@ -180,8 +180,18 @@ def test_asa_basic_with_acc(self):
180180
self.assertIsNone(self.dev_tool)
181181

182182

183+
def _workspaces_get_func(*args, **kwargs):
184+
if args[1] == 'asc-with-existing-workspace':
185+
workspace = mock.MagicMock()
186+
workspace.id = 'workspace-id'
187+
return workspace
188+
else:
189+
return None
190+
191+
183192
class TestSpringCloudCreateWithAI(BasicTest):
184-
def _get_ai_client(ctx, type):
193+
def _get_ai_client(ctx, type, api_version=None):
194+
free_mock_client.workspaces.get.side_effect = _workspaces_get_func
185195
ai_create_resource = mock.MagicMock()
186196
ai_create_resource.connection_string = 'fake-connection'
187197
free_mock_client.components.create_or_update.return_value = ai_create_resource
@@ -217,6 +227,15 @@ def test_asc_create_with_AI_happy_path(self):
217227
self.monitoring_settings_resource.properties.app_insights_instrumentation_key)
218228
self.assertEqual(True, self.monitoring_settings_resource.properties.trace_enabled)
219229

230+
def test_asc_create_with_AI_and_existing_workspace(self):
231+
self._execute('rg', 'asc-with-existing-workspace', sku=self._get_sku())
232+
resource = self.created_resource
233+
self.assertEqual('S0', resource.sku.name)
234+
self.assertEqual('Standard', resource.sku.tier)
235+
self.assertEqual(False, resource.properties.zone_redundant)
236+
self.assertEqual('fake-connection', self.monitoring_settings_resource.properties.app_insights_instrumentation_key)
237+
self.assertEqual(True, self.monitoring_settings_resource.properties.trace_enabled)
238+
220239
def test_asc_create_with_AI_key(self):
221240
self._execute('rg', 'asc', sku=self._get_sku(), app_insights_key='my-key')
222241
resource = self.created_resource
@@ -237,8 +256,8 @@ def test_asc_create_with_AI_name(self):
237256
self.assertEqual(True, self.monitoring_settings_resource.properties.trace_enabled)
238257

239258

240-
class TestSpringCloudCreateEnerpriseWithApplicationInsights(BasicTest):
241-
def _get_application_insights_client(ctx, type):
259+
class TestSpringCloudCreateEnterpriseWithApplicationInsights(BasicTest):
260+
def _get_application_insights_client(ctx, type, api_version=None):
242261
application_insights_create_resource = mock.MagicMock()
243262
application_insights_create_resource.connection_string = 'fake-create-connection-string'
244263

@@ -255,6 +274,7 @@ def __init__(self, methodName: str = ...):
255274
self.buildpack_binding_resource = None
256275

257276
@mock.patch('azext_spring.buildpack_binding.get_mgmt_service_client', _get_application_insights_client)
277+
@mock.patch('azext_spring.custom.get_mgmt_service_client', _get_application_insights_client)
258278
def _execute(self, resource_group, name, **kwargs):
259279
client = kwargs.pop('client', None) or _get_basic_mock_client()
260280
super()._execute(resource_group, name, client=client, **kwargs)

src/spring/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# TODO: Confirm this is the right version number you want and it matches your
1818
# HISTORY.rst entry.
19-
VERSION = '1.19.0'
19+
VERSION = '1.19.1'
2020

2121
# The full list of classifiers is available at
2222
# https://pypi.python.org/pypi?%3Aaction=list_classifiers

0 commit comments

Comments
 (0)