Skip to content

Conversation

@cataggar
Copy link
Member

@cataggar cataggar commented Dec 11, 2023

This was a problem identified in the 2023-03-01 API when creating the .NET SDK.
Azure/azure-sdk-for-net#39536 (review)

In #24490, extendedNetworkBlocks was added at PrivateCloudUpdateProperties. It should have been added at the end of PrivateCloudProperties as well, but PrivateCloudProperties was using an allOf PrivateCloudUpdateProperties.

ARM (Control Plane) API Specification Update Pull Request

Tip: overwhelmed by all this guidance? See the Getting help section at the bottom of this PR description.

PR review workflow diagram

Please understand this diagram before proceeding. It explains how to get your PR approved & merged.

diagram

Click here to see the details of Step 1

Breaking changes review (Diagram Step 1)

If the automation determines you have breaking changes, i.e. Step 1 from the diagram applies to you,
you must follow the breaking changes process.
IMPORTANT This applies even if:

  • The tool fails while it shouldn't, e.g. due to runtime exception, or incorrect detection of breaking changes.
  • You believe there is no need for you to request breaking change approval, for any reason.
    Such claims must be reviewed, and the process is the same.
Click here to see the details of Step 2

ARM API changes review (Diagram Step 2)

  • If this PR is in purview of ARM review then automation will add the ARMReview label.
  • If you want to force ARM review, add the label yourself.
  • Proceed according to the diagram at the top of this comment.
Click here to see the diagram footnotes

Diagram footnotes

[1] ARM review queue (for merge queues, see [2])
The PRs are processed by time opened, ascending. Your PR may show up on 2nd or later page.
If you addressed Step 1 from the diagram and your PR is not showing up in the queue, ensure the label ARMChangesRequested
is removed from your PR. This should cause the label WaitForARMFeedback to be added.
[2] public repo merge queue, private repo merge queue (for ARM review queue, [1])

If you need further help with anything, see Getting help section below.

Purpose of this PR

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

  • New API version. (If API spec is not defined in TypeSpec, the PR should have been generated using OpenAPI Hub).
  • 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:
    • edit this with your clarification

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:

  • I confirm this PR is modifying Azure Resource Manager (ARM) related specifications, and not data plane related specifications.
  • I have reviewed following Resource Provider guidelines, including
    ARM resource provider contract and
    REST guidelines (estimated time: 4 hours).
    I understand this is required before I can proceed to the Diagram Step 2, "ARM API changes Review", for this PR.

Additional information

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.

Getting help

  • First, please carefully read through this PR description, from top to bottom. Please fill out the Purpose of this PR and Due diligence checklist.
  • To understand what you must do next to merge this PR, see the Next Steps to Merge comment. It will appear within few minutes of submitting this PR and will continue to be up-to-date with current PR state.
  • For guidance on fixing this PR CI check failures, see the hyperlinks provided in given failure
    and https://aka.ms/ci-fix.
  • If the PR CI checks appear to be stuck in queued state, please add a comment with contents /azp run.
    This should result in a new comment denoting a PR validation pipeline has started and the checks should be updated after few minutes.
  • If the help provided by the previous points is not enough, post to https://aka.ms/azsdk/support/specreview-channel and link to this PR.

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Dec 11, 2023

Next Steps to Merge

Next steps that must be taken to merge this PR:
  • ❌ Your PR is in purview of ARM review (label: ARMReview). Please ensure your PR is on the ARM PR review queue - see instructions in steps 1 and 2 in the PR description diagram.
  • ❌ The required check named Swagger LintDiff 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 Dec 11, 2023

Swagger Validation Report

️⚠️BreakingChange: 2 Warnings warning [Detail]
compared swaggers (via Oad v0.10.4)] new version base version
vmware.json 2023-03-01(9fc50de) 2023-03-01(main)
Rule Message
⚠️ 1032 - DifferentAllOf The new version has a different 'allOf' property than the previous one.
New: Microsoft.AVS/stable/2023-03-01/vmware.json#L5816:9
Old: Microsoft.AVS/stable/2023-03-01/vmware.json#L5816:9
⚠️ 1032 - DifferentAllOf The new version has a different 'allOf' property than the previous one.
New: Microsoft.AVS/stable/2023-03-01/vmware.json#L5898:5
Old: Microsoft.AVS/stable/2023-03-01/vmware.json#L5898:5
️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️❌LintDiff: 3 Errors, 0 Warnings failed [Detail]
compared tags (via openapi-validator v2.1.6) new version base version
package-2023-03-01 package-2023-03-01(9fc50de) package-2023-03-01(main)

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

Rule Message Related RPC [For API reviewers]
PropertiesTypeObjectNoDefinition Properties with type:object that don't reference a model definition are not allowed. ARM doesn't allow generic type definitions as this leads to bad customer experience.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L5816
RPC-Policy-V1-03
PropertiesTypeObjectNoDefinition Properties with type:object that don't reference a model definition are not allowed. ARM doesn't allow generic type definitions as this leads to bad customer experience.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L5906
RPC-Policy-V1-03
PropertiesTypeObjectNoDefinition Properties with type:object that don't reference a model definition are not allowed. ARM doesn't allow generic type definitions as this leads to bad customer experience.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L6176
RPC-Policy-V1-03


The following errors/warnings exist before current PR submission:

Only 30 items are listed, please refer to log for more details.

Rule Message
OperationsApiSchemaUsesCommonTypes Operations API path must follow the schema provided in the common types.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L285
RequestBodyMustExistForPutPatch The put or patch operation does not have a request body defined. This is not allowed. Please specify a request body for this operation.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L538
PatchResponseCodes Long-running PATCH operations must have responses with 200, 202 and default return codes. They also must not have other response codes.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L590
RequestBodyMustExistForPutPatch The put or patch operation does not have a request body defined. This is not allowed. Please specify a request body for this operation.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L597
DeleteResponseCodes Long-running delete operations must have responses with 202, 204 and default return codes. They also must have no other response codes.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L649
LroLocationHeader A 202 response should include an Location response header.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L674
PostResponseCodes Long-running POST operations must have responses with 202 and default return codes. They must also have a 200 return code if only if the final response is intended to have a schema, if not the 200 return code must not be specified. They also must not have other response codes.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L695
LroLocationHeader A 202 response should include an Location response header.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L717
PostResponseCodes Long-running POST operations must have responses with 202 and default return codes. They must also have a 200 return code if only if the final response is intended to have a schema, if not the 200 return code must not be specified. They also must not have other response codes.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L738
LroLocationHeader A 202 response should include an Location response header.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L760
RequestBodyMustExistForPutPatch The put or patch operation does not have a request body defined. This is not allowed. Please specify a request body for this operation.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L876
PatchResponseCodes Long-running PATCH operations must have responses with 200, 202 and default return codes. They also must not have other response codes.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L932
PatchPropertiesCorrespondToPutProperties clusterSize property in patch body is not present in the corresponding put body. A patch request body must only contain properties present in the corresponding put request body, and must contain at least one of the properties.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L939
PatchPropertiesCorrespondToPutProperties hosts property in patch body is not present in the corresponding put body. A patch request body must only contain properties present in the corresponding put request body, and must contain at least one of the properties.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L939
RequestBodyMustExistForPutPatch The put or patch operation does not have a request body defined. This is not allowed. Please specify a request body for this operation.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L939
DeleteResponseCodes Long-running delete operations must have responses with 202, 204 and default return codes. They also must have no other response codes.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L991
LroLocationHeader A 202 response should include an Location response header.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L1019
RequestBodyMustExistForPutPatch The put or patch operation does not have a request body defined. This is not allowed. Please specify a request body for this operation.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L1190
DeleteResponseCodes Long-running delete operations must have responses with 202, 204 and default return codes. They also must have no other response codes.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L1245
LroLocationHeader A 202 response should include an Location response header.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L1276
RequestBodyMustExistForPutPatch The put or patch operation does not have a request body defined. This is not allowed. Please specify a request body for this operation.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L1433
RequestBodyMustExistForPutPatch The put or patch operation does not have a request body defined. This is not allowed. Please specify a request body for this operation.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L1629
DeleteResponseCodes Long-running delete operations must have responses with 202, 204 and default return codes. They also must have no other response codes.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L1685
LroLocationHeader A 202 response should include an Location response header.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L1713
RequestBodyMustExistForPutPatch The put or patch operation does not have a request body defined. This is not allowed. Please specify a request body for this operation.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L1829
DeleteResponseCodes Long-running delete operations must have responses with 202, 204 and default return codes. They also must have no other response codes.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L1885
LroLocationHeader A 202 response should include an Location response header.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L1913
EvenSegmentedPathForPutOperation API path with PUT operation defined MUST have even number of segments (i.e. end in {resourceType}/{resourceName} segments).
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L2068
RequestBodyMustExistForPutPatch The put or patch operation does not have a request body defined. This is not allowed. Please specify a request body for this operation.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L2119
RequestBodyMustExistForPutPatch The put or patch operation does not have a request body defined. This is not allowed. Please specify a request body for this operation.
Location: Microsoft.AVS/stable/2023-03-01/vmware.json#L2178
️️✔️Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️SwaggerAPIView succeeded [Detail] [Expand]
️️✔️TypeSpecAPIView succeeded [Detail] [Expand]
️️✔️ModelValidation succeeded [Detail] [Expand]
Validation passes for ModelValidation.
️️✔️SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️PoliCheck succeeded [Detail] [Expand]
Validation passed for PoliCheck.
️️✔️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 Dec 11, 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-js succeeded [Detail] [Expand]
  • ️✔️Succeeded [Logs] Generate from 1ef9f0bca2944e87e3f3ef12f3ecbe7791bae410. 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
    cmderr	[automation_generate.sh] [ERROR] Cannot generate changelog because the codes of local and npm may be the same.
  • ️✔️@azure/arm-avs [View full logs]  [Preview SDK Changes]
    info	[Changelog]
    error	breakingChangeTracking is enabled, but version or changelogItem is not found in output.
️⚠️ azure-sdk-for-python-track2 warning [Detail]
  • ⚠️Warning [Logs] Generate from 1ef9f0bca2944e87e3f3ef12f3ecbe7791bae410. 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: azure-devtools 1.2.1 does not provide the extra 'ci-tools'
    cmderr	[automation_init.sh] WARNING: azure-devtools 1.2.1 does not provide the extra 'ci-tools'
    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
  • ️✔️track2_azure-mgmt-avs [View full logs]  [Preview SDK Changes]
    info	[Changelog]
️️✔️ azure-sdk-for-net succeeded [Detail] [Expand]
  • ️✔️Succeeded [Logs] Generate from 1ef9f0bca2944e87e3f3ef12f3ecbe7791bae410. 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	autorest --version=2.0.4421 --csharp --reflect-api-versions --license-header=MICROSOFT_MIT_NO_VERSION [email protected]/[email protected] --csharp-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-net/sdk ../azure-rest-api-specs/specification/vmware/resource-manager/readme.md
    cmderr	[Autorest] realpath(): Permission denied
    cmderr	[Autorest] realpath(): Permission denied
    cmderr	[Autorest] realpath(): Permission denied
  • ️✔️Microsoft.Azure.Management.Avs [View full logs]  [Preview SDK Changes]
️️✔️ azure-sdk-for-go succeeded [Detail] [Expand]
  • ️✔️Succeeded [Logs] Generate from 1ef9f0bca2944e87e3f3ef12f3ecbe7791bae410. 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/avs/armavs [View full logs]  [Preview SDK Changes]
    info	[Changelog] ### Other Changes
    info	[Changelog]
    info	[Changelog] Total 0 breaking change(s), 0 additive change(s).
️⚠️ azure-sdk-for-java warning [Detail]
  • ⚠️Warning [Logs] Generate from 1ef9f0bca2944e87e3f3ef12f3ecbe7791bae410. 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.3.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.3.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-avs [View full logs]  [Preview SDK Changes]
️⚠️ azure-resource-manager-schemas warning [Detail]
  • ⚠️Warning [Logs] Generate from 1ef9f0bca2944e87e3f3ef12f3ecbe7791bae410. Schema Automation 14.0.0
    command	.sdkauto/initScript.sh ../azure-resource-manager-schemas_tmp/initInput.json ../azure-resource-manager-schemas_tmp/initOutput.json
    cmderr	[initScript.sh] npm notice
    cmderr	[initScript.sh] npm notice New major version of npm available! 8.19.4 -> 10.2.5
    cmderr	[initScript.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.5>
    cmderr	[initScript.sh] npm notice Run `npm install -g [email protected]` to update!
    cmderr	[initScript.sh] npm notice
    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
  • ️✔️vmware [View full logs]  [Preview Schema Changes]
️❌ azure-powershell failed [Detail]
  • Pipeline Framework Failed [Logs] Generate from 1ef9f0bca2944e87e3f3ef12f3ecbe7791bae410. 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.vmware.DefaultTag [View full logs
    error	Fatal error: SSL error: syscall failure: Broken pipe
    error	The following packages are still pending:
    error		Az.vmware.DefaultTag
Posted by Swagger Pipeline | How to fix these errors?

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Dec 11, 2023

Generated ApiView

Language Package Name ApiView Link
Go sdk/resourcemanager/avs/armavs There is no API change compared with the previous version
Java azure-resourcemanager-avs There is no API change compared with the previous version
JavaScript @azure/arm-avs Create ApiView timeout. Package is too large and we cannot create ApiView for it.
Swagger Microsoft.AVS There is no API change compared with the previous version

],
"allOf": [
{
"$ref": "#/definitions/PrivateCloudUpdateProperties"
Copy link
Member Author

Choose a reason for hiding this comment

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

The solution is remove this allOf, then copy all of the properties in, in the correct order. extendedNetworkBlocks is moved to the end.

@cataggar cataggar marked this pull request as draft December 12, 2023 15:14
@cataggar cataggar closed this Dec 12, 2023
@cataggar cataggar deleted the extendedNetworks-order branch December 12, 2023 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ARMReview resource-manager WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants