Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{Compute} az sig: Migrate commands using Code Gen V2 #30524

Merged
merged 7 commits into from
Dec 17, 2024

Conversation

yanzhudd
Copy link
Contributor

@yanzhudd yanzhudd commented Dec 16, 2024

Related command

az sig create/update/show/list-shared

Description

Migrate sig command group to Code Gen V2
Note: The subcommand groups have not yet been migrated

AAZ PR: Azure/aaz#647

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.

Copy link

azure-client-tools-bot-prd bot commented Dec 16, 2024

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

Copy link

azure-client-tools-bot-prd bot commented Dec 16, 2024

❌AzureCLI-BreakingChangeTest
❌vm
rule cmd_name rule_message suggest_message
1007 - ParaRemove sig update cmd sig update removed parameter select please add back parameter select for cmd sig update
⚠️ 1006 - ParaAdd sig create cmd sig create added parameter no_wait
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter description: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter description: added property type=string
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter eula: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter eula: added property type=string
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter gallery_name: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter gallery_name: added property type=string
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter location: added property aaz_type=string
⚠️ 1010 - ParaPropUpdate sig create cmd sig create update parameter location: updated property type from custom_type to string
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter permissions: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter permissions: added property type=string
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter public_name_prefix: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter public_name_prefix: added property type=string
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter publisher_contact: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter publisher_contact: added property type=string
⚠️ 1010 - ParaPropUpdate sig create cmd sig create update parameter publisher_contact: updated property options from ['--publisher-email'] to ['--publisher-contact', '--publisher-email']
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter publisher_uri: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter publisher_uri: added property type=string
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter resource_group_name: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter resource_group_name: added property type=string
⚠️ 1010 - ParaPropUpdate sig create cmd sig create update parameter resource_group_name: updated property name from resource_group_name to resource_group
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter soft_delete: added property aaz_type=bool
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter soft_delete: added property type=bool
⚠️ 1009 - ParaPropRemove sig create cmd sig create update parameter soft_delete: removed property deprecate_info_hide=True
⚠️ 1009 - ParaPropRemove sig create cmd sig create update parameter soft_delete: removed property deprecate_info_target=soft_delete
⚠️ 1010 - ParaPropUpdate sig create cmd sig create update parameter soft_delete: updated property choices from ['false', 'true'] to ['0', '1', 'f', 'false', 'n', 'no', 't', 'true', 'y', 'yes']
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter tags: added property aaz_type=AAZDictArg
⚠️ 1008 - ParaPropAdd sig create cmd sig create update parameter tags: added property type=Dict<String,String>
⚠️ 1010 - ParaPropUpdate sig create cmd sig create update parameter tags: updated property nargs from * to +
⚠️ 1006 - ParaAdd sig list cmd sig list added parameter pagination_limit
⚠️ 1006 - ParaAdd sig list cmd sig list added parameter pagination_token
⚠️ 1006 - ParaAdd sig list-shared cmd sig list-shared added parameter pagination_limit
⚠️ 1006 - ParaAdd sig list-shared cmd sig list-shared added parameter pagination_token
⚠️ 1008 - ParaPropAdd sig list-shared cmd sig list-shared update parameter location: added property aaz_type=string
⚠️ 1010 - ParaPropUpdate sig list-shared cmd sig list-shared update parameter location: updated property type from custom_type to string
⚠️ 1008 - ParaPropAdd sig list-shared cmd sig list-shared update parameter shared_to: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig list-shared cmd sig list-shared update parameter shared_to: added property type=string
⚠️ 1008 - ParaPropAdd sig show cmd sig show update parameter gallery_name: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig show cmd sig show update parameter gallery_name: added property type=string
⚠️ 1008 - ParaPropAdd sig show cmd sig show update parameter resource_group_name: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig show cmd sig show update parameter resource_group_name: added property type=string
⚠️ 1010 - ParaPropUpdate sig show cmd sig show update parameter resource_group_name: updated property name from resource_group_name to resource_group
⚠️ 1008 - ParaPropAdd sig show cmd sig show update parameter select: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig show cmd sig show update parameter select: added property choices=['Permissions']
⚠️ 1008 - ParaPropAdd sig show cmd sig show update parameter select: added property type=string
⚠️ 1008 - ParaPropAdd sig show cmd sig show update parameter sharing_groups: added property aaz_type=bool
⚠️ 1008 - ParaPropAdd sig show cmd sig show update parameter sharing_groups: added property choices=['0', '1', 'f', 'false', 'n', 'no', 't', 'true', 'y', 'yes']
⚠️ 1008 - ParaPropAdd sig show cmd sig show update parameter sharing_groups: added property nargs=?
⚠️ 1008 - ParaPropAdd sig show cmd sig show update parameter sharing_groups: added property type=bool
⚠️ 1006 - ParaAdd sig update cmd sig update added parameter location
⚠️ 1006 - ParaAdd sig update cmd sig update added parameter no_wait
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter eula: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter eula: added property type=string
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter gallery_name: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter gallery_name: added property id_part=name
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter gallery_name: added property type=string
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter permissions: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter permissions: added property type=string
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter properties_to_add: added property aaz_type=AAZGenericUpdateAddArg
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter properties_to_remove: added property aaz_type=AAZGenericUpdateRemoveArg
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter properties_to_set: added property aaz_type=AAZGenericUpdateSetArg
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter public_name_prefix: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter public_name_prefix: added property type=string
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter publisher_contact: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter publisher_contact: added property type=string
⚠️ 1010 - ParaPropUpdate sig update cmd sig update update parameter publisher_contact: updated property options from ['--publisher-email'] to ['--publisher-contact', '--publisher-email']
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter publisher_uri: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter publisher_uri: added property type=string
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter resource_group_name: added property aaz_type=string
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter resource_group_name: added property type=string
⚠️ 1010 - ParaPropUpdate sig update cmd sig update update parameter resource_group_name: updated property name from resource_group_name to resource_group
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter soft_delete: added property aaz_type=bool
⚠️ 1008 - ParaPropAdd sig update cmd sig update update parameter soft_delete: added property type=bool
⚠️ 1009 - ParaPropRemove sig update cmd sig update update parameter soft_delete: removed property deprecate_info_hide=True
⚠️ 1009 - ParaPropRemove sig update cmd sig update update parameter soft_delete: removed property deprecate_info_target=soft_delete
⚠️ 1010 - ParaPropUpdate sig update cmd sig update update parameter soft_delete: updated property choices from ['false', 'true'] to ['0', '1', 'f', 'false', 'n', 'no', 't', 'true', 'y', 'yes']
⚠️ 1001 - CmdAdd sig wait cmd sig wait added

Copy link

⚠️Your changes in this PR will be released on Jan 14, 2025 due to CCOA (extend to Jan 6, 2025)

@yonzhan
Copy link
Collaborator

yonzhan commented Dec 16, 2024

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

@yanzhudd
Copy link
Contributor Author

yanzhudd commented Dec 16, 2024

image
The --select parameter to az sig update command was not used. Now just remove it.

"version": "2021-10-01",
"version": "2019-12-01",
Copy link
Contributor

@zhoxing-ms zhoxing-ms Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to downgrade the api-version here?

Copy link
Contributor Author

@yanzhudd yanzhudd Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be 2019-12-01 instead of 2021-10-01, and this PR just fix it.
I'll fix the API version for az sig list command in 2020-09-01-hybrid as well.

Comment on lines +7749 to +7754
# This command is commented out because the backend service currently prevents updating 'Private' to 'Community'.
# self.cmd('sig update -g {rg} --gallery-name {gallery1} --permissions Community '
# '--publisher-uri pubUri --publisher-email test@123.com --eula eula --public-name-prefix pubName',
# checks=[
# self.check('sharingProfile.permissions', 'Community')
# ])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to remove this test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added a comment for it:
image
It is the same as

# Test shared gallery
# service team has temporarily disable the feature of updating permissions and will enable it in a few months
# self.cmd('sig update --gallery-name {gallery} --resource-group {rg} --permissions groups')

@yanzhudd yanzhudd merged commit 1bc8703 into Azure:dev Dec 17, 2024
53 checks passed
@yanzhudd yanzhudd deleted the migrate-sig-command branch December 17, 2024 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Compute az vm/vmss/image/disk/snapshot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants