Skip to content

[Load] Fix Azure/azure-cli-extensions#10020: az load test create: Fix --test-id not required when testId is specified in YAML config file#10021

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/issue-32170-fix-test-id-requirement
Draft

[Load] Fix Azure/azure-cli-extensions#10020: az load test create: Fix --test-id not required when testId is specified in YAML config file#10021
Copilot wants to merge 2 commits into
mainfrom
copilot/issue-32170-fix-test-id-requirement

Conversation

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

az load test create rejected commands with the following arguments are required: --test-id/-t even when testId was present in the YAML config passed via --load-test-config-file. The validator ran before the command handler and had no awareness of the config file.

Changes

  • validators.pyvalidate_test_id now checks namespace.load_test_config_file when test_id is None; if the YAML file is present and contains testId, it populates namespace.test_id before running format validation. CLI-provided --test-id always takes precedence.
  • constants.py — Added TEST_ID = "testId" to LoadTestConfigKeys.
  • argtypes.py — Updated test_id_no_completer help text to reflect optional behavior.
  • help.py — Added example showing az load test create without --test-id when testId is in the config file.
  • HISTORY.rst — Added changelog entry under new version 2.1.1.
  • test_load_test_id_from_yaml_unit.py — Unit tests covering: read from YAML, CLI arg precedence, missing key, invalid format, and required-when-absent cases.

Example

Given a config file test.yaml with testId: my-test:

# Before: error — "the following arguments are required: --test-id/-t"
# After: works as expected
az load test create \
  --load-test-resource $LOAD_TEST_RESOURCE \
  --resource-group $RESOURCE_GROUP \
  --load-test-config-file test.yaml

Related command

az load test create

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (azdev required; see .azure-pipelines/templates/azdev_setup.yml for the install command until azdev==0.2.11b1 is on PyPI)
  • My extension version conforms to the Extension version schema

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.json automatically.
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.

@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jun 22, 2026

Copy link
Copy Markdown
️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi @copilot,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

Copilot AI changed the title [WIP] Fix az load test create to not require test-id from CLI [Load] Fix Azure/azure-cli-extensions#10020: az load test create: Fix --test-id not required when testId is specified in YAML config file Jun 22, 2026
Copilot AI requested a review from a0x1ab June 22, 2026 22:40
@yonzhan

yonzhan commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Load

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants