azure-rest-api-specs icon indicating copy to clipboard operation
azure-rest-api-specs copied to clipboard

[dataprotection] Set `final-state-via` to "location" for some APIs due to updated AAZ behaviour.

Open zubairabid opened this issue 1 year ago • 7 comments

Autorest-generated code from swagger (previous version of the dataprotection CLI extension, and present versions of the Powershell extension) defaulted to "location" as their default final-state-via value. However, the new AAZ codegen tool for CLI defaults to "azure-async-operation" instead.

This is a correctness PR that explicitly sets the final-state-via value to "location" for the affected APIs.

zubairabid avatar Jul 06 '23 11:07 zubairabid

Hi, @zubairabid! 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.
  • Swagger Validation Report

    ️️✔️BreakingChange succeeded [Detail] [Expand]
    There are no breaking changes.
    compared swaggers (via Oad v0.10.4)] new version base version
    dataprotection.json 2023-01-01(ae39505) 2023-01-01(main)
    dataprotection.json 2023-05-01(ae39505) 2023-05-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-2023-05 package-2023-05(ae39505) package-2023-05(main)
    package-2023-01 package-2023-01(ae39505) package-2023-01(main)

    The following errors/warnings exist before current PR submission:

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

    Rule Message
    GetCollectionOnlyHasValueAndNextLink Get endpoints for collections of resources must only have the value and nextLink properties in their model.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L42
    LroExtension Operations with a 202 response must specify x-ms-long-running-operation: true.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L64
    ParametersOrder The parameters:operationId,location should be kept in the same order as they present in the path.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L64
    GetOperation200 The get operation should only return 200.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L94
    ResourceNameRestriction The resource name parameter 'vaultName' should be defined with a 'pattern' restriction.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L184
    GetCollectionOnlyHasValueAndNextLink Get endpoints for collections of resources must only have the value and nextLink properties in their model.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L307
    ResourceNameRestriction The resource name parameter 'vaultName' should be defined with a 'pattern' restriction.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L328
    PutResponseSchemaDescription Description of 200 response code of a PUT operation MUST include term 'update'.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L410
    LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L426
    LroLocationHeader A 202 response should include an Location response header.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L467
    LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L476
    LroLocationHeader A 202 response should include an Location response header.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L526
    LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L532
    ResourceNameRestriction The resource name parameter 'vaultName' should be defined with a 'pattern' restriction.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L544
    LroExtension Operations with a 202 response must specify x-ms-long-running-operation: true.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L545
    GetOperation200 The get operation should only return 200.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L580
    OperationsApiSchemaUsesCommonTypes Operations API path must follow the schema provided in the common types.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L740
    ResourceNameRestriction The resource name parameter 'vaultName' should be defined with a 'pattern' restriction.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L761
    GetCollectionOnlyHasValueAndNextLink Get endpoints for collections of resources must only have the value and nextLink properties in their model.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L788
    ResourceNameRestriction The resource name parameter 'vaultName' should be defined with a 'pattern' restriction.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L809
    ResourceNameRestriction The resource name parameter 'backupPolicyName' should be defined with a 'pattern' restriction.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L809
    PutResponseSchemaDescription Any Put MUST contain 200 and 201 return codes.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L899
    ResourceNameRestriction The resource name parameter 'vaultName' should be defined with a 'pattern' restriction.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L969
    GetCollectionOnlyHasValueAndNextLink Get endpoints for collections of resources must only have the value and nextLink properties in their model.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L996
    ResourceNameRestriction The resource name parameter 'vaultName' should be defined with a 'pattern' restriction.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L1017
    ResourceNameRestriction The resource name parameter 'backupInstanceName' should be defined with a 'pattern' restriction.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L1017
    PutResponseSchemaDescription Description of 200 response code of a PUT operation MUST include term 'update'.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L1099
    LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L1128
    LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L1193
    ResourceNameRestriction The resource name parameter 'vaultName' should be defined with a 'pattern' restriction.
    Location: Microsoft.DataProtection/stable/2023-01-01/dataprotection.json#L1205
    ️️✔️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.
    ️️✔️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?

    Swagger Generation Artifacts

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

    Breaking Changes Tracking



    ️️✔️ azure-sdk-for-net-track2 succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from d3d9d53866dd95c74cde9cc0aedd8fe9048423e4. 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.DataProtectionBackup [View full logs]  [Release SDK Changes]
      info	[Changelog]
    ️⚠️ azure-sdk-for-python-track2 warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from d3d9d53866dd95c74cde9cc0aedd8fe9048423e4. 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 [email protected]` to update!
      cmderr	[automation_generate.sh] npm notice
    • ️✔️track2_azure-mgmt-dataprotection [View full logs]  [Release SDK Changes]
      info	[Changelog]
    ️⚠️ azure-sdk-for-java warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from d3d9d53866dd95c74cde9cc0aedd8fe9048423e4. 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-dataprotection [View full logs]  [Release SDK Changes]
    ️️✔️ azure-sdk-for-go succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from d3d9d53866dd95c74cde9cc0aedd8fe9048423e4. 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/dataprotection/armdataprotection [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 d3d9d53866dd95c74cde9cc0aedd8fe9048423e4. 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-dataprotection [View full logs]  [Release SDK Changes]
      info	[Changelog]
      error	breakingChangeTracking is enabled, but version or changelogItem is not found in output.
    ️❌ azure-powershell failed [Detail]
    • Pipeline Framework Failed [Logs]Release - Generate from d3d9d53866dd95c74cde9cc0aedd8fe9048423e4. 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.dataprotection.DefaultTag [View full logs
      error	Fatal error: SSL error: syscall failure: Broken pipe
      error	The following packages are still pending:
      error		Az.dataprotection.DefaultTag
    Posted by Swagger Pipeline | How to fix these errors?

    Generated ApiView

    Language Package Name ApiView Link
    Go sdk/resourcemanager/dataprotection/armdataprotection Create ApiView failed. Please ask PR assignee for help
    .Net Azure.ResourceManager.DataProtectionBackup Create ApiView failed. Please ask PR assignee for help
    Java azure-resourcemanager-dataprotection https://apiview.dev/Assemblies/Review/a8ebc70d7a1f41f69f956991d02065a8
    JavaScript @azure/arm-dataprotection https://apiview.dev/Assemblies/Review/95c22a462e5644e0a3e2859e776eb5e0

    Autorest-generated code from swagger (previous version of the dataprotection CLI extension, and present versions of the Powershell extension) defaulted to "location" as their default final-state-via value. However, the new AAZ codegen tool for CLI defaults to "azure-async-operation" instead.

    This is a correctness PR that explicitly sets the final-state-via value to "location" for the affected APIs.

    Do not modify the description text. Only update the checkboxes. Otherwise the automation will not run correctly

    raosuhas avatar Jul 11 '23 20:07 raosuhas

    Please address or respond to feedback from the ARM API reviewer.
    When you are ready to continue the ARM API review, please remove the ARMChangesRequested label.
    This will notify the reviewer to have another look.
    If the feedback provided needs further discussion, please use this Teams channel to post your questions - aka.ms/azsdk/support/specreview-channel.
    Please include [ARM Query] in the title of your question to indicate that it is ARM-related.

    Autorest-generated code from swagger (previous version of the dataprotection CLI extension, and present versions of the Powershell extension) defaulted to "location" as their default final-state-via value. However, the new AAZ codegen tool for CLI defaults to "azure-async-operation" instead. This is a correctness PR that explicitly sets the final-state-via value to "location" for the affected APIs.

    Do not modify the description text. Only update the checkboxes. Otherwise the automation will not run correctly

    @raosuhas The description text did not have any checkboxes, just links to choose a PR template.

    Is there anything I need to change in order to get this PR merged now?

    zubairabid avatar Jul 12 '23 12:07 zubairabid

    Hi @rkmanda is there anything we need to change for the PR to proceed?

    zubairabid avatar Jul 24 '23 12:07 zubairabid

    /azp run

    konrad-jamrozik avatar Aug 04 '23 06:08 konrad-jamrozik

    Azure Pipelines successfully started running 2 pipeline(s).

    azure-pipelines[bot] avatar Aug 04 '23 06:08 azure-pipelines[bot]