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

recoveryservicesbackup: marking the LRO operations as LROs #18269

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tombuildsstuff
Copy link
Contributor

These not being marked as an LRO means that consumers of the API need to instead manually parse the header
to make these work, as can be seen in this commit:

https://github.com/hashicorp/terraform-provider-azurerm/blob/4d39dde5bd2ff7b40ecbed0db93d35bf4ea5646d/internal/services/recoveryservices/backup_container_storage_account_resource.go#L97-L117

This PR fixes this by correctly marking these operations as LROs - which is a bug as the operation description explicitly defines these operations are an LRO

These not being marked as an LRO means that consumers of the API need to instead manually parse the header
to make these work, as can be seen in this commit:

https://github.com/hashicorp/terraform-provider-azurerm/blob/4d39dde5bd2ff7b40ecbed0db93d35bf4ea5646d/internal/services/recoveryservices/backup_container_storage_account_resource.go#L97-L117

This PR fixes this by correctly marking these operations as LROs - which is a bug as the operation description explicitly defines these operations are an LRO
@openapi-workflow-bot
Copy link

Hi, @tombuildsstuff Thanks for your PR. I am workflow bot for review process. Here are some small tips.

  • Please ensure to do self-check against checklists in first PR comment.
  • PR assignee is the person auto-assigned and responsible for your current PR reviewing and merging.
  • For specs comparison cross API versions, Use API Specs Comparison Report Generator
  • If there is CI failure(s), to fix CI error(s) is mandatory for PR merging; or you need to provide justification in PR comment for explanation. How to fix?

  • Any feedback about review process or workflow bot, pls contact swagger and tools team. vscswagger@microsoft.com

    @openapi-workflow-bot
    Copy link

    [Call for Action] To better understand Azure service dev/test scenario, and support Azure service developer better on Swagger and REST API related tests in early phase, please help to fill in with this survey https://aka.ms/SurveyForEarlyPhase. It will take 5 to 10 minutes. If you already complete survey, please neglect this comment. Thanks.

    @ghost ghost added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Mar 15, 2022
    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Mar 15, 2022

    Swagger Validation Report

    ️❌BreakingChange: 10 Errors, 0 Warnings failed [Detail]
    compared swaggers (via Oad v0.10.4)] new version base version
    bms.json 2021-07-01(a22f94e) 2021-07-01(main)
    bms.json 2021-08-01(a22f94e) 2021-08-01(main)
    bms.json 2021-10-01(a22f94e) 2021-10-01(main)
    bms.json 2021-12-01(a22f94e) 2021-12-01(main)
    bms.json 2022-01-01(a22f94e) 2022-01-01(main)
    Rule Message
    1044 - XmsLongRunningOperationChanged The new version has a different 'x-ms-longrunning-operation' value than the previous one.
    New: Microsoft.RecoveryServices/stable/2021-07-01/bms.json#L1373:7
    Old: Microsoft.RecoveryServices/stable/2021-07-01/bms.json#L1373:7
    1044 - XmsLongRunningOperationChanged The new version has a different 'x-ms-longrunning-operation' value than the previous one.
    New: Microsoft.RecoveryServices/stable/2021-07-01/bms.json#L1453:7
    Old: Microsoft.RecoveryServices/stable/2021-07-01/bms.json#L1452:7
    1044 - XmsLongRunningOperationChanged The new version has a different 'x-ms-longrunning-operation' value than the previous one.
    New: Microsoft.RecoveryServices/stable/2021-08-01/bms.json#L1373:7
    Old: Microsoft.RecoveryServices/stable/2021-08-01/bms.json#L1373:7
    1044 - XmsLongRunningOperationChanged The new version has a different 'x-ms-longrunning-operation' value than the previous one.
    New: Microsoft.RecoveryServices/stable/2021-08-01/bms.json#L1453:7
    Old: Microsoft.RecoveryServices/stable/2021-08-01/bms.json#L1452:7
    1044 - XmsLongRunningOperationChanged The new version has a different 'x-ms-longrunning-operation' value than the previous one.
    New: Microsoft.RecoveryServices/stable/2021-10-01/bms.json#L1373:7
    Old: Microsoft.RecoveryServices/stable/2021-10-01/bms.json#L1373:7
    1044 - XmsLongRunningOperationChanged The new version has a different 'x-ms-longrunning-operation' value than the previous one.
    New: Microsoft.RecoveryServices/stable/2021-10-01/bms.json#L1453:7
    Old: Microsoft.RecoveryServices/stable/2021-10-01/bms.json#L1452:7
    1044 - XmsLongRunningOperationChanged The new version has a different 'x-ms-longrunning-operation' value than the previous one.
    New: Microsoft.RecoveryServices/stable/2021-12-01/bms.json#L1373:7
    Old: Microsoft.RecoveryServices/stable/2021-12-01/bms.json#L1373:7
    1044 - XmsLongRunningOperationChanged The new version has a different 'x-ms-longrunning-operation' value than the previous one.
    New: Microsoft.RecoveryServices/stable/2021-12-01/bms.json#L1453:7
    Old: Microsoft.RecoveryServices/stable/2021-12-01/bms.json#L1452:7
    1044 - XmsLongRunningOperationChanged The new version has a different 'x-ms-longrunning-operation' value than the previous one.
    New: Microsoft.RecoveryServices/stable/2022-01-01/bms.json#L1373:7
    Old: Microsoft.RecoveryServices/stable/2022-01-01/bms.json#L1373:7
    1044 - XmsLongRunningOperationChanged The new version has a different 'x-ms-longrunning-operation' value than the previous one.
    New: Microsoft.RecoveryServices/stable/2022-01-01/bms.json#L1453:7
    Old: Microsoft.RecoveryServices/stable/2022-01-01/bms.json#L1452:7
    ️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️🔄LintDiff inProgress [Detail]
    ️️✔️Avocado succeeded [Detail] [Expand]
    Validation passes for Avocado.
    ️️✔️ApiReadinessCheck succeeded [Detail] [Expand]
    ️⚠️~[Staging] ServiceAPIReadinessTest: 0 Warnings warning [Detail]

    API Test is not triggered due to precheck failure. Check pipeline log for details.

    ️❌SwaggerAPIView: 0 Errors, 0 Warnings failed [Detail]
    ️️✔️CadlAPIView succeeded [Detail] [Expand]
    ️️✔️TypeSpecAPIView succeeded [Detail] [Expand]
    ️❌ModelValidation: 18 Errors, 0 Warnings failed [Detail]
    Rule Message
    OBJECT_MISSING_REQUIRED_PROPERTY Missing required property: protectionIntentItemType
    Url: Microsoft.RecoveryServices/stable/2021-07-01/bms.json#L9911:25
    ExampleUrl: 2021-07-01/examples/AzureWorkload/BackupProtectionIntent_Get.json
    DISCRIMINATOR_VALUE_NOT_FOUND Discriminator value "" not found
    Url: Microsoft.RecoveryServices/stable/2021-07-01/bms.json#L9911:25
    ExampleUrl: 2021-07-01/examples/AzureWorkload/BackupProtectionIntent_Get.json
    OBJECT_MISSING_REQUIRED_PROPERTY Missing required property: protectionIntentItemType
    Url: Microsoft.RecoveryServices/stable/2021-07-01/bms.json#L9911:25
    ExampleUrl: 2021-07-01/examples/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json
    DISCRIMINATOR_VALUE_NOT_FOUND Discriminator value "" not found
    Url: Microsoft.RecoveryServices/stable/2021-07-01/bms.json#L9911:25
    ExampleUrl: 2021-07-01/examples/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json
    OBJECT_MISSING_REQUIRED_PROPERTY Missing required property: protectionIntentItemType
    Url: Microsoft.RecoveryServices/stable/2021-07-01/bms.json#L9911:25
    ExampleUrl: 2021-07-01/examples/AzureWorkload/BackupProtectionIntent_List.json
    DISCRIMINATOR_VALUE_NOT_FOUND Discriminator value "" not found
    Url: Microsoft.RecoveryServices/stable/2021-07-01/bms.json#L9911:25
    ExampleUrl: 2021-07-01/examples/AzureWorkload/BackupProtectionIntent_List.json
    DISCRIMINATOR_VALUE_NOT_FOUND Discriminator value "" not found
    Url: Microsoft.RecoveryServices/stable/2021-07-01/bms.json#L7662:50
    ExampleUrl: 2021-07-01/examples/BackupDataMove/PrepareDataMoveOperationResult_Get.json#L19:23
    INVALID_REQUEST_PARAMETER api-version 2021-07-01 is not equal to swagger version
    Url: Microsoft.RecoveryServices/stable/2021-10-01/bms.json#L1752:15
    ExampleUrl: 2021-10-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json#L2:17
    INVALID_REQUEST_PARAMETER api-version 2021-07-01 is not equal to swagger version
    Url: Microsoft.RecoveryServices/stable/2021-10-01/bms.json#L1752:15
    ExampleUrl: 2021-10-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json#L2:17
    INVALID_REQUEST_PARAMETER api-version 2021-07-01 is not equal to swagger version
    Url: Microsoft.RecoveryServices/stable/2021-10-01/bms.json#L2545:15
    ExampleUrl: 2021-10-01/examples/AzureIaasVm/ValidateOperation_RestoreDisk_IdentityBasedRestoreDetails.json#L2:17
    INVALID_REQUEST_PARAMETER api-version 2021-07-01 is not equal to swagger version
    Url: Microsoft.RecoveryServices/stable/2021-12-01/bms.json#L1752:15
    ExampleUrl: 2021-12-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json#L2:17
    INVALID_REQUEST_PARAMETER api-version 2021-07-01 is not equal to swagger version
    Url: Microsoft.RecoveryServices/stable/2021-12-01/bms.json#L1752:15
    ExampleUrl: 2021-12-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json#L2:17
    INVALID_REQUEST_PARAMETER api-version 2021-07-01 is not equal to swagger version
    Url: Microsoft.RecoveryServices/stable/2021-12-01/bms.json#L2557:15
    ExampleUrl: 2021-12-01/examples/AzureIaasVm/ValidateOperation_RestoreDisk_IdentityBasedRestoreDetails.json#L2:17
    READONLY_PROPERTY_NOT_ALLOWED_IN_REQUEST ReadOnly property "id" cannot be sent in the request
    Url: Microsoft.RecoveryServices/stable/2021-12-01/bms.json#L8822:15
    ExampleUrl: 2021-12-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json#L8:19
    READONLY_PROPERTY_NOT_ALLOWED_IN_REQUEST ReadOnly property "type" cannot be sent in the request
    Url: Microsoft.RecoveryServices/stable/2021-12-01/bms.json#L8832:17
    ExampleUrl: 2021-12-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json#L8:19
    INVALID_REQUEST_PARAMETER api-version 2021-07-01 is not equal to swagger version
    Url: Microsoft.RecoveryServices/stable/2022-01-01/bms.json#L1752:15
    ExampleUrl: 2022-01-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json#L2:17
    INVALID_REQUEST_PARAMETER api-version 2021-07-01 is not equal to swagger version
    Url: Microsoft.RecoveryServices/stable/2022-01-01/bms.json#L1752:15
    ExampleUrl: 2022-01-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json#L2:17
    INVALID_REQUEST_PARAMETER api-version 2021-07-01 is not equal to swagger version
    Url: Microsoft.RecoveryServices/stable/2022-01-01/bms.json#L2557:15
    ExampleUrl: 2022-01-01/examples/AzureIaasVm/ValidateOperation_RestoreDisk_IdentityBasedRestoreDetails.json#L2:17
    ️❌SemanticValidation: 14 Errors, 0 Warnings failed [Detail]
    Rule Message
    INVALID_XMS_DISCRIMINATOR_VALUE The value of x-ms-dicriminator-value is not in the discriminator enum list: Microsoft.ClassicCompute/virtualMachines
    JsonUrl: Microsoft.RecoveryServices/stable/2021-07-01/bms.json#L9143:43
    INVALID_XMS_DISCRIMINATOR_VALUE The value of x-ms-dicriminator-value is not in the discriminator enum list: IaaSVMContainer
    JsonUrl: Microsoft.RecoveryServices/stable/2021-07-01/bms.json#L10848:24
    INVALID_XMS_DISCRIMINATOR_VALUE The value of x-ms-dicriminator-value is not in the discriminator enum list: Microsoft.Compute/virtualMachines
    JsonUrl: Microsoft.RecoveryServices/stable/2021-07-01/bms.json#L9163:36
    INVALID_XMS_DISCRIMINATOR_VALUE The value of x-ms-dicriminator-value is not in the discriminator enum list: AzureWorkloadContainer
    JsonUrl: Microsoft.RecoveryServices/stable/2021-07-01/bms.json#L10049:31
    INVALID_XMS_DISCRIMINATOR_VALUE The value of x-ms-dicriminator-value is not in the discriminator enum list: Microsoft.ClassicCompute/virtualMachines
    JsonUrl: Microsoft.RecoveryServices/stable/2021-08-01/bms.json#L9116:43
    INVALID_XMS_DISCRIMINATOR_VALUE The value of x-ms-dicriminator-value is not in the discriminator enum list: IaaSVMContainer
    JsonUrl: Microsoft.RecoveryServices/stable/2021-08-01/bms.json#L10821:24
    INVALID_XMS_DISCRIMINATOR_VALUE The value of x-ms-dicriminator-value is not in the discriminator enum list: Microsoft.Compute/virtualMachines
    JsonUrl: Microsoft.RecoveryServices/stable/2021-08-01/bms.json#L9136:36
    INVALID_XMS_DISCRIMINATOR_VALUE The value of x-ms-dicriminator-value is not in the discriminator enum list: AzureWorkloadContainer
    JsonUrl: Microsoft.RecoveryServices/stable/2021-08-01/bms.json#L10022:31
    INVALID_XMS_DISCRIMINATOR_VALUE The value of x-ms-dicriminator-value is not in the discriminator enum list: AzureWorkloadAutoProtectionIntent
    JsonUrl: Microsoft.RecoveryServices/stable/2021-10-01/bms.json#L9947:42
    INVALID_XMS_DISCRIMINATOR_VALUE The value of x-ms-dicriminator-value is not in the discriminator enum list: AzureWorkloadSQLAutoProtectionIntent
    JsonUrl: Microsoft.RecoveryServices/stable/2021-10-01/bms.json#L9957:45
    INVALID_XMS_DISCRIMINATOR_VALUE The value of x-ms-dicriminator-value is not in the discriminator enum list: Microsoft.ClassicCompute/virtualMachines
    JsonUrl: Microsoft.RecoveryServices/stable/2021-10-01/bms.json#L9483:43
    INVALID_XMS_DISCRIMINATOR_VALUE The value of x-ms-dicriminator-value is not in the discriminator enum list: IaaSVMContainer
    JsonUrl: Microsoft.RecoveryServices/stable/2021-10-01/bms.json#L11220:24
    INVALID_XMS_DISCRIMINATOR_VALUE The value of x-ms-dicriminator-value is not in the discriminator enum list: Microsoft.Compute/virtualMachines
    JsonUrl: Microsoft.RecoveryServices/stable/2021-10-01/bms.json#L9503:36
    INVALID_XMS_DISCRIMINATOR_VALUE The value of x-ms-dicriminator-value is not in the discriminator enum list: AzureWorkloadContainer
    JsonUrl: Microsoft.RecoveryServices/stable/2021-10-01/bms.json#L10421:31
    ️️✔️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).
    ️️✔️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.
    Posted by Swagger Pipeline | How to fix these errors?

    @ghost
    Copy link

    ghost commented Mar 15, 2022

    Thank you for your contribution tombuildsstuff! We will review the pull request and get back to you soon.

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Mar 15, 2022

    Swagger Generation Artifacts

    ️️✔️ApiDocPreview succeeded [Detail] [Expand]

    Only 0 items are rendered, please refer to log for more details.

    ️❌SDK Breaking Change Tracking failed [Detail]

    Only 0 items are rendered, please refer to log for more details.

    ️❌ azure-sdk-for-net-track2 failed [Detail]

    Only 0 items are rendered, please refer to log for more details.

    ️⚠️ azure-sdk-for-python-track2 warning [Detail]

    Only 0 items are rendered, please refer to log for more details.

    ️⚠️ azure-sdk-for-java warning [Detail]

    Only 0 items are rendered, please refer to log for more details.

    ️️✔️ azure-sdk-for-go succeeded [Detail] [Expand]

    Only 0 items are rendered, please refer to log for more details.

    ️❌ azure-sdk-for-js failed [Detail]

    Only 0 items are rendered, please refer to log for more details.

    ️⚠️ azure-resource-manager-schemas warning [Detail]

    Only 0 items are rendered, please refer to log for more details.

    ️❌ azure-powershell failed [Detail]

    Only 0 items are rendered, please refer to log for more details.

    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-workflow-bot
    Copy link

    Hi @tombuildsstuff, Your PR has some issues. Please fix the CI sequentially by following the order of Avocado, semantic validation, model validation, breaking change, lintDiff. If you have any questions, please post your questions in this channel https://aka.ms/swaggersupport.

    TaskHow to fixPriority
    AvocadoFix-AvocadoHigh
    Semantic validationFix-SemanticValidation-ErrorHigh
    Model validationFix-ModelValidation-ErrorHigh
    LintDiffFix-LintDiffhigh
    If you need further help, please feedback via swagger feedback.

    @openapi-workflow-bot
    Copy link

    Hi @tombuildsstuff, 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.
    Action: To initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
    If you want to know the production traffic statistic, please see ARM Traffic statistic.
    If you think it is false positive breaking change, please provide the reasons in the PR comment, report to Swagger Tooling Team via https://aka.ms/swaggerfeedback.

    @ghost
    Copy link

    ghost commented Apr 3, 2022

    Hi, @tombuildsstuff. Your PR has no update for 14 days and it is marked as stale PR. If no further update for over 14 days, the bot will close the PR. If you want to refresh the PR, please remove no-recent-activity label.

    @tombuildsstuff
    Copy link
    Contributor Author

    Waiting on the Service Team..

    @ghost
    Copy link

    ghost commented Apr 24, 2022

    Hi, @tombuildsstuff. Your PR has no update for 14 days and it is marked as stale PR. If no further update for over 14 days, the bot will close the PR. If you want to refresh the PR, please remove no-recent-activity label.

    @tombuildsstuff
    Copy link
    Contributor Author

    Waiting on the Service Team..

    @ghost
    Copy link

    ghost commented May 15, 2022

    Hi, @tombuildsstuff. Your PR has no update for 14 days and it is marked as stale PR. If no further update for over 14 days, the bot will close the PR. If you want to refresh the PR, please remove no-recent-activity label.

    @tombuildsstuff
    Copy link
    Contributor Author

    @jianyexi the PR is valid and up to date, it's just waiting for a review from the Service Team - unfortunately I can't re-open this PR since you've closed it, so can you please re-open this PR. Thanks.

    @jianyexi jianyexi reopened this Jun 20, 2023
    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Jun 20, 2023

    Generated ApiView

    Language Package Name ApiView Link
    Swagger Microsoft.RecoveryServices Create ApiView failed. Please ensure your github account in Azure/Microsoft is public and add a comment "/azp run" to re-trigger the CI.
    Go sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup Create ApiView failed. Please ensure your github account in Azure/Microsoft is public and add a comment "/azp run" to re-trigger the CI.
    .Net Azure.ResourceManager.RecoveryServicesBackup Create ApiView failed. Please ensure your github account in Azure/Microsoft is public and add a comment "/azp run" to re-trigger the CI.
    Java azure-resourcemanager-recoveryservicesbackup Create ApiView failed. Please ensure your github account in Azure/Microsoft is public and add a comment "/azp run" to re-trigger the CI.

    @openapi-workflow-bot
    Copy link

    Hi @tombuildsstuff, 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.
    Action: To initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
    If you want to know the production traffic statistic, please see ARM Traffic statistic.
    If you think it is false positive breaking change, please provide the reasons in the PR comment, report to Swagger Tooling Team via https://aka.ms/swaggerfeedback.
    Note: To avoid breaking change, you can refer to Shift Left Solution for detecting breaking change in early phase at your service code repository.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required CI-BreakingChange-Go CI-BreakingChange-Go-V2 CI-BreakingChange-JavaScript CI-FixRequiredOnFailure customer-reported Issues that are reported by GitHub users external to the Azure organization. resource-manager
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    6 participants