Skip to content

Add 'artifactTags' and 'disclaimer' field for shared gallery and community gallery.#24665

Closed
Sandido wants to merge 2 commits into
feature/cplat-2022-08-03-2ndfrom
adsandor/galdisclaimer
Closed

Add 'artifactTags' and 'disclaimer' field for shared gallery and community gallery.#24665
Sandido wants to merge 2 commits into
feature/cplat-2022-08-03-2ndfrom
adsandor/galdisclaimer

Conversation

@Sandido
Copy link
Copy Markdown
Contributor

@Sandido Sandido commented Jun 30, 2023

ARM (Control Plane) API Specification Update Pull Request

Purpose of this PR

What's the purpose of this PR? Check all that apply. This is mandatory!

Bringing this PR to the latest release new branch: #23505
Adding the new disclaimer and artifactTags properties to the Gallery RP.

  • New API version. (Such PR should have been generated with OpenAPI Hub, per this wiki doc.)
  • Update existing version for a new feature. (This is applicable only when you are revising a private preview API version.)
  • Update existing version to fix swagger quality issues in S360.
  • Other, please clarify:
    • Adding a new feature to a new API version release.

Due diligence checklist

To merge this PR, you must go through the following checklist and confirm you understood
and followed the instructions by checking all the boxes:

ARM API changes review

  • If you want for the ARM team to review this PR, you must add the ARMReview label.
  • The automation may automatically add the ARMReview label, if appropriate.
    If this happens, proceed according to guidance given in GitHub comments also added by the automation.

Breaking change review

If you have any breaking changes as defined in the Breaking Change Policy,
follow the process outlined in the High-level Breaking Change Process doc.

Getting help

@openapi-workflow-bot
Copy link
Copy Markdown

Hi, @Sandido! Thank you for your pull request. To help get your PR merged:
- Ensure you reviewed the checklists in the PR description. - Know that PR assignee is the person auto-assigned and responsible for your current PR review and approval. - 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.

@openapi-pipeline-app
Copy link
Copy Markdown

openapi-pipeline-app Bot commented Jun 30, 2023

Swagger Validation Report

️️✔️BreakingChange succeeded [Detail] [Expand]
There are no breaking changes.
️⚠️Breaking Change(Cross-Version): 1 Warnings warning [Detail]
compared swaggers (via Oad v0.10.4)] new version base version
communityGallery.json 2022-08-03(fb52afc) 2022-03-03(main)
sharedGallery.json 2022-08-03(fb52afc) 2022-03-03(main)
sharedGallery.json 2022-08-03(fb52afc) 2020-09-30(main)

The following breaking changes are detected by comparison with the latest preview version:

Rule Message
⚠️ 1007 - RemovedClientParameter The new version is missing a client parameter that was found in the old version. Was 'LocationNameParamter' removed or renamed?
New: azure-rest-api-specs/blob/fb52afc254262765d6d0929d7ae7a108435fddb7/revision#L1088:2
Old: GalleryRP/preview/2020-09-30/sharedGallery.json#L762:3
️⚠️LintDiff: 0 Warnings warning [Detail]
compared tags (via openapi-validator v2.1.4) new version base version
package-2022-08-03 package-2022-08-03(fb52afc) package-2022-08-03(feature/cplat-2022-08-03-2nd)

The following errors/warnings exist before current PR submission:

Rule Message
ResourceNameRestriction The resource name parameter 'publicGalleryName' should be defined with a 'pattern' restriction.
Location: GalleryRP/stable/2022-08-03/communityGallery.json#L37
ResourceNameRestriction The resource name parameter 'publicGalleryName' should be defined with a 'pattern' restriction.
Location: GalleryRP/stable/2022-08-03/communityGallery.json#L79
ResourceNameRestriction The resource name parameter 'galleryImageName' should be defined with a 'pattern' restriction.
Location: GalleryRP/stable/2022-08-03/communityGallery.json#L79
ResourceNameRestriction The resource name parameter 'publicGalleryName' should be defined with a 'pattern' restriction.
Location: GalleryRP/stable/2022-08-03/communityGallery.json#L124
ResourceNameRestriction The resource name parameter 'galleryImageName' should be defined with a 'pattern' restriction.
Location: GalleryRP/stable/2022-08-03/communityGallery.json#L124
ResourceNameRestriction The resource name parameter 'galleryImageVersionName' should be defined with a 'pattern' restriction.
Location: GalleryRP/stable/2022-08-03/communityGallery.json#L124
ResourceNameRestriction The resource name parameter 'publicGalleryName' should be defined with a 'pattern' restriction.
Location: GalleryRP/stable/2022-08-03/communityGallery.json#L172
ResourceNameRestriction The resource name parameter 'publicGalleryName' should be defined with a 'pattern' restriction.
Location: GalleryRP/stable/2022-08-03/communityGallery.json#L217
ResourceNameRestriction The resource name parameter 'galleryImageName' should be defined with a 'pattern' restriction.
Location: GalleryRP/stable/2022-08-03/communityGallery.json#L217
ResourceNameRestriction The resource name parameter 'galleryUniqueName' should be defined with a 'pattern' restriction.
Location: GalleryRP/stable/2022-08-03/sharedGallery.json#L93
ResourceNameRestriction The resource name parameter 'galleryUniqueName' should be defined with a 'pattern' restriction.
Location: GalleryRP/stable/2022-08-03/sharedGallery.json#L156
ResourceNameRestriction The resource name parameter 'galleryImageName' should be defined with a 'pattern' restriction.
Location: GalleryRP/stable/2022-08-03/sharedGallery.json#L156
ResourceNameRestriction The resource name parameter 'galleryUniqueName' should be defined with a 'pattern' restriction.
Location: GalleryRP/stable/2022-08-03/sharedGallery.json#L226
ResourceNameRestriction The resource name parameter 'galleryUniqueName' should be defined with a 'pattern' restriction.
Location: GalleryRP/stable/2022-08-03/sharedGallery.json#L272
ResourceNameRestriction The resource name parameter 'galleryImageName' should be defined with a 'pattern' restriction.
Location: GalleryRP/stable/2022-08-03/sharedGallery.json#L272
ResourceNameRestriction The resource name parameter 'galleryUniqueName' should be defined with a 'pattern' restriction.
Location: GalleryRP/stable/2022-08-03/sharedGallery.json#L325
ResourceNameRestriction The resource name parameter 'galleryImageName' should be defined with a 'pattern' restriction.
Location: GalleryRP/stable/2022-08-03/sharedGallery.json#L325
ResourceNameRestriction The resource name parameter 'galleryImageVersionName' should be defined with a 'pattern' restriction.
Location: GalleryRP/stable/2022-08-03/sharedGallery.json#L325
⚠️ ParameterNotDefinedInGlobalParameters Parameter 'api-version' is referenced but not defined in the global parameters section of Service Definition
Location: GalleryRP/stable/2022-08-03/communityGallery.json#L44
⚠️ ParameterNotDefinedInGlobalParameters Parameter 'api-version' is referenced but not defined in the global parameters section of Service Definition
Location: GalleryRP/stable/2022-08-03/communityGallery.json#L86
⚠️ ParameterNotDefinedInGlobalParameters Parameter 'api-version' is referenced but not defined in the global parameters section of Service Definition
Location: GalleryRP/stable/2022-08-03/communityGallery.json#L131
⚠️ ParameterNotDefinedInGlobalParameters Parameter 'api-version' is referenced but not defined in the global parameters section of Service Definition
Location: GalleryRP/stable/2022-08-03/communityGallery.json#L179
⚠️ ParameterNotDefinedInGlobalParameters Parameter 'api-version' is referenced but not defined in the global parameters section of Service Definition
Location: GalleryRP/stable/2022-08-03/communityGallery.json#L224
⚠️ LocationMustHaveXmsMutability Property location must have 'x-ms-mutability':['read', 'create'] extension defined.
Location: GalleryRP/stable/2022-08-03/communityGallery.json#L274
⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
Location: GalleryRP/stable/2022-08-03/communityGallery.json#L548
⚠️ LocationMustHaveXmsMutability Property location must have 'x-ms-mutability':['read', 'create'] extension defined.
Location: GalleryRP/stable/2022-08-03/sharedGallery.json#L395
⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
Location: GalleryRP/stable/2022-08-03/sharedGallery.json#L645
️⚠️Avocado: 1 Warnings warning [Detail]
Rule Message
⚠️ MULTIPLE_API_VERSION 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 succeeded [Detail] [Expand]
️️✔️TypeSpecAPIView succeeded [Detail] [Expand]
️️✔️ModelValidation succeeded [Detail] [Expand]
Validation passes for ModelValidation.
️️✔️SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️PrettierCheck succeeded [Detail] [Expand]
Validation passes for PrettierCheck.
️️✔️SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️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
Copy Markdown

openapi-pipeline-app Bot commented Jun 30, 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 f16d7c159b7d1fade07aa470797d06ec46400bdb. 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
    command	pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1 ../azure-sdk-for-net_tmp/generateInput.json ../azure-sdk-for-net_tmp/generateOutput.json
  • ️✔️Azure.ResourceManager.Compute [View full logs]  [Preview SDK Changes]
    info	[Changelog]
️⚠️ azure-sdk-for-python-track2 warning [Detail]
  • ⚠️Warning [Logs] Generate from f16d7c159b7d1fade07aa470797d06ec46400bdb. 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.
    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 minor version of npm available! 9.6.7 -> 9.8.1
    cmderr	[automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.8.1>
    cmderr	[automation_generate.sh] npm notice Run `npm install -g npm@9.8.1` to update!
    cmderr	[automation_generate.sh] npm notice
  • ️✔️track2_azure-mgmt-compute [View full logs]  [Preview SDK Changes]
    info	[Changelog] change log generation failed!!!
️⚠️ azure-sdk-for-java warning [Detail]
  • ⚠️Warning [Logs] Generate from f16d7c159b7d1fade07aa470797d06ec46400bdb. SDK Automation 14.0.0
    command	./eng/mgmt/automation/init.sh ../azure-sdk-for-java_tmp/initInput.json ../azure-sdk-for-java_tmp/initOutput.json
    cmderr	[init.sh] [notice] A new release of pip is available: 23.0.1 -> 23.2.1
    cmderr	[init.sh] [notice] To update, run: pip install --upgrade pip
    cmderr	[init.sh] [notice] A new release of pip is available: 23.0.1 -> 23.2.1
    cmderr	[init.sh] [notice] To update, run: pip install --upgrade pip
    command	./eng/mgmt/automation/generate.py ../azure-sdk-for-java_tmp/generateInput.json ../azure-sdk-for-java_tmp/generateOutput.json
  • ️✔️azure-resourcemanager-compute-generated [View full logs]  [Preview SDK Changes]
️️✔️ azure-sdk-for-js succeeded [Detail] [Expand]
  • ️✔️Succeeded [Logs] Generate from f16d7c159b7d1fade07aa470797d06ec46400bdb. SDK Automation 14.0.0
    command	sh .scripts/automation_init.sh ../azure-sdk-for-js_tmp/initInput.json ../azure-sdk-for-js_tmp/initOutput.json
    warn	File azure-sdk-for-js_tmp/initOutput.json not found to read
    command	sh .scripts/automation_generate.sh ../azure-sdk-for-js_tmp/generateInput.json ../azure-sdk-for-js_tmp/generateOutput.json
  • ️✔️@azure/arm-compute [View full logs]  [Preview SDK Changes]
    info	[Changelog] **Features**
    info	[Changelog]
    info	[Changelog]   - Added Interface CommunityGalleryMetadata
    info	[Changelog]   - Interface CommunityGallery has a new optional parameter artifactTags
    info	[Changelog]   - Interface CommunityGallery has a new optional parameter communityMetadata
    info	[Changelog]   - Interface CommunityGallery has a new optional parameter disclaimer
    info	[Changelog]   - Interface CommunityGalleryImage has a new optional parameter artifactTags
    info	[Changelog]   - Interface CommunityGalleryImage has a new optional parameter disclaimer
    info	[Changelog]   - Interface CommunityGalleryImageVersion has a new optional parameter artifactTags
    info	[Changelog]   - Interface CommunityGalleryImageVersion has a new optional parameter disclaimer
    info	[Changelog]   - Interface SharedGallery has a new optional parameter artifactTags
    info	[Changelog]   - Interface SharedGalleryImage has a new optional parameter artifactTags
    info	[Changelog]   - Interface SharedGalleryImageVersion has a new optional parameter artifactTags
️️✔️ azure-sdk-for-go succeeded [Detail] [Expand]
  • ️✔️Succeeded [Logs] Generate from f16d7c159b7d1fade07aa470797d06ec46400bdb. SDK Automation 14.0.0
    command	sh ./eng/scripts/automation_init.sh ../../../../../azure-sdk-for-go_tmp/initInput.json ../../../../../azure-sdk-for-go_tmp/initOutput.json
    command	generator automation-v2 ../../../../../azure-sdk-for-go_tmp/generateInput.json ../../../../../azure-sdk-for-go_tmp/generateOutput.json
  • ️✔️sdk/resourcemanager/compute/armcompute [View full logs]  [Preview SDK Changes]
    info	[Changelog] ### Features Added
    info	[Changelog]
    info	[Changelog] - New struct `CommunityGalleryMetadata`
    info	[Changelog] - New struct `CommunityGalleryProperties`
    info	[Changelog] - New struct `SharedGalleryProperties`
    info	[Changelog] - New field `Properties` in struct `CommunityGallery`
    info	[Changelog] - New field `ArtifactTags`, `Disclaimer` in struct `CommunityGalleryImageProperties`
    info	[Changelog] - New field `ArtifactTags`, `Disclaimer` in struct `CommunityGalleryImageVersionProperties`
    info	[Changelog] - New field `Properties` in struct `SharedGallery`
    info	[Changelog] - New field `ArtifactTags` in struct `SharedGalleryImageProperties`
    info	[Changelog] - New field `ArtifactTags` in struct `SharedGalleryImageVersionProperties`
    info	[Changelog]
    info	[Changelog] Total 0 breaking change(s), 12 additive change(s).
️️✔️ azure-resource-manager-schemas succeeded [Detail] [Expand]
  • ️✔️Succeeded [Logs] Generate from f16d7c159b7d1fade07aa470797d06ec46400bdb. Schema Automation 14.0.0
    command	.sdkauto/initScript.sh ../azure-resource-manager-schemas_tmp/initInput.json ../azure-resource-manager-schemas_tmp/initOutput.json
    warn	File azure-resource-manager-schemas_tmp/initOutput.json not found to read
    command	.sdkauto/generateScript.sh ../azure-resource-manager-schemas_tmp/generateInput.json ../azure-resource-manager-schemas_tmp/generateOutput.json
  • ️✔️compute [View full logs]  [Preview Schema Changes]
️❌ azure-powershell failed [Detail]
  • Pipeline Framework Failed [Logs] Generate from f16d7c159b7d1fade07aa470797d06ec46400bdb. SDK Automation 14.0.0
    command	sh ./tools/SwaggerCI/init.sh ../azure-powershell_tmp/initInput.json ../azure-powershell_tmp/initOutput.json
    command	pwsh ./tools/SwaggerCI/psci.ps1 ../azure-powershell_tmp/generateInput.json ../azure-powershell_tmp/generateOutput.json
    SSL error: syscall failure: Broken pipe
    Error: SSL error: syscall failure: Broken pipe
  • ⚠️Az.compute.DefaultTag [View full logs
    error	Fatal error: SSL error: syscall failure: Broken pipe
    error	The following packages are still pending:
    error		Az.compute.DefaultTag
Posted by Swagger Pipeline | How to fix these errors?

@openapi-pipeline-app
Copy link
Copy Markdown

openapi-pipeline-app Bot commented Jun 30, 2023

Generated ApiView

Language Package Name ApiView Link
Go sdk/resourcemanager/compute/armcompute https://apiview.dev/Assemblies/Review/59f750c481e94769b0d63ba91d36e60c
Java azure-resourcemanager-compute-generated https://apiview.dev/Assemblies/Review/7e9dc21d58954a9d89a6ace725482cba
.Net Azure.ResourceManager.Compute https://apiview.dev/Assemblies/Review/8a819235ab0a4241ba428ec35a598194
JavaScript @azure/arm-compute https://apiview.dev/Assemblies/Review/14bbd906f74f4322b9471391b9b429f1
Swagger Microsoft.Compute https://apiview.dev/Assemblies/Review/847505ec98f74a68a5187f7029055bdb

@Sandido
Copy link
Copy Markdown
Contributor Author

Sandido commented Jun 30, 2023

For ARM review, regarding the LintDiff AvoidAdditionalProperties errors,
the two places where the property additionalProperties is added are
https://github.com/Azure/azure-rest-api-specs/pull/24665/files#diff-ad855b02d429cb7e66e2c1bf746a1ee3256446ef3de1db2a355eb12eaebd0c83R293
and
https://github.com/Azure/azure-rest-api-specs/pull/24665/files#diff-e1a5113c673ea8a56c2fab2df3e496ebbca45bd313a52e790d3aed9bac8922bfR418

And these are added as tags that users can modify. These seem to be the exception and allowed scenario for additionalProperties.

Copy link
Copy Markdown
Contributor

@kangsun-ctrl kangsun-ctrl left a comment

Choose a reason for hiding this comment

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

lgtb

@openapi-workflow-bot openapi-workflow-bot Bot added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Aug 3, 2023
@Sandido Sandido marked this pull request as ready for review August 14, 2023 17:36
@Sandido Sandido added the DoNotMerge <valid label in PR review process> use to hold merge after approval label Aug 14, 2023
@TimLovellSmith
Copy link
Copy Markdown
Member

LGTM for ARM but some documentation cleanup would be good before merging

@TimLovellSmith TimLovellSmith added the ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review label Aug 14, 2023
@openapi-workflow-bot openapi-workflow-bot Bot removed the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Aug 14, 2023
@openapi-pipeline-app
Copy link
Copy Markdown

openapi-pipeline-app Bot commented Aug 16, 2023

Next Steps to Merge

⚠️ This is an experimental comment. It may not always be up-to-date. ⚠️

❌ This PR is blocked from merging until following labels are removed from it: DoNotMerge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ARMReview ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review Compute DoNotMerge <valid label in PR review process> use to hold merge after approval resource-manager

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants