Repository navigation
[Synapse] az synapse workspace create: /update: Fix repository argument validation and warning message formatting - #34313
Conversation
… validation and warning message formatting - Fix missing comma between '--root-folder' and '--project-name' in repository_config_args that caused string concatenation. - Fix warning message formatting by replacing ' ,' with ', '. - Only log warning when repository configuration arguments are provided without --repository-type, avoiding false warnings on standard workspace create/update commands. - Add unit tests for validate_repository_type.
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Thank you for your contribution Abhishek Kumar (@austinaviv)! We will review the pull request and get back to you soon. |
There was a problem hiding this comment.
🟡 Changes recommended
The repository-option warning still fires on workspace creation’s inherited root-folder default, while omitting --last-commit-id from the check leaves an ignored update option without a warning.
2 open issues
What changed in this PR
This PR addresses #34312 by refining repository-configuration warnings for az synapse workspace create/update.
Changes:
- Fixes concatenated argument names and comma spacing in warning messages.
- Adds a repository-argument presence check to limit unnecessary warnings.
- Adds unit tests for warning suppression, triggering, and formatting.
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/synapse/tests/latest/test_validators.py |
Adds repository-validator warning tests. |
src/azure-cli/azure/cli/command_modules/synapse/manual/_validators.py |
Updates warning conditions and argument-list formatting. |
Review effort: Balanced
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
…ult on workspace create and expand tests
|
Yong Zhang (@yonzhan) The review feedback has been addressed:
Could you please trigger |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
Abhishek Kumar (@austinaviv) At
To addressTick each item as you address it.
Review detailsTest validation
Upstream CI passed (50/50, per handoff), but regression coverage for the required issue conditions/output is not verified. Safe inspection of #34312 confirmed the two expectations above. The submitted unit tests provide direct validator and request-object assertions; they are not Agent execution evidence. No tests were run during this review, and the handoff supplied no separate author execution result. The inspected scenario Risk assessment26/100 · Medium The Medium rating is driven by security-sensitive behavior.
Ask the Agent Tick a box to queue an action. Requires write access to this repository.
|
az synapse workspace create: /update: Fix repository argument validation and warning message formatting
There was a problem hiding this comment.
Review comments are inline on the changed lines. See the X Engineering Agent Report.
|
Thanks Yong Zhang (@yonzhan) for running the pipeline. All 50 checks are green now. Please let me know if any further changes are needed or if this looks ready to merge. |
|
Adding mansoor sarfraz (@msarfraz) to help review |

🤖 PR Validation —⚠️ Review suggested
This PR adds warning or check suppressions. Fix the underlying warning where possible and justify each remaining suppression in a code comment or the PR description.
1 added suppression
src/azure-cli/azure/cli/command_modules/synapse/tests/latest/test_validators.pyimport azure.mgmt.cdn # pylint: disable=unused-importRelated command
az synapse workspace createaz synapse workspace updateDescription
Fixes #34312
In
src/azure-cli/azure/cli/command_modules/synapse/manual/_validators.py,validate_repository_typehad two issues:'--root-folder'and'--project-name'inrepository_config_args, which caused Python to concatenate them into'--root-folder--project-name'. Also fixed the delimiter formatting from' ,'to', '.if namespace.repository_type is None:, which caused the warning to be printed on every workspace create/update invocation even when no repository arguments were passed. Updated the check so the warning is only logged when repository configuration arguments are actually provided without--repository-type.Added unit tests in
test_validators.pyto cover all scenarios.Testing Guide
Run unit tests:
History Notes
[Synapse]
az synapse workspace create: /update: Fix repository argument validation and warning message formattingThis checklist is used to make sure that common guidelines for a pull request are followed.