Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upProvide status URL for long running operations #52
Comments
This comment has been minimized.
This comment has been minimized.
Agreed. I think the more general issue is that when performing Actions, we don't show anything about the Response unless there is an error. We should think through what the UI might look like. There is also the possibility of doing polling and waiting for completion, but I'm not sure I like that direction as it feels a little too 'high level' for Resource Explorer, which today only does one request at a time. |
This comment has been minimized.
This comment has been minimized.
@davidebbo Thanks for the feedback! I'd be happy with a generic: "You can get status on this request by visiting {{url}}" along with a button to fetch the JSON. It doesn't have to have automatic polling. As an aside, I asked for this feature because I'm currently stumped on how to fetch the status of a swap. I thought it would have been something like |
This comment has been minimized.
This comment has been minimized.
From what I can see, one way to tell is to look at the |
This comment has been minimized.
This comment has been minimized.
@davidebbo Thanks for the workaround idea. I checked it out last night and it seemed to be working ( I would love it if the swap were always near-instantaneous (like it was for a few minutes this morning). However, to work around this issue it seems like the only way to really check if the swap succeeded is to embed the git hash of the code version under a secret route name and then check if that is different by polling it instead of the status resource route. Am I missing something? I love the idea of swapping (especially if it was instant), but it seems like I keep having issues with it. I'm going down this path because the autoswap wasn't working consistently (it'd often not swap). I always appreciate your feedback/advice. Let me know if I should move this discussion to the WebSite/WebApps forums (or elsewhere) instead. I haven't had great success using official channels like support tickets (very slow turnaround time and not very actionable), but it's always refreshing to talk directly to devs like yourself. This issue is partially related to ARMExplorer in the sense of getting proper status, but it's also related to having issues with the swap feature. |
This comment has been minimized.
This comment has been minimized.
We're probably getting a little too deep into Swap discussion for the Resource Explorer issue. :) The forum would be the ideal place to discuss and involve all the right experts (some people know more about swap than I do!). Though I did find out one thing: when you swap, you get an http header back that looks like this:
That's the link that gives status on the swap, and is more reliable than the |
This comment has been minimized.
This comment has been minimized.
@davidebbo I'll direct any further problems related to swap specifically to the forums. I tried to do a GET on the Location header you mentioned that gets returned (using the same Bearer authentication header as I did with the POST to do the swap) and I got back a HTTP 400 (Bad Request) response. Does it work for you? Are you using "https://management.azure.com/" as the base address? If this pattern is repeated across the APIs (where the Location header has a status URL), then it would indeed be a very helpful feature of ARMExplorer to expose that along with a button to get updated status for long running operations. Thanks! |
This comment has been minimized.
This comment has been minimized.
I tried and it worked fine for me. It returned 202 while ongoing, and then 200 when done. Your best bet to experiment with the API is ARMClient. Use |
This comment has been minimized.
This comment has been minimized.
Ah! I added a Thanks for the hint about ARMClient! |
This comment has been minimized.
This comment has been minimized.
Agreed, that would make sense. |
When doing a long-running operation like
resourceGroups/X/providers/Microsoft.Web/sites/Y/slots/Z/slotsswap
that has ax-ms-request-id
, it'd be nice to automatically have the route to get its current status