Skip to content

execute_query_retry in client_runtime_context.py may leave the context in a dirty stateΒ #938

Open
@npetzall-vcc

Description

@npetzall-vcc

https://github.com/vgrem/Office365-REST-Python-Client/blob/9584c62c9c4237107fb5ab2dc11629b8f1184b57/office365/runtime/client_runtime_context.py#L43-L71

If the last attempt fails with a ClientRequestException it will still re-queue the query.
But it will never consume it, since line 63 would never be called again. Unless the context is re-used and the query would be executed for a different item which could cause all sorts of issues.

Since there is no exception/error raised when max attempts have been performed.
This dirty state is unknown unless failure callback is implemented to keep track of this, clear() is called after each use or context is re-created after each use.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions