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

Post Process Event Names Script #18419

Merged
merged 7 commits into from
May 5, 2021
Merged

Conversation

rakshith91
Copy link
Contributor

@rakshith91 rakshith91 commented Apr 29, 2021

Fixes #18235
Fixes #18365

try:
event_name = re.findall("Microsoft.[a-zA-Z]+.[a-zA-Z]+", event[1].__doc__)[0]
except:
print(event[0])
Copy link
Member

Choose a reason for hiding this comment

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

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.

@rakshith91
Copy link
Contributor Author

/azp run python - eventgrid - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rakshith91
Copy link
Contributor Author

/azp run python - eventgrid - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -0,0 +1,164 @@
AcsChatMemberAddedToThreadWithUserEventName = (
Copy link
Member

Choose a reason for hiding this comment

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

Why there is a swagger folder?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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:
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to catch all types exceptions here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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'):
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible event is not an array?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

event is always a tuple

@rakshith91
Copy link
Contributor Author

/azp run python - eventgrid - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rakshith91 rakshith91 enabled auto-merge (squash) May 5, 2021 18:54
@rakshith91 rakshith91 merged commit 7f29c60 into Azure:master May 5, 2021
iscai-msft added a commit to iscai-msft/azure-sdk-for-python that referenced this pull request May 5, 2021
…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)
iscai-msft added a commit to iscai-msft/azure-sdk-for-python that referenced this pull request May 6, 2021
…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'
Copy link
Member

Choose a reason for hiding this comment

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

Reference for issue.

openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this pull request Mar 29, 2022
[DataFactory] Fix Expression mode for SqlServerStoredProcedureActivity (Azure#18419)

* update

* update

* fix

Co-authored-by: xiaojwan <[email protected]>
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.

[EventGrid] Regenerate code with latest system events Event grid must auto populate system event enum
4 participants