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

Polling status of an operation after WaitUntil.Started #40540

Closed
RoLfBOT opened this issue Dec 3, 2023 · 8 comments
Closed

Polling status of an operation after WaitUntil.Started #40540

RoLfBOT opened this issue Dec 3, 2023 · 8 comments
Assignees
Labels
App Services 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-author-feedback Workflow: More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@RoLfBOT
Copy link

RoLfBOT commented Dec 3, 2023

Library name and version

Azure.ResourceManager.AppService 1.0.2

Query/Question

I am initiating a slot swap operation with WaitUntil.Started from a worker service.

var operation = await stagingSlot.SwapSlotAsync(WaitUntil.Started, new CsmSlotEntity("production", true)) .ConfigureAwait(continueOnCapturedContext: false);

Once the operation is started, I want to store the operationId in the job store and then defer the execution of the job by an interval x. On next execution of the job, I will read the operationId from the job store and then try to read the status. Repeat this process until the status is terminal.

How to achieve this?

Environment

Windows .NET6
Visual Studio 17.7

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Dec 3, 2023
@jsquire jsquire added App Services 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 and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Dec 4, 2023
@jsquire
Copy link
Member

jsquire commented Dec 4, 2023

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@RoLfBOT
Copy link
Author

RoLfBOT commented Dec 6, 2023

@ArthurMa1978 Any update on this?

@ArthurMa1978 ArthurMa1978 assigned archerzz and unassigned ArthurMa1978 Dec 7, 2023
@archerzz
Copy link
Member

archerzz commented Dec 7, 2023

@ArthurMa1978 Any update on this?

@RoLfBOT We will release the rehydration feature which will solve your problem. Hopefull it would come in 1 month.

@RoLfBOT
Copy link
Author

RoLfBOT commented Dec 7, 2023

@archerzz alright will be on the lookout. But for now there's no way to achieve this correct?

@archerzz
Copy link
Member

archerzz commented Dec 8, 2023

@archerzz alright will be on the lookout. But for now there's no way to achieve this correct?
@RoLfBOT

As far as I can see, currently there are 2 ways:

  • Serialize the whole Operation object, which is quite cumbersome
  • Parse the Response manually, e.g.
    • Invoke Response.TryGetHeader to get the value of polling URL. The header could be Location or azure-asyncoperation or Operation-Location.
    • Manually send request to the given URL.

@archerzz
Copy link
Member

Rehydration work is tracked in Azure/autorest.csharp#2158

@archerzz archerzz added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Jan 10, 2024
@github-actions github-actions bot removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Jan 10, 2024
Copy link

Hi @RoLfBOT. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

Copy link

Hi @RoLfBOT, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue. label Jan 17, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 1, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
App Services 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-author-feedback Workflow: More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

4 participants