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

Support AAD Auth in EventGrid data plane client #25935

Merged
merged 4 commits into from
Sep 26, 2023

Conversation

batrived
Copy link
Contributor

@batrived batrived commented Sep 22, 2023

Data Plane API - Pull Request

API Info: The Basics

Most of the information about your service should be captured in the issue that serves as your API Spec engagement record.

  • Link to API Spec engagement record issue:

Is this review for (select one):

  • a private preview
  • a public preview
  • GA release

Change Scope

This section will help us focus on the specific parts of your API that are new or have been modified.
Please share a link to the design document for the new APIs, a link to the previous API Spec document (if applicable), and the root paths that have been updated.

  • Design Document:
  • Previous API Spec Doc:
  • Updated paths:

Viewing API changes

For convenient view of the API changes made by this PR, refer to the URLs provided in the table
in the Generated ApiView comment added to this PR. You can use ApiView to show API versions diff.

Suppressing failures

If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the
Swagger-Suppression-Process
to get approval.

❔Got questions? Need additional info?? We are here to help!

Contact us!

The Azure API Review Board is dedicated to helping you create amazing APIs. You can read about our mission and learn more about our process on our wiki.

Click here for links to tools, specs, guidelines & other good stuff

Tooling

Guidelines & Specifications

Helpful Links

@openapi-pipeline-app
Copy link

Automatic PR validation started. This comment will be populated with next steps to merge this PR once validation is completed. Please wait ⌛.

@openapi-pipeline-app
Copy link

Swagger pipeline can not start as the pull request has merge conflicts.

@openapi-pipeline-app
Copy link

Swagger pipeline can not start as the pull request has merge conflicts.

@openapi-pipeline-app
Copy link

Swagger pipeline started successfully. If there is ApiView generated, it will be updated in this comment.

@JoshLove-msft
Copy link
Member

/cc @l0lawrence

@openapi-pipeline-app
Copy link

Automatic PR validation started. This comment will be populated with next steps to merge this PR once validation is completed. Please wait ⌛.

@openapi-pipeline-app
Copy link

Swagger pipeline can not start as the pull request has merge conflicts.

1 similar comment
@openapi-pipeline-app
Copy link

Swagger pipeline can not start as the pull request has merge conflicts.

@openapi-pipeline-app
Copy link

Swagger pipeline started successfully. If there is ApiView generated, it will be updated in this comment.

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Sep 22, 2023

Next Steps to Merge

Next steps that must be taken to merge this PR:
  • ❌ The required check named Swagger ModelValidation has failed. Refer to the check in the PR's 'Checks' tab for details on how to fix it.

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Sep 22, 2023

Swagger Validation Report

️️✔️BreakingChange succeeded [Detail] [Expand]
There are no breaking changes.
compared swaggers (via Oad v0.10.4)] new version base version
EventGrid.json 2023-06-01-preview(565ff1a) 2023-06-01-preview(main)
️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️⚠️LintDiff: 1 Warnings warning [Detail]
compared tags (via openapi-validator v2.1.5) new version base version
package-2023-06-01-preview package-2023-06-01-preview(565ff1a) package-2023-06-01-preview(main)

[must fix]The following errors/warnings are introduced by current PR:

Rule Message Related RPC [For API reviewers]
⚠️ SecurityDefinitionDescription Security definition should have a description.
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L53


The following errors/warnings exist before current PR submission:

Rule Message
⚠️ SecurityDefinitionDescription Security definition should have a description.
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L48
⚠️ OperationId OperationId should be of the form 'Noun_Verb'
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L66
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L75
⚠️ ListInOperationName Since operation response has model definition in array type, it should be of the form '_list'.
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L123
⚠️ PaginationResponse Operation might be pageable. Consider adding the x-ms-pageable extension.
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L123
⚠️ OperationId OperationId should be of the form 'Noun_Verb'
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L124
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L130
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L137
⚠️ PaginationResponse Operation might be pageable. Consider adding the x-ms-pageable extension.
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L192
⚠️ OperationId OperationId should be of the form 'Noun_Verb'
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L193
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L199
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L206
⚠️ PaginationResponse Operation might be pageable. Consider adding the x-ms-pageable extension.
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L251
⚠️ OperationId OperationId should be of the form 'Noun_Verb'
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L252
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L258
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L265
⚠️ PaginationResponse Operation might be pageable. Consider adding the x-ms-pageable extension.
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L310
⚠️ OperationId OperationId should be of the form 'Noun_Verb'
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L311
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L317
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L324
⚠️ SchemaNamesConvention Schema name should be Pascal case.
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L411
⚠️ SchemaNamesConvention Schema name should be Pascal case.
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L445
⚠️ SchemaNamesConvention Schema name should be Pascal case.
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L458
⚠️ PropertyType Property should have a defined type.
Location: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L503
️️✔️Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️SwaggerAPIView succeeded [Detail] [Expand]
️️✔️TypeSpecAPIView succeeded [Detail] [Expand]
️❌ModelValidation: 1 Errors, 0 Warnings failed [Detail]
Rule Message
INVALID_TYPE Expected type but found type object
Url: Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json#L95:22
ExampleUrl: preview/2023-06-01-preview/examples/publish.json#L24:16
️️✔️SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️PoliCheck succeeded [Detail] [Expand]
Validation passed for PoliCheck.
️️✔️PrettierCheck succeeded [Detail] [Expand]
Validation passes for PrettierCheck.
️️✔️SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️Lint(RPaaS) succeeded [Detail] [Expand]
Validation passes for Lint(RPaaS).
️️✔️PR Summary succeeded [Detail] [Expand]
Validation passes for Summary.
️️✔️Automated merging requirements met succeeded [Detail] [Expand]
Posted by Swagger Pipeline | How to fix these errors?

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Sep 22, 2023

Swagger Generation Artifacts

️️✔️ApiDocPreview succeeded [Detail] [Expand]
 Please click here to preview with your @microsoft account. 
️️✔️SDK Breaking Change Tracking succeeded [Detail] [Expand]

Breaking Changes Tracking


️️✔️ azure-sdk-for-net-track2 succeeded [Detail] [Expand]
  • ️✔️Succeeded [Logs] Generate from 9233319cef41533afffc36ef46b1af3605be4729. SDK Automation 14.0.0
    command	pwsh ./eng/scripts/Automation-Sdk-Init.ps1 ../azure-sdk-for-net_tmp/initInput.json ../azure-sdk-for-net_tmp/initOutput.json
    warn		specification/eventgrid/Azure.Messaging.EventGrid/tspconfig.yaml skipped due to azure-sdk-for-net-track2 not found in tspconfig.yaml
    command	pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1 ../azure-sdk-for-net_tmp/generateInput.json ../azure-sdk-for-net_tmp/generateOutput.json
  • ️✔️Azure.Messaging.EventGrid [View full logs]  [Preview SDK Changes]
    info	[Changelog]
️⚠️ azure-sdk-for-python warning [Detail]
  • ⚠️Warning [Logs] Generate from 9233319cef41533afffc36ef46b1af3605be4729. SDK Automation 14.0.0
    command	sh scripts/automation_init.sh ../azure-sdk-for-python_tmp/initInput.json ../azure-sdk-for-python_tmp/initOutput.json
    cmderr	[automation_init.sh] WARNING: Skipping azure-nspkg as it is not installed.
    warn		specification/eventgrid/data-plane/readme.md skipped due to azure-sdk-for-python not found in swagger-to-sdk
    command	sh scripts/automation_generate.sh ../azure-sdk-for-python_tmp/generateInput.json ../azure-sdk-for-python_tmp/generateOutput.json
    cmderr	[automation_generate.sh]
    cmderr	[automation_generate.sh] npm notice New major version of npm available! 9.6.7 -> 10.1.0
    cmderr	[automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.1.0>
    cmderr	[automation_generate.sh] npm notice Run `npm install -g npm@10.1.0` to update!
    cmderr	[automation_generate.sh] npm notice
  • ️✔️azure-eventgrid [View full logs]  [Preview SDK Changes]
    info	[Changelog] data-plan skip changelog generation temporarily
️🔄 $(sdkName) inProgress [Detail]
Posted by Swagger Pipeline | How to fix these errors?

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Sep 22, 2023

Generated ApiView

Language Package Name ApiView Link
Python azure-eventgrid https://apiview.dev/Assemblies/Review/aa020f7fe5a24ab3b59c5d402462aa42
.Net Azure.Messaging.EventGrid There is no API change compared with the previous version
Swagger Microsoft.Storage https://apiview.dev/Assemblies/Review/2aaf560f87694edca96f565085a82aaf
TypeSpec Azure.Messaging.EventGrid https://apiview.dev/Assemblies/Review/94e2205a0f1f4d488edcb26e612b1e91

@mikeharder
Copy link
Member

mikeharder commented Sep 22, 2023

Check TypeSpec Validation is failing. To get your spec into compliance, run the following commands, review the changes, and push the updated files to your PR.

$ cd <repo>
$ git checkout <your-branch>
$ git merge <target-branch>
$ npm ci
$ npx tsv <path-to-your-spec>

@lmazuel lmazuel merged commit e835d10 into Azure:main Sep 26, 2023
@openapi-pipeline-app
Copy link

Swagger pipeline restarted successfully, please wait for status update in this comment.

jnlycklama pushed a commit that referenced this pull request Nov 8, 2023
* Support AAD Auth in EventGridClient

* Updating the scope to include .default

* reverting changes to package-lock.json

* Ran the npx tsv command
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.

5 participants