From fc2d45145ed3395f78a78204d68f71866bc3a4fb Mon Sep 17 00:00:00 2001 From: Daniel Languiller Date: Thu, 2 Apr 2026 10:41:38 +1100 Subject: [PATCH 1/5] feature: update references to use azdev cmds --- azure-pipelines.yml | 2 +- doc/authoring_command_modules/README.md | 21 +++++++++++++++++++++ scripts/generate_latest_indices.py | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 129f971e78c..9cb24494540 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1094,7 +1094,7 @@ jobs: - bash: | set -ev . env/bin/activate - python scripts/generate_latest_indices.py verify + azdev latest-index verify --repo . displayName: 'Verify generated latest indices' - job: CheckStyle diff --git a/doc/authoring_command_modules/README.md b/doc/authoring_command_modules/README.md index aace2141b84..6d5e0dc3829 100644 --- a/doc/authoring_command_modules/README.md +++ b/doc/authoring_command_modules/README.md @@ -163,6 +163,27 @@ Style Checks azdev style [--pylint] [--pep8] ``` +Latest Packaged Indices +----------------------- + +Use azdev wrappers around Azure CLI's latest index generation script: + +``` +azdev latest-index generate +azdev latest-index verify +``` + +You can pass an explicit Azure CLI checkout path when needed: + +``` +azdev latest-index generate --cli /path/to/azure-cli +azdev latest-index verify --repo /path/to/azure-cli +``` + +`azdev latest-index verify` exits non-zero when generated output differs from +the checked-in `commandIndex.latest.json` or `helpIndex.latest.json`, making it +CI-friendly. + Submitting Pull Requests ------------------------ diff --git a/scripts/generate_latest_indices.py b/scripts/generate_latest_indices.py index 927df74fee8..ecc44f31788 100644 --- a/scripts/generate_latest_indices.py +++ b/scripts/generate_latest_indices.py @@ -279,7 +279,7 @@ def _run_verify(command_text, help_text): for path in mismatched: print(f' - {path.relative_to(REPO_ROOT)}') print('Run:') - print(' python scripts/generate_latest_indices.py generate') + print(' azdev latest-index generate --cli .') return 1 print('Verified: latest index files are up-to-date.') From 2c8f9b1fd854a92bf6cbcec2b11811b1fa6b7f27 Mon Sep 17 00:00:00 2001 From: Daniel Languiller Date: Thu, 2 Apr 2026 11:06:30 +1100 Subject: [PATCH 2/5] test: make sure CI step can fail --- src/azure-cli-core/azure/cli/core/commandIndex.latest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/azure-cli-core/azure/cli/core/commandIndex.latest.json b/src/azure-cli-core/azure/cli/core/commandIndex.latest.json index a19c75ad8e7..3427ed283e7 100644 --- a/src/azure-cli-core/azure/cli/core/commandIndex.latest.json +++ b/src/azure-cli-core/azure/cli/core/commandIndex.latest.json @@ -19,8 +19,8 @@ "azure.cli.command_modules.cdn" ], "aks": [ - "azure.cli.command_modules.acs", - "azure.cli.command_modules.serviceconnector" + "azure.cli.command_modules.serviceconnector", + "azure.cli.command_modules.acs" ], "ams": [ "azure.cli.command_modules.ams" From 01bbfa369da1234abddb93f51556a8ae91d76c4d Mon Sep 17 00:00:00 2001 From: Daniel Languiller Date: Thu, 2 Apr 2026 12:09:25 +1100 Subject: [PATCH 3/5] fix: revert index failure --- src/azure-cli-core/azure/cli/core/commandIndex.latest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/azure-cli-core/azure/cli/core/commandIndex.latest.json b/src/azure-cli-core/azure/cli/core/commandIndex.latest.json index 3427ed283e7..a19c75ad8e7 100644 --- a/src/azure-cli-core/azure/cli/core/commandIndex.latest.json +++ b/src/azure-cli-core/azure/cli/core/commandIndex.latest.json @@ -19,8 +19,8 @@ "azure.cli.command_modules.cdn" ], "aks": [ - "azure.cli.command_modules.serviceconnector", - "azure.cli.command_modules.acs" + "azure.cli.command_modules.acs", + "azure.cli.command_modules.serviceconnector" ], "ams": [ "azure.cli.command_modules.ams" From 07ab7c328e9e594953f7b9a5c4ef3f9d06d006b5 Mon Sep 17 00:00:00 2001 From: Daniel Languiller Date: Thu, 2 Apr 2026 13:03:24 +1100 Subject: [PATCH 4/5] fix: standardize flag name --- doc/authoring_command_modules/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/authoring_command_modules/README.md b/doc/authoring_command_modules/README.md index 6d5e0dc3829..7362a1d7c14 100644 --- a/doc/authoring_command_modules/README.md +++ b/doc/authoring_command_modules/README.md @@ -177,7 +177,7 @@ You can pass an explicit Azure CLI checkout path when needed: ``` azdev latest-index generate --cli /path/to/azure-cli -azdev latest-index verify --repo /path/to/azure-cli +azdev latest-index verify --cli /path/to/azure-cli ``` `azdev latest-index verify` exits non-zero when generated output differs from From bc3436561383ff4f809d95eac3c97f5fc8620abd Mon Sep 17 00:00:00 2001 From: Daniel Languiller Date: Thu, 2 Apr 2026 13:05:45 +1100 Subject: [PATCH 5/5] fix: give option to run azdev or script --- scripts/generate_latest_indices.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/generate_latest_indices.py b/scripts/generate_latest_indices.py index ecc44f31788..1dde1c5ba29 100644 --- a/scripts/generate_latest_indices.py +++ b/scripts/generate_latest_indices.py @@ -278,8 +278,10 @@ def _run_verify(command_text, help_text): print('Generated latest index files are out of date:') for path in mismatched: print(f' - {path.relative_to(REPO_ROOT)}') - print('Run:') + print('Run either:') print(' azdev latest-index generate --cli .') + print('or:') + print(' python scripts/generate_latest_indices.py generate') return 1 print('Verified: latest index files are up-to-date.')