-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Add GetLatestVersionName api in Gallery #23633
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
base: feature/cplat-2022-08-03
Are you sure you want to change the base?
Add GetLatestVersionName api in Gallery #23633
Conversation
Hi, @jackyChenAzure 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
|
compared swaggers (via Oad v0.10.4)] | new version | base version |
---|---|---|
gallery.json | 2022-08-03(6a94c39) | 2022-03-03(main) |
gallery.json | 2022-08-03(6a94c39) | 2020-09-30(main) |
The following breaking changes are detected by comparison with the latest stable version:
Rule | Message |
---|---|
1047 - XmsEnumChanged |
The new version has a different x-ms-enum 'name' than the previous one. New: GalleryRP/stable/2022-08-03/gallery.json#L2615:9 Old: GalleryRP/stable/2022-03-03/gallery.json#L2560:9 |
The following breaking changes are detected by comparison with the latest preview version:
️❌
LintDiff: 2 Errors, 2 Warnings failed [Detail]
compared tags (via openapi-validator v2.1.3) | new version | base version |
---|---|---|
package-2022-08-03 | package-2022-08-03(6a94c39) | package-2022-08-03(feature/cplat-2022-08-03) |
[must fix]The following errors/warnings are introduced by current PR:
Rule | Message | Related RPC [For API reviewers] |
---|---|---|
PathForNestedResource |
The path for nested resource doest not meet the valid resource pattern. Location: GalleryRP/stable/2022-08-03/gallery.json#L848 |
RPC-Uri-V1-06,RPC-Put-V1-02 |
GetCollectionOnlyHasValueAndNextLink |
Get endpoints for collections of resources must only have the value and nextLink properties in their model.Location: GalleryRP/stable/2022-08-03/gallery.json#L885 |
|
Parameter 'api-version' is referenced but not defined in the global parameters section of Service Definition Location: GalleryRP/stable/2022-08-03/gallery.json#L855 |
||
Not using the common-types defined parameter 'resourceGroupName'. Location: GalleryRP/stable/2022-08-03/gallery.json#L855 |
The following errors/warnings exist before current PR submission:
Only 30 items are listed, please refer to log for more details.
Rule | Message |
---|---|
ResourceNameRestriction |
The resource name parameter 'galleryName' should be defined with a 'pattern' restriction. Location: GalleryRP/stable/2022-08-03/gallery.json#L37 |
PutResponseSchemaDescription |
Description of 200 response code of a PUT operation MUST include term 'update'. Location: GalleryRP/stable/2022-08-03/gallery.json#L71 |
LroLocationHeader |
A 202 response should include an Location response header. Location: GalleryRP/stable/2022-08-03/gallery.json#L84 |
LroErrorContent |
Error response content of long running operations must follow the error schema provided in the common types v2 and above. Location: GalleryRP/stable/2022-08-03/gallery.json#L93 |
PatchResponseCode |
LRO PATCH must have 200 and 202 return codes. Location: GalleryRP/stable/2022-08-03/gallery.json#L113 |
LroPatch202 |
The async patch operation should return 202. Location: GalleryRP/stable/2022-08-03/gallery.json#L146 |
LroErrorContent |
Error response content of long running operations must follow the error schema provided in the common types v2 and above. Location: GalleryRP/stable/2022-08-03/gallery.json#L156 |
ParametersInPointGet |
Query parameter $select should be removed. Point Get's MUST not have query parameters other than api version. Location: GalleryRP/stable/2022-08-03/gallery.json#L173 |
ParametersInPointGet |
Query parameter $expand should be removed. Point Get's MUST not have query parameters other than api version. Location: GalleryRP/stable/2022-08-03/gallery.json#L173 |
LroLocationHeader |
A 202 response should include an Location response header. Location: GalleryRP/stable/2022-08-03/gallery.json#L265 |
LroErrorContent |
Error response content of long running operations must follow the error schema provided in the common types v2 and above. Location: GalleryRP/stable/2022-08-03/gallery.json#L274 |
ResourceNameRestriction |
The resource name parameter 'galleryName' should be defined with a 'pattern' restriction. Location: GalleryRP/stable/2022-08-03/gallery.json#L286 |
ResourceNameRestriction |
The resource name parameter 'galleryImageName' should be defined with a 'pattern' restriction. Location: GalleryRP/stable/2022-08-03/gallery.json#L286 |
PutResponseSchemaDescription |
Description of 200 response code of a PUT operation MUST include term 'update'. Location: GalleryRP/stable/2022-08-03/gallery.json#L327 |
LroLocationHeader |
A 202 response should include an Location response header. Location: GalleryRP/stable/2022-08-03/gallery.json#L340 |
LroErrorContent |
Error response content of long running operations must follow the error schema provided in the common types v2 and above. Location: GalleryRP/stable/2022-08-03/gallery.json#L349 |
PatchResponseCode |
LRO PATCH must have 200 and 202 return codes. Location: GalleryRP/stable/2022-08-03/gallery.json#L360 |
LroPatch202 |
The async patch operation should return 202. Location: GalleryRP/stable/2022-08-03/gallery.json#L400 |
LroErrorContent |
Error response content of long running operations must follow the error schema provided in the common types v2 and above. Location: GalleryRP/stable/2022-08-03/gallery.json#L410 |
LroLocationHeader |
A 202 response should include an Location response header. Location: GalleryRP/stable/2022-08-03/gallery.json#L507 |
LroErrorContent |
Error response content of long running operations must follow the error schema provided in the common types v2 and above. Location: GalleryRP/stable/2022-08-03/gallery.json#L516 |
ResourceNameRestriction |
The resource name parameter 'galleryName' should be defined with a 'pattern' restriction. Location: GalleryRP/stable/2022-08-03/gallery.json#L528 |
ResourceNameRestriction |
The resource name parameter 'galleryImageName' should be defined with a 'pattern' restriction. Location: GalleryRP/stable/2022-08-03/gallery.json#L528 |
ResourceNameRestriction |
The resource name parameter 'galleryImageVersionName' should be defined with a 'pattern' restriction. Location: GalleryRP/stable/2022-08-03/gallery.json#L528 |
PutResponseSchemaDescription |
Description of 200 response code of a PUT operation MUST include term 'update'. Location: GalleryRP/stable/2022-08-03/gallery.json#L576 |
LroLocationHeader |
A 202 response should include an Location response header. Location: GalleryRP/stable/2022-08-03/gallery.json#L589 |
LroErrorContent |
Error response content of long running operations must follow the error schema provided in the common types v2 and above. Location: GalleryRP/stable/2022-08-03/gallery.json#L598 |
PatchResponseCode |
LRO PATCH must have 200 and 202 return codes. Location: GalleryRP/stable/2022-08-03/gallery.json#L633 |
LroPatch202 |
The async patch operation should return 202. Location: GalleryRP/stable/2022-08-03/gallery.json#L680 |
LroErrorContent |
Error response content of long running operations must follow the error schema provided in the common types v2 and above. Location: GalleryRP/stable/2022-08-03/gallery.json#L690 |
️⚠️
Avocado: 1 Warnings warning [Detail]
Rule | Message |
---|---|
The default tag contains multiple API versions swaggers. readme: specification/compute/resource-manager/readme.md tag: specification/compute/resource-manager/readme.md#tag-package-2022-08-03 |
️❌
SwaggerAPIView: 0 Errors, 0 Warnings failed [Detail]
️️✔️
CadlAPIView succeeded [Detail] [Expand]
️️✔️
TypeSpecAPIView succeeded [Detail] [Expand]
️❌
ModelValidation: 5 Errors, 0 Warnings failed [Detail]
️️✔️
SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️
PrettierCheck succeeded [Detail] [Expand]
Validation passes for PrettierCheck.
️️✔️
SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️
CadlValidation succeeded [Detail] [Expand]
Validation passes for CadlValidation.
️️✔️
TypeSpec Validation succeeded [Detail] [Expand]
Validation passes for TypeSpec Validation.
️️✔️
PR Summary succeeded [Detail] [Expand]
Validation passes for Summary.
Swagger Generation Artifacts
|
Generated ApiView
|
Thank you for your contribution jackyChenAzure! We will review the pull request and get back to you soon. |
Hi @jackyChenAzure, Your PR has some issues. Please fix the CI sequentially by following the order of
|
Hi, @jackyChenAzure your PR are labelled with WaitForARMFeedback. A notification email will be sent out shortly afterwards to notify ARM review board([email protected]). |
Hi @jackyChenAzure, one or multiple breaking change(s) is detected in your PR. Please check out the breaking change(s), and provide business justification in the PR comment and @ PR assignee why you must have these change(s), and how external customer impact can be mitigated. Please ensure to follow breaking change policy to request breaking change review and approval before proceeding swagger PR review. |
There are a bunch of breaking changes reported on this PR. Please get a breaking changes approval from Azure Breaking Changes Reviewers [email protected] and ARM can review the changes afterwards. And there're some lint error that you must fix. Once you have the approval and address the lint issues, please remove the "ARMChangesRequested" label from the PR to make the PR visible to the ARM reviewers. |
Please ensure to respond feedbacks from the ARM API reviewer. When you are ready to continue the ARM API review, please remove |
...RP/stable/2022-08-03/examples/galleryExamples/GalleryImageVersion_Get_LatestVersionName.json
Show resolved
Hide resolved
@@ -3144,6 +3197,30 @@ | |||
"description": "region of the Gallery Image Version." | |||
} | |||
} | |||
}, | |||
"latestVersion": { |
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.
Standalone definitions should start with a capital letter.
"id": { | ||
"readOnly": true, | ||
"type": "string", | ||
"description": "Resource Id" |
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.
Make these descriptions more specific. ex: 'Resource Id of the latest version of a specific image.' (if that description is correct). Same for the other 2 properties here.
@@ -3144,6 +3197,30 @@ | |||
"description": "region of the Gallery Image Version." | |||
} | |||
} | |||
}, |
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.
Hold your horses.
How is this new property different from the property just above it called LatestGalleryImageVersion? https://github.com/Azure/azure-rest-api-specs/pull/23633/files#diff-2d57b1e3ef500806be7f276354fc7ae66b634ce4a9ba619f0b983855859acf35R3186
The two descriptions for these 2 properties are literally identical. Why id your property being added at all? How is it different?
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.
it's nested. LatestGalleryImageVersion is a property of latestVersion.
latestVersion is an ARM resource which has id, name, type. LatestGalleryImageVersion is the property of it, which contains only region and version name.
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.
I think I should change the description of them, to make them clear
There is only 1 Breaking change the tools picked up, and it is not due to this PR, it is due to an unexpected change to the older version after the feature branch was made. It will be dealt with before release. |
...RP/stable/2022-08-03/examples/galleryExamples/GalleryImageVersion_Get_LatestVersionName.json
Show resolved
Hide resolved
Marking as Approved-BreakingChange only to unblock merge to feature branch. |
@jackyChenAzure I have removed the |
Next Steps to MergeNext steps that must be taken to merge this PR:
|
@jackyChenAzure please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
ARM API Information (Control Plane)
MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.
Azure 1st Party Service can try out the Shift Left experience to initiate API design review from ADO code repo. If you are interested, may request engineering support by filling in with the form https://aka.ms/ShiftLeftSupportForm.
Changelog
This Pull Request is to add a new feature
Users can call this endpoint to get the name of the latest version of gallery image in a region. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versionNames/latest"
and it will return the region and the name of latest gallery image version. The name is a string.
Add a changelog entry for this PR by answering the following questions:
Contribution checklist (MS Employees Only):
If any further question about AME onboarding or validation tools, please view the FAQ.
ARM API Review Checklist
Otherwise your PR may be subject to ARM review requirements. Complete the following:
Check this box if any of the following apply to the PR so that the label "ARMReview" and "WaitForARMFeedback" will be added by bot to kick off ARM API Review. Missing to check this box in the following scenario may result in delays to the ARM manifest review and deployment.
-[ ] To review changes efficiently, ensure you copy the existing version into the new directory structure for first commit and then push new changes, including version updates, in separate commits. You can use OpenAPIHub to initialize the PR for adding a new version. For more details refer to the wiki.
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 you have any breaking changes as defined in the Breaking Change Policy, request approval from the Breaking Change Review Board.
Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Additional details on the process and office hours are on the Breaking Change Wiki.
NOTE: To update API(s) in public preview for over 1 year (refer to Retirement of Previews)
Please follow the link to find more details on PR review process.