Post Process Event Names Script#18419
Conversation
| try: | ||
| event_name = re.findall("Microsoft.[a-zA-Z]+.[a-zA-Z]+", event[1].__doc__)[0] | ||
| except: | ||
| print(event[0]) |
There was a problem hiding this comment.
We should be more explicit here that we weren't able to generate the mapping and sys.exit(1) at least to be sure any automation that would run this script would be stopped and blocked.
sdk/eventgrid/azure-eventgrid/swagger/postprocess_eventnames.py
Outdated
Show resolved
Hide resolved
|
/azp run python - eventgrid - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run python - eventgrid - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| @@ -0,0 +1,164 @@ | |||
| AcsChatMemberAddedToThreadWithUserEventName = ( | |||
There was a problem hiding this comment.
Why there is a swagger folder?
There was a problem hiding this comment.
just to add this sdk/eventgrid/azure-eventgrid/swagger/postprocess_eventnames.py file - we have an issue to hook it into the swagger readme itself -but for now, it exists here
also, removed the _eventmap.py file
| class_name = event[0].replace("Data", "Name") | ||
| try: | ||
| event_name = re.findall("Microsoft.[a-zA-Z]+.[a-zA-Z]+", event[1].__doc__)[0] | ||
| except: |
There was a problem hiding this comment.
Do we want to catch all types exceptions here?
There was a problem hiding this comment.
yes - since this script is to autogenerate the evenname mappings, we dont want to let anything slip by
| event_name = re.findall("Microsoft.[a-zA-Z]+.[a-zA-Z]+", event[1].__doc__)[0] | ||
| except: | ||
| # these two are just superclasses and are known exceptions. | ||
| if event[0] not in ('ContainerRegistryArtifactEventData', 'ContainerRegistryEventData'): |
There was a problem hiding this comment.
Is it possible event is not an array?
There was a problem hiding this comment.
event is always a tuple
|
/azp run python - eventgrid - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…into azure_purview_catalog * 'master' of https://github.com/Azure/azure-sdk-for-python: ignore analysis for swagger readmes (Azure#18520) [purview] add azure-purview-nspkg (Azure#18518) [AppConfiguration] Appconfig consistency (Azure#18493) [Container Registry] Improved samples (Azure#18263) [Container Registry] renamings (Azure#18492) [ServiceBus] internal code rename and sample readme update (Azure#18516) [EventHub] update link in sample readme (Azure#18517) Post Process Event Names Script (Azure#18419) [Tables] use etag from entity if match condition is given (Azure#18271) adding operation-location to headers that are scrubbed (Azure#18514)
…into azure_purview_scanning * 'master' of https://github.com/Azure/azure-sdk-for-python: (550 commits) del useless files (Azure#18528) delete existing useless files for trafficmanager (Azure#18525) Define new replacer to replace keys in recording (Azure#18294) [purview] add purview nspkg to ci (Azure#18523) ignore analysis for swagger readmes (Azure#18520) [purview] add azure-purview-nspkg (Azure#18518) [AppConfiguration] Appconfig consistency (Azure#18493) [Container Registry] Improved samples (Azure#18263) [Container Registry] renamings (Azure#18492) [ServiceBus] internal code rename and sample readme update (Azure#18516) [EventHub] update link in sample readme (Azure#18517) Post Process Event Names Script (Azure#18419) [Tables] use etag from entity if match condition is given (Azure#18271) adding operation-location to headers that are scrubbed (Azure#18514) [Tables] Adds support for AzureNamedKeyCredential (Azure#18456) [Tables] delete_entity takes an entity instead of row and partition key (Azure#18269) [Tables] Removed TableEntity attribute wrapper (Azure#18489) [EventHub&ServiceBus] Bump uAMQP dependency (Azure#17942) [ServiceBus] add keyword override support to update_ methods in mgmt module (Azure#18210) Add compatibility switch to disable CAE (Azure#18148) ...
| WebSlotSwapWithPreviewStartedEventName = 'Microsoft.Web.SlotSwapWithPreviewStarted' | ||
|
|
||
| # these names below are for backward compat only - refrain from using them. | ||
| AcsChatMemberAddedToThreadWithUserEventName = 'Microsoft.Communication.ChatMemberAddedToThreadWithUser' |
Fixes #18235
Fixes #18365