-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
AKV: Bring changes from two recent PRs to 7.2-preview into 7.3-preview #12322
Conversation
Hi, @lusitanian Thanks for your PR. I am workflow bot for review process. Here are some small tips. Any feedback about review process or workflow bot, pls contact swagger and tools team. [email protected] |
Swagger Validation Report
|
Rule | Message |
---|---|
1038 - AddedPath |
The new version is adding a path that was not found in the old version. New: Microsoft.KeyVault/preview/7.3-preview/rbac.json#L30:5 |
️⚠️
LintDiff: 1 Warnings warning [Detail]
- Linted configuring files (Based on source branch, openapi-validator v1.6.0 , classic-openapi-validator v1.1.5 )
- Linted configuring files (Based on target branch, openapi-validator v1.6.0 , classic-openapi-validator v1.1.5 )
Rule | Message |
---|---|
Consider using x-ms-client-flatten to provide a better end user experience New: Microsoft.KeyVault/preview/7.3-preview/rbac.json#L519 |
️️✔️
Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️❌
ModelValidation: 2 Errors, 0 Warnings failed [Detail]
Rule | Message |
---|---|
DOUBLE_FORWARD_SLASHES_IN_URL |
In operation "RoleDefinitions_Delete", example for parameter "scope": "/" starts with a forward slash and the path template: "/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}" contains a forward slash before the parameter starts. This will cause double forward slashes in the request url. Thus making it incorrect. Please rectify the example. Url: Microsoft.KeyVault/preview/7.3-preview/rbac.json#L38 |
DOUBLE_FORWARD_SLASHES_IN_URL |
In operation "RoleDefinitions_Get", example for parameter "scope": "/" starts with a forward slash and the path template: "/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}" contains a forward slash before the parameter starts. This will cause double forward slashes in the request url. Thus making it incorrect. Please rectify the example. Url: Microsoft.KeyVault/preview/7.3-preview/rbac.json#L139 |
️️✔️
SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️
[Staging] Cross Version BreakingChange (Base on preview version) succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️
[Staging] Cross Version BreakingChange (Base on stable version) succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️
CredScan succeeded [Detail] [Expand]
There is no credential detected.
Swagger Generation Artifacts
|
Hi @lusitanian, Your PR has some issues. Please fix the CI sequentially by following the order of
|
NewApiVersionRequired reason: |
...data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/DeleteRoleDefinition-example.json
Outdated
Show resolved
Hide resolved
...lt/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetRoleDefinition-example.json
Outdated
Show resolved
Hide resolved
...lt/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/PutRoleDefinition-example.json
Outdated
Show resolved
Hide resolved
specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/rbac.json
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Causing parsing error.
...data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/DeleteRoleDefinition-example.json
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few minor fixes to new examples.
...data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/DeleteRoleDefinition-example.json
Outdated
Show resolved
Hide resolved
...lt/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetRoleDefinition-example.json
Outdated
Show resolved
Hide resolved
There are merge conflicts which need to be resolved. Also can you please fix the model validation and prettier check CI failures. |
e243300
to
ba3379e
Compare
@lusitanian the problem is two instances of this:
I get what's it's saying. Looking at examples, there's one of just "keys" and then one like "/", while "{scope}" should be "/" or "/keys", thereby making the path template "{scope}/providers/...". Does that work? How does ARM handle this? We should probably be copying them. |
In ARM near as I can tell the root scope ("/") is rarely if ever used in URIs so it's difficult to say. That said, the service is not picky and will accept "//" or "/" for the root scope. I don't think this is a bug. |
@jhendrixMSFT is it possible we can exempt this error? I know I couldn't with the plethora of David and I discussed it offline and alternatives don't seem like good UX. It either means taking "/" out of the scope, which is inconsistent with ARM when using scopes like "keys", or accepting an empty string meaning "/", which feels like magic. SDKs could normalize this, but we'd prefer the swagger work for any client whether we generated it (and customized it) or not. |
I don't know if this type of failure can be suppressed, I will check. However, the error message states "Please rectify the example." which makes me wonder if changing the examples to "/foo" or the like is sufficient? |
That could work just to satisfy the error. We'll just hit this again when re-recorded, though. |
@heaths @jhendrixMSFT it'd be fine to pass validation but it'd be a poor example for the role def cases as generally role definitions will only be created at the root scope. |
Can we force merge this? This validation is wrong in this case - the URL will be fine, as tested by both the service and client teams. /cc @lmazuel who's been on a few threads/PRs coming in hot from Key Vault and Managed HSM. |
From the conversation is sounds to me that the In the meantime I will work on getting this merged. |
Azure#12322) * Bring changes from two recent PRs to 7.2-preview into 7.3-preview for AKV * address review feedback * add missing scope strings to examples * hopefully fixing very broken rebase/merge * re-remove re-appearing trailing commas * one more.. * ran prettier-fix
Bringing in custom role definitions as well as a fix to KeyOperationResult that were recently merged only into 7.2-preview and not 7.3-preview.
MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.
Changelog
Please ensure to add changelog with this PR by answering the following questions.
Contribution checklist:
If any further question about AME onboarding or validation tools, please view the FAQ.
ARM API Review Checklist
Ensure to check this box if one of the following scenarios meet updates in the PR, so that label “WaitForARMFeedback” will be added automatically to involve ARM API Review. Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs, all “removals” and “adding a new property” no more require ARM API review.
Please ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.
If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
Breaking Change Review Checklist
If there are following updates in the PR, ensure to request an approval from API Review Board as defined in the Breaking Change Policy.
Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
Please follow the link to find more details on PR review process.