Skip to content

Conversation

@DanielMicrosoft
Copy link
Contributor

@DanielMicrosoft DanielMicrosoft commented Nov 23, 2025

Related command

Description
ADO Task: https://msazure.visualstudio.com/One/_workitems/edit/35931568

Checklist:

  • Test with varied commands
  • Verify telemetry arrives at Kusto as desired. (Cannot be tested until properties are whitelisted in GDPR)
  • Verify with more complex commands
        // az vm List
	"context.default.azurecli.commandpreservecasing": "vm List",
	"context.default.azurecli.cmdidxrebuildtriggered": "False"

       // az group CREATE
       	"context.default.azurecli.commandpreservecasing": "group CREATE",
	"context.default.azurecli.cmdidxrebuildtriggered": "False"
	
	// az Group CREATE (TBD)
        "context.default.azurecli.commandpreservecasing": "Group CREATE",
	"context.default.azurecli.cmdidxrebuildtriggered": "True"
       // 

  • Verify with help command
	"context.default.azurecli.cmdidxrebuildtriggered": "True",
	"context.default.azurecli.commandpreservecasing": ""
  • Verify with --help command
      // We may omit this from capturing casing, as flags are case sensitive.
  • Verify with Help command (does it case/re-build?)
	"context.default.azurecli.commandpreservecasing": "",
	"context.default.azurecli.cmdidxrebuildtriggered": "True"
  • Verify with --Help command (does it case/re-build?)
	"context.default.azurecli.commandpreservecasing": "",
	"context.default.azurecli.cmdidxrebuildtriggered": "True"
  • Verify with --version (does it case/re-build?)
	"context.default.azurecli.cmdidxrebuildtriggered": "False",
	"context.default.azurecli.commandpreservecasing": ""
  • Verify with --Version command (does it case/re-build?)
	"context.default.azurecli.commandpreservecasing": "",
	"context.default.azurecli.cmdidxrebuildtriggered": "True"

  • Verify with version command (does it case/re-build?)
  • Verify with Version command (does it case/re-build?)
	"context.default.azurecli.cmdidxrebuildtriggered": "True",
	"context.default.azurecli.commandpreservecasing": "Version"
  • Verify with something help/--help

  • Add meaningful tests for above conditions.

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Nov 23, 2025

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@yonzhan
Copy link
Collaborator

yonzhan commented Nov 23, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@azure-client-tools-bot-prd
Copy link

Hi @DanielMicrosoft,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@github-actions
Copy link

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Nov 23, 2025

️✔️AzureCLI-BreakingChangeTest
️✔️Non Breaking Changes

@DanielMicrosoft DanielMicrosoft changed the title feature: (WIP) add new telemetry field {Core} Add CommandPreserveCasing and CommandIndexRebuild telemetry properties for command rebuild analysis Nov 24, 2025
@DanielMicrosoft
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@DanielMicrosoft DanielMicrosoft marked this pull request as ready for review November 24, 2025 07:01
Copilot AI review requested due to automatic review settings November 24, 2025 07:01
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

This PR adds two new telemetry properties to support command rebuild analysis: CommandPreserveCasing (preserving the original casing of user-entered commands) and CmdIdxRebuildTriggered (indicating whether command index rebuild was triggered during execution).

Key Changes

  • Added roughly_parse_command_with_casing() utility function to parse commands while preserving original casing, complementing the existing roughly_parse_command() function
  • Updated telemetry session to track two new properties for command rebuild analysis
  • Added comprehensive unit tests for both the existing and new command parsing functions

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/azure-cli-core/azure/cli/core/util.py Added new roughly_parse_command_with_casing() function to extract command parts while preserving original user input casing
src/azure-cli-core/azure/cli/core/tests/test_util.py Added comprehensive unit tests for both roughly_parse_command() and roughly_parse_command_with_casing(), including security tests to ensure sensitive flag values aren't captured
src/azure-cli-core/azure/cli/core/telemetry.py Added two new telemetry properties (command_preserve_casing and cmd_idx_rebuild_triggered) with supporting functions to track command rebuild metrics
src/azure-cli-core/azure/cli/core/commands/init.py Updated command execution to capture command with preserved casing early in the pipeline and pass it to telemetry tracking
src/azure-cli-core/azure/cli/core/init.py Added telemetry tracking when module discovery triggers command index rebuild
.vscode/launch.json Updated debug configuration to use debugpy type and removed deprecated debugOptions (appears unrelated to the PR's main purpose)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants