[EventGrid] Add CLI support for 2020-04-01-preview and mark preview features with is_Preview=True#14027
[EventGrid] Add CLI support for 2020-04-01-preview and mark preview features with is_Preview=True#14027haroldrandom merged 24 commits intoAzure:devfrom
Conversation
…review=true for previewed features only and re-record the tests
|
Event Grid |
|
Hello @myronfanqiu @haroldrandom , @qianwens and @Juliehzl , Can you please helpo review this PR and help with failures. Some of them does not make sense as these same arguments/commands were used in CLI extension. For example, one of the linter errors complains that the argument destination-resource-group ends with resource-group in the name. I changed that to destination-resource-group-name and the same error occurs. Can you please provide some help here? thanks |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
@ahamad-MS Hi, please solve other CI issues except for the linter one. We're discussing about the resource group naming rule. |
|
Hi, @ahamad-MS . I don't see what you said related to the CI failure. Instead, |
|
Hello @haroldrandom .. This error is observed locally when I ran azdev liter eventgrid. you are right that import error comes in the online check and I am not sure why this is also happening. i dont see it locally. Any suggestion on how to resolve it? |
The output indicates the file The question why it doesn't occur previously is that the class |
|
Thanks @haroldrandom for the discussion on teams. As I showed you, the python SDK module for EventGrid is correctly installed on my local machine and my local tests are running fine with no issues along with azdev style. When looking in model files under $root\azure-cli\env3\Lib\site-packages\azure\mgmt\eventgrid\models , we saw resourcesku was defined and used correctly. Also, init.py file was referencing/importing it correctly. Please note the setup.py file is referring the correct python package (namely, 'azure-mgmt-eventgrid~=3.0.0rc7',) Hence, I believe it is something related to the github setting or the check itself where it is not correctly referencing the correct package. This seems an infra issue Please let me know if more info needed. |
|
@myronfanqiu All comments addressed. If additional info needed, let us discuss in person. |
|
@yonzhan Can you please provide an ETA when this PR will be merged? thanks |
|
@ahamad-MS @Juliehzl will help you merge it by this Sprint. |
| - name: List all partner registrations in a resource group whose name contains the pattern "XYZ" | ||
| text: az eventgrid partner registration list -g rg1 --odata-query "Contains(name, 'XYZ')" | ||
| - name: List all partner registrations in a resource group except the partner registration with name "name1" | ||
| text: az eventgrid partner registration list -g rg1 --odata-query "NOT (name eq 'name1')" |
There was a problem hiding this comment.
should --odata-query be --filter? cli already has a global parameter named --query.
There was a problem hiding this comment.
No. This is how we handle pagination and search filtering for all existing commands
|
|
||
| included_event_types_type = CLIArgumentType( | ||
| help="A space-separated list of event types (e.g., Microsoft.Storage.BlobCreated Microsoft.Storage.BlobDeleted). To subscribe to all default event types, do not specify this argument. For event grid topics, event types are customer defined. For Azure events, e.g., Storage Accounts, IoT Hub, etc., you can query their event types using this CLI command 'az eventgrid topic-type list-event-types'.", | ||
| help="A space-separated list of event types (e.g., Microsoft.Storage.BlobCreated and Microsoft.Storage.BlobDeleted). In order to subscribe to all default event types, do not specify any value for this argument. For event grid topics, event types are customer defined. For Azure events, e.g., Storage Accounts, IoT Hub, etc., you can query their event types using this CLI command 'az eventgrid topic-type list-event-types'.", |
There was a problem hiding this comment.
Is there a way to get all related types?
There was a problem hiding this comment.
The "provided" help text is already helping user to get this info specifically:
you can query their event types using this CLI command 'az eventgrid topic-type list-event-types'.
| c.argument('domain_name', arg_type=domain_name_type) | ||
| c.argument('domain_topic_name', arg_type=domain_topic_name_type) | ||
| c.argument('system_topic_name', arg_type=system_topic_name_type) | ||
| c.argument('source', help="The ARM Id for the topic, e.g., /subscriptions/{SubId}/resourceGroups/{RgName}/providers/Microsoft.Storage/storageAccounts/{AccountName}") |
There was a problem hiding this comment.
--source should be arm resource id for topic, right? could we use topic resource id as example not storage account resource id?
There was a problem hiding this comment.
No. This is not same as resource id. the word "source" needs to be maintained and used here. Also, this copied exactly from Event Grid CLI extension and user are using it this way.
There was a problem hiding this comment.
From the example you provided, it is storage account resource id, right? CLI extension is used for private preview commands and for cli modules, we need to be consistent with cli command guidline.
here we want the description for --source could be more clear. If it is not resource id, could you provide another example?
There was a problem hiding this comment.
@Juliehzl source is a concept used in Event Grid and messaging world. it just happens to be the arm id for the system topic (Storage in this case). We will not change the name (source) as this is the expected name we want to use in our documentation and command. this is unique to event grid and we use source-resource-id in event subsription creation/update command and yes it matches what you are talking about. The case here is totally different.
This is still by design and won't fix.
|
|
||
| with self.command_group('eventgrid system-topic', system_topics_mgmt_util, client_factory=system_topics_factory, is_preview=True) as g: | ||
| g.show_command('show', 'get') | ||
| g.command('delete', 'delete') |
There was a problem hiding this comment.
could we add confirmation=True for all delete commands?
There was a problem hiding this comment.
No. We keep consistency with all other existing delete commands.
|
Hello @Juliehzl all comments resolved. Please merge the changes asap. thx |
mmyyrroonn
left a comment
There was a problem hiding this comment.
Approved for private link part. 😃
|
@Juliehzl Please help review this PR and get it merged by this Sprint. |
|
|
@Juliehzl What is the ETA for merging this change? |
src/azure-cli/azure/cli/command_modules/eventgrid/_client_factory.py
Outdated
Show resolved
Hide resolved
|
@myronfanqiu All new comments addressed on 7/6 are addressed. |
Description
This PR is to add support for all the previewed and GA'ed features from event Grid CLI extension. We are marking all the features that are still in preview with the proper is_Preview tag and will be using this mechanism with all future releases.
Features included in GA:
Features that are still in preview:
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.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.