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

Add update for location in order to support patch #25192

Merged

Conversation

chchen3
Copy link
Member

@chchen3 chchen3 commented Aug 5, 2023

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

Add a changelog entry for this PR by answering the following questions:

  1. What's the purpose of the update?
    • new service onboarding
    • new API version
    • update existing version for new feature
    • update existing version to fix swagger quality issue in s360
    • Other, please clarify - update existing version to fix issue with SDK, purchaseRequest definition is used in patch requestBody, and x-ms-mutability "update" is needed for location parameter in order for azure cli sdk to allow location field.
  2. When are you targeting to deploy the new service/feature to public regions? Please provide the date or, if the date is not yet available, the month.
  3. When do you expect to publish the swagger? Please provide date or, the the date is not yet available, the month.
  4. By default, Azure SDKs of all languages (.NET/Python/Java/JavaScript for both management-plane SDK and data-plane SDK, Go for management-plane SDK only ) MUST be refreshed with/after swagger of new version is published. If you prefer NOT to refresh any specific SDK language upon swagger updates in the current PR, please leave details with justification here.

Contribution checklist (MS Employees Only):

If any further question about AME onboarding or validation tools, please view the FAQ.

ARM API Review Checklist

Applicability: ⚠️

If your changes encompass only the following scenarios, you should SKIP this section, as these scenarios do not require ARM review.

  • Change to data plane APIs
  • Adding new properties
  • All removals

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.

    • Adding a new service
    • Adding new API(s)
    • Adding a new API version
      -[ ] 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.

@openapi-workflow-bot
Copy link

Hi, @chchen3! 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

    openapi-pipeline-app bot commented Aug 5, 2023

    Swagger Validation Report

    ️️✔️BreakingChange succeeded [Detail] [Expand]
    There are no breaking changes.
    compared swaggers (via Oad v0.10.4)] new version base version
    reservations.json 2022-11-01(8e6fe97) 2022-11-01(main)
    ️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️⚠️LintDiff: 0 Warnings warning [Detail]
    compared tags (via openapi-validator v2.1.3) new version base version
    package-2022-11 package-2022-11(8e6fe97) package-2022-11(main)

    The following errors/warnings exist before current PR submission:

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

    Rule Message
    LroPostReturn A LRO POST operation must have both 200 & 202 return codes.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L31
    PostOperationAsyncResponseValidation An async POST operation must set long running operation options 'x-ms-long-running-operation-options'
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L31
    PostOperationAsyncResponseValidation An async POST operation must return 202.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L58
    LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L68
    GetCollectionOnlyHasValueAndNextLink Get endpoints for collections of resources must only have the value and nextLink properties in their model.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L148
    GetCollectionOnlyHasValueAndNextLink Get endpoints for collections of resources must only have the value and nextLink properties in their model.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L185
    PathForPutOperation The path for 'put' operation must be under a subscription and resource group.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L272
    ProvisioningStateSpecifiedForLROPut 201 response schema in long running PUT operation is missing ProvisioningState property. A LRO PUT operations response schema must have ProvisioningState specified for the 200 and 201 status codes.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L273
    PutRequestResponseSchemeArm A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'ReservationOrder_Purchase' Request Model: 'parameters[2].schema' Response Model: 'responses[200].schema'
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L273
    RequestSchemaForTrackedResourcesMustHaveTags A tracked resource MUST always have tags as a top level optional property. Tracked resource does not have tags in the request schema.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L273
    PutResponseSchemaDescription Any Put MUST contain 200 and 201 return codes.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L300
    LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L327
    ParametersInPointGet Query parameter $expand should be removed. Point Get's MUST not have query parameters other than api version.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L344
    LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L433
    LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L494
    ParametersInPointGet Query parameter $expand should be removed. Point Get's MUST not have query parameters other than api version.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L550
    ConsistentPatchProperties The property 'properties.name' in the request body either not apppear in the resource model or has the wrong level.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L605
    PatchSkuProperty The patch operation body parameter schema should contain property 'sku'.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L605
    LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L641
    SyncPostReturn 200 response for a synchronous POST operation must have a response schema specified.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L648
    SyncPostReturn 200 response for a synchronous POST operation must have a response schema specified.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L685
    OperationsApiSchemaUsesCommonTypes Operations API path must follow the schema provided in the common types.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L789
    LroPostReturn 202 response for a LRO POST operation must not have a response schema specified.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L842
    LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L890
    PostOperationAsyncResponseValidation An async POST operation is tracked via Azure-AsyncOperation header. Set 'final-state-via' property to 'location' on 'x-ms-long-running-operation-options'
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L897
    LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L949
    PostOperationAsyncResponseValidation An async POST operation is tracked via Azure-AsyncOperation header. Set 'final-state-via' property to 'location' on 'x-ms-long-running-operation-options'
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L956
    LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L1008
    GetCollectionOnlyHasValueAndNextLink Get endpoints for collections of resources must only have the value and nextLink properties in their model.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L1073
    ProvisioningStateValidation ProvisioningState must have terminal states: Succeeded, Failed and Canceled.
    Location: Microsoft.Capacity/stable/2022-11-01/reservations.json#L1199
    ️⚠️Avocado: 1 Warnings warning [Detail]
    Rule Message
    ⚠️ MULTIPLE_API_VERSION The default tag contains multiple API versions swaggers.
    readme: specification/reservations/resource-manager/readme.md
    tag: specification/reservations/resource-manager/readme.md#tag-package-2022-11
    ️️✔️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.
    ️️✔️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 Aug 5, 2023

    Swagger Generation Artifacts

    ️🔄ApiDocPreview inProgress [Detail]
    ️️✔️SDK Breaking Change Tracking succeeded [Detail] [Expand]

    Breaking Changes Tracking



    ️️✔️ azure-sdk-for-net-track2 succeeded [Detail] [Expand]
    ️⚠️ azure-sdk-for-python-track2 warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from 2d2d12d. 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]  notice
      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-reservations [View full logs]  [Release SDK Changes]
      info	[Changelog]
    ️️✔️ azure-sdk-for-go succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from 2d2d12d. 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/reservations/armreservations [View full logs]  [Release SDK Changes]
      info	[Changelog] ### Other Changes
      info	[Changelog]
      info	[Changelog] Total 0 breaking change(s), 0 additive change(s).
    ️️✔️ azure-sdk-for-js succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from 2d2d12d. 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-reservations [View full logs]  [Release SDK Changes]
      info	[Changelog]
      error	breakingChangeTracking is enabled, but version or changelogItem is not found in output.
    ️⚠️ azure-resource-manager-schemas warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from 2d2d12d. 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
      warn	No file changes detected after generation
    • ️✔️reservations [View full logs
    ️❌ azure-powershell failed [Detail]
    • Pipeline Framework Failed [Logs]Release - Generate from 2d2d12d. 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.reservations.DefaultTag [View full logs
      error	Fatal error: SSL error: syscall failure: Broken pipe
      error	The following packages are still pending:
      error		Az.reservations.DefaultTag
    ️⚠️ azure-sdk-for-java warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from 2d2d12d. 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-reservations [View full logs]  [Release SDK Changes]
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Aug 5, 2023

    Generated ApiView

    Language Package Name ApiView Link
    Go sdk/resourcemanager/reservations/armreservations https://apiview.dev/Assemblies/Review/b5dd1ecc788c4703b7f34ba8a031cbd2
    .Net Azure.ResourceManager.Reservations There is no API change compared with the previous version
    Java azure-resourcemanager-reservations There is no API change compared with the previous version
    JavaScript @azure/arm-reservations There is no API change compared with the previous version

    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 ReadyForApiTest <valid label in PR review process>add this label when swagger and service APIs are ready for test resource-manager
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    4 participants