Skip to content

Commit ac68f5e

Browse files
ketkimnaikc-ryan-kketkinaik2611
authored
chore: sync dev branch with release/cms_public_preview (#785)
* fix: draft github release from non-default branches (#758) * fix: solve SDL task warnings * chore(ci): update runner images (#764) * feat: replace uamqp with PyAMQP (#767) * Eventhub sdk add * monitoring changes * event changes * add discovery logic * remove unused code * test changes * Add fixes for integration tests * remove readme file * Remove uamqp usage in the code entirely * Replace uampq from docs to pyamqp * Fix failing unit tests * Fix args compatibility issue * Fix linting errors * Addressing comments * Fix linting issues * Addressed comments * Add right exception * remove unwanted exception --------- Co-authored-by: Ketki <ketkinaik@microsoft.com> * fix: handle redacted SharedAccessKey in connection string parsing (#769) * fix: move base64 validation inside validate block for passthrough cases When parsing connection strings with redacted SharedAccessKey=*** values (e.g., from IoT Hub properties), the base64 validation would fail since the redacted value is not valid base64. Move the validation inside the 'if validate:' block so it only runs when full validation is requested. Passthrough cases that only need to extract other properties (like EntityPath, Endpoint) will no longer fail. * fix: skip base64 validation for redacted SharedAccessKey (****) values * Remove defensive check --------- Co-authored-by: Ketki <ketkinaik@microsoft.com> * chore(release): prepare v0.28.0 (#770) * Create release data * Improve formatting and remove internal changes --------- Co-authored-by: Ketki <ketkinaik@microsoft.com> * fix(test): win/MSI int test pipeline fixes (#768) * fix: win/MSI pipeline fixes * fix conditional compile-time/runtime logic issue * fix windows extension path * test: try to repro windows install issue by reordering pipeline stages * fixup * revert pipeline testing changes for now * revert separation of python setup and dev requirements for now * Follow up changes (#772) Co-authored-by: Ketki <ketkinaik@microsoft.com> * bump azure-iot-device for Windows (#773) Co-authored-by: Ketki <ketkinaik@microsoft.com> * Release preparation (#774) Co-authored-by: Ketki <ketkinaik@microsoft.com> * Update SBOM tool version (#775) Co-authored-by: Ketki <ketkinaik@microsoft.com> * ci: fix SBOM generation for pip 25.x compatibility (#776) * Try requirements options * Add range --------- Co-authored-by: Ketki <ketkinaik@microsoft.com> * SBOM: use clean venv for runtime deps (#780) Co-authored-by: Ketki <ketkinaik@microsoft.com> * chore: remove uamqp references from codebase (#784) * Remove all uampq occurences * Addressed comments and fixed linting errors --------- Co-authored-by: Ketki <ketkinaik@microsoft.com> --------- Co-authored-by: Ryan K <ryan.k@outlook.com> Co-authored-by: Ketki <ketkinaik@microsoft.com>
1 parent 579b813 commit ac68f5e

38 files changed

+748
-656
lines changed

.azure-devops/integration_tests.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ parameters:
99
default: "aziotcli_test_primary"
1010
- name: testAgentVmImage
1111
type: string
12-
default: "ubuntu-22.04"
12+
default: "ubuntu-24.04"
1313
values:
14-
- "ubuntu-22.04"
14+
- "ubuntu-24.04"
1515
- "ubuntu-latest"
16+
- name: windowsAgentVmImage
17+
type: string
18+
default: "windows-2025"
1619
- name: pythonVersion
1720
displayName: "Python version for building wheels, KPIs"
1821
type: string
@@ -123,7 +126,10 @@ stages:
123126
pythonVersions: ${{ parameters.pythonVersionsTestingMatrix }}
124127
condition: succeeded()
125128
pool:
126-
vmImage: ${{ parameters.testAgentVmImage }}
129+
${{ if eq(parameters.azureCLIVersion, 'msi') }}:
130+
vmImage: ${{ parameters.windowsAgentVmImage }}
131+
${{ else }}:
132+
vmImage: ${{ parameters.testAgentVmImage }}
127133
jobs:
128134
- template: templates/trigger-tests.yml
129135
parameters:
@@ -141,6 +147,8 @@ stages:
141147
maxParallelADR: 2
142148
- job: "evaluateCmdTable"
143149
displayName: "Evaluate Command Table"
150+
pool:
151+
vmImage: ${{ parameters.testAgentVmImage }}
144152
steps:
145153
- template: templates/evaluate-command-table.yml
146154
- stage: "smokeTest"
@@ -150,7 +158,10 @@ stages:
150158
pythonVersions: ${{ parameters.pythonVersionsTestingMatrix }}
151159
condition: succeeded()
152160
pool:
153-
vmImage: ${{ parameters.testAgentVmImage }}
161+
${{ if eq(parameters.azureCLIVersion, 'msi') }}:
162+
vmImage: ${{ parameters.windowsAgentVmImage }}
163+
${{ else }}:
164+
vmImage: ${{ parameters.testAgentVmImage }}
154165
jobs:
155166
- template: templates/smoke-tests.yml
156167
parameters:

.azure-devops/merge.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@ variables:
2323
parameters:
2424
- name: linuxImage
2525
type: string
26-
default: "ubuntu-22.04"
26+
default: "ubuntu-24.04"
2727
values:
28-
- "ubuntu-22.04"
28+
- "ubuntu-24.04"
2929
- "ubuntu-latest"
30+
- name: windowsImage
31+
type: string
32+
default: "windows-2025"
3033

3134
jobs:
3235
- job: "build_and_publish_azure_iot_cli_ext"
@@ -82,7 +85,7 @@ jobs:
8285
"build_and_publish_azure_cli_test_sdk",
8386
]
8487
pool:
85-
vmImage: "macOS-13"
88+
vmImage: "macOS-15"
8689

8790
steps:
8891
- template: templates/run-tests-parallel.yml
@@ -98,7 +101,7 @@ jobs:
98101
"build_and_publish_azure_cli_test_sdk",
99102
]
100103
pool:
101-
vmImage: "windows-2019"
104+
vmImage: ${{ parameters.windowsImage }}
102105

103106
steps:
104107
- task: PowerShell@2
@@ -147,7 +150,7 @@ jobs:
147150
- job: CredScan
148151
displayName: "Credential Scan"
149152
pool:
150-
vmImage: "windows-2019"
153+
vmImage: ${{ parameters.windowsImage }}
151154

152155
steps:
153156
- task: CredScan@3

.azure-devops/nightly.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@ parameters:
1818
default: "aziotcli_test_nightly"
1919
- name: vmImage
2020
type: string
21-
default: "ubuntu-22.04"
21+
default: "ubuntu-24.04"
2222
values:
23-
- "ubuntu-22.04"
23+
- "ubuntu-24.04"
2424
- "ubuntu-latest"
25+
- name: windowsImage
26+
type: string
27+
default: "windows-2025"
2528
- name: pythonVersion
2629
displayName: "Python version for building wheel, KPIs"
2730
type: string
@@ -129,7 +132,7 @@ stages:
129132
- stage: "test_msi"
130133
displayName: "Run all tests against Windows MSI install"
131134
pool:
132-
vmImage: "windows-2019"
135+
vmImage: ${{ parameters.windowsImage }}
133136
dependsOn: [build, test_min]
134137
variables:
135138
pythonVersions: $[variables['msiTestingMatrix']]
@@ -163,7 +166,7 @@ stages:
163166
pythonVersions: $[variables['msiTestingMatrix']]
164167
condition: succeeded()
165168
pool:
166-
vmImage: "windows-2019"
169+
vmImage: ${{ parameters.windowsImage }}
167170
jobs:
168171
- template: templates/smoke-tests.yml
169172
parameters:

.azure-devops/reference_markdown.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ parameters:
1010
default: "iot"
1111
- name: linuxImage
1212
type: string
13-
default: "ubuntu-22.04"
13+
default: "ubuntu-24.04"
1414
values:
15-
- "ubuntu-22.04"
15+
- "ubuntu-24.04"
1616
- "ubuntu-latest"
1717

1818
jobs:
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
steps:
2-
- task: PythonScript@0
2+
- task: Bash@3
33
displayName: "Set Extension Path"
4-
name: "setExtensionPath"
54
inputs:
6-
scriptSource: "inline"
5+
targetType: "inline"
76
script: |
8-
from azure.cli.core.extension import get_extension_path
9-
extension_path = get_extension_path("azure-iot")
10-
print("Extension path is " + extension_path)
11-
print("##vso[task.setvariable variable=PYTHONPATH;]"+extension_path)
7+
extensionPath=$(az extension show -n azure-iot --query path -o tsv)
8+
if [ -n "$extensionPath" ]; then
9+
echo "Extension path is $extensionPath"
10+
echo "##vso[task.setvariable variable=PYTHONPATH;]$extensionPath"
11+
else
12+
echo "##vso[task.logissue type=warning]Extension path not found"
13+
fi

.azure-devops/templates/setup-dev-test-env.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ steps:
1717

1818
- ${{ if eq(parameters.azureCLIVersion, 'min') }}:
1919
- template: install-azure-cli-min.yml
20-
21-
- ${{ if eq(parameters.azureCLIVersion, 'released') }}:
20+
- ${{ elseif eq(parameters.azureCLIVersion, 'released') }}:
2221
- template: install-azure-cli-released.yml
23-
24-
- ${{ if eq(parameters.azureCLIVersion, 'msi') }}:
22+
- ${{ else }}:
2523
- template: install-azure-cli-msi.yml
2624

2725
- template: download-install-local-azure-test-sdk.yml

.github/policies/resourceManagement.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,13 @@ configuration:
9090
9191
`ImportError: cannot import name 'c_uamqp' from partially initialized module 'uamqp'`
9292
93-
which can often be solved quickly by either:
9493
95-
- Updating your installed version of the `azure-iot` extension:
96-
`az extension update --name azure-iot`
97-
- Performing a repair of the uamqp dependency:
98-
`az iot hub monitor-events --hub-name {} --device-id {} --repair`
94+
The `uamqp` dependency has been deprecated and removed in newer versions of the `azure-iot` extension,
95+
which now uses a pure Python AMQP implementation. Updating to the latest version of the extension should
96+
resolve this issue:
9997
100-
Please try these two resolution methods and see if that helps resolve your issue.
98+
`az extension update --name azure-iot`
10199
description:
100+
102101
onFailure:
103102
onSuccess:

.github/workflows/release_build.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,19 @@ jobs:
4747
echo "version=$version" >> $GITHUB_ENV
4848
- name: Generate SBOM
4949
run: |
50-
curl -Lo $RUNNER_TEMP/sbom-tool https://github.com/microsoft/sbom-tool/releases/download/v2.2.3/sbom-tool-linux-x64
50+
# Create clean venv with only runtime dependencies (excludes dev/test deps)
51+
python -m venv $RUNNER_TEMP/sbom-venv
52+
$RUNNER_TEMP/sbom-venv/bin/pip install --upgrade pip
53+
$RUNNER_TEMP/sbom-venv/bin/pip install ${{ env.wheel }}
54+
$RUNNER_TEMP/sbom-venv/bin/pip freeze > ./dist/requirements.txt
55+
# Add Windows-specific azure-iot-device version (not installed on Linux CI, but needed for complete SBOM)
56+
# Note: This causes a pip conflict warning in sbom-tool but both versions are correctly included in SBOM
57+
echo "azure-iot-device>=2.15.0rc1,<3.0.0dev0" >> ./dist/requirements.txt
58+
curl -Lo $RUNNER_TEMP/sbom-tool https://github.com/microsoft/sbom-tool/releases/download/v4.1.5/sbom-tool-linux-x64
5159
chmod +x $RUNNER_TEMP/sbom-tool
52-
$RUNNER_TEMP/sbom-tool generate -b ./dist -bc . -pn "Azure IoT CLI Extension" -pv "${{ env.version }}" -ps Microsoft
60+
$RUNNER_TEMP/sbom-tool generate -b ./dist -bc ./dist -pn "Azure IoT CLI Extension" -pv "${{ env.version }}" -ps Microsoft
61+
# Clean up temporary files
62+
rm -rf ./dist/requirements.txt $RUNNER_TEMP/sbom-venv
5363
5464
- name: Upload Wheel Artifact
5565
uses: actions/upload-artifact@v4

.github/workflows/tox.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ jobs:
2626
fail-fast: false
2727
matrix:
2828
os:
29-
- ubuntu-22.04
30-
- windows-2022
31-
- macos-13
29+
- ubuntu-24.04
30+
- windows-2025
31+
- macos-15-intel
3232
py:
3333
- "3.13"
3434
- "3.12"
@@ -48,7 +48,7 @@ jobs:
4848
- name: Run test suite
4949
run: tox r --skip-pkg-install
5050
- name: Upload coverage report
51-
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.py == '3.13' }}
51+
if: ${{ matrix.os == 'ubuntu-24.04' && matrix.py == '3.13' }}
5252
continue-on-error: true
5353
uses: actions/upload-artifact@v4
5454
with:

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ ignored-classes=optparse.Values,thread._local,_thread._local,Setting
605605
# in the environment of the CLI
606606
ignored-modules=
607607
azure,azure.cli,azure.cli.core,azure.cli.core.extension,azure.cli.core.commands,
608-
knack,six,msrest,msrestazure,requests,uamqp,yaml,jmespath,jsonschema
608+
knack,six,msrest,msrestazure,requests,yaml,jmespath,jsonschema
609609

610610
# Show a hint with possible names when a member name was not found. The aspect
611611
# of finding the hint is based on edit distance.

0 commit comments

Comments
 (0)