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

[recoveryservices] No way to wait for completion of async ProtectedItem operations #23869

Open
thomas11 opened this issue Dec 16, 2024 · 1 comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Recovery Services Backup Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@thomas11
Copy link

Bug Report

This report is about github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4, version 4.1.0, using go version go1.23.4 darwin/arm64.

TL;DR: the operations of ProtectedItemsClient are async but it seems to be impossible to poll their status.

The documentation for all three methods of ProtectedItemsClient (Get, CreateOrUpdate, Delete) states

This is an asynchronous operation. To know the status of the operation, call the GetItemOperationResult API.

No such method exists, but (*ProtectedItemOperationResultsClient) Get seems to be the right one. The naming mismatch is a usability issue.

More importantly, however, is that ProtectedItemOperationResultsClient.Get requires an operationId parameter. But the methods of ProtectedItemsClient don't return one, making it impossible to use ProtectedItemOperationResultsClient.Get.

A look at the source shows that the operationId is in the location header, but the client does not return it.

How are we supposed to poll the result of ProtectedItemsClient operations? I guess a repeated Get in a loop with backoff would work?

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Recovery Services Backup Service Attention Workflow: This issue is responsible by Azure service team. labels Dec 16, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @adityabalaji-msft @pvrk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Recovery Services Backup Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

1 participant