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

LRO PUT operation marked as done when not completed #1133

Closed
derekbekoe opened this issue Jun 3, 2016 · 6 comments
Closed

LRO PUT operation marked as done when not completed #1133

derekbekoe opened this issue Jun 3, 2016 · 6 comments
Labels

Comments

@derekbekoe
Copy link
Member

In Python msrestazure 0.4.0 PUT operations are marked as completed when they have not.

I believe the issue is with azure_operation.py

In AzureOperationPoller._poll() there is a call to self._operation.is_done() to check if the LRO is completed.
For a PUT operation, LongRunningOperation.is_done() returns True when in 0.3.0, it returned False.
The expected result is False so 1 more request can be made using the initial_url to get the expected response.

This is a related PR that changed the azure_operation.py file #1078.
This issue may be related to #1128

@lmazuel
Copy link
Member

lmazuel commented Jun 3, 2016

Hi @derekbekoe
I think you are right this is coming from the PR you point. I guess I should take a closer look at my VM tests because all my tests were Green/OK.
We definitely needs @annatisch here, but I will try to take a look to help.

@annatisch
Copy link
Member

Thanks! I will take a look.

@annatisch
Copy link
Member

@derekbekoe - would it be possible to get the contents of the API polling responses?
This will best help us identify what part of the response caused the AzureOperationPoller to decide the operation was finished.
You should be able to see this if logging in debug.

@annatisch
Copy link
Member

@derekbekoe - actually it would also be helpful to know which service spec the client you're using was generated from and which PUT call was exhibiting this behaviour - I can probably work backwards from that. :)

@lmazuel
Copy link
Member

lmazuel commented Jun 7, 2016

@annatisch I reproduce the problem with VM create (so Compute file)

When calling result(), RC4 returns an empty VirtualMachine object without raise an exception.

I got a deserialise error on this:

“{"status":"Succeeded"}”.

msrestazure was trying to deserialize that as a VirtualMachine

@derekbekoe
Copy link
Member Author

Thanks!

amarzavery pushed a commit that referenced this issue Jul 15, 2016
* Fix for #1133 by @annatisch

* Python - msrestazure 0.4.1

* Fix Azure operation tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants