You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the iter_job_results() method, an invalid comparison statement leads to "PENDING" state returning False.
Expected behavior
Both "RUNNING" and "PENDING" states should evaluate to True.
Current behavior
Currently, if a "PENDING" state returned by the Query Service API would evaluate to False, potentially resulting in a CortexError exception being thrown.
Possible solution
As proposed by @mishas, refactoring the comparison to elif r.json()["state"] in ("RUNNING", "PENDING") will allow both "RUNNING" and "PENDING" to evaluate to True.
Steps to reproduce
n/a
Screenshots
n/a
Context
n/a
Your Environment
Version used: cortex-data-lake-python alpha7
Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3): python 3.7.7
Operating System and version (desktop or mobile): desktop
Link to your project:
The text was updated successfully, but these errors were encountered:
sserrata
changed the title
Invalid comparison leads to "PENDING" state returning False
Invalid comparison leads to "PENDING" state returning False
Mar 25, 2020
sserrata
added a commit
to sserrata/pan-cortex-data-lake-python
that referenced
this issue
Mar 25, 2020
Describe the bug
In the
iter_job_results()
method, an invalid comparison statement leads to "PENDING" state returningFalse
.Expected behavior
Both "RUNNING" and "PENDING" states should evaluate to
True
.Current behavior
Currently, if a "PENDING" state returned by the Query Service API would evaluate to
False
, potentially resulting in aCortexError
exception being thrown.Possible solution
As proposed by @mishas, refactoring the comparison to
elif r.json()["state"] in ("RUNNING", "PENDING")
will allow both "RUNNING" and "PENDING" to evaluate toTrue
.Steps to reproduce
n/a
Screenshots
n/a
Context
n/a
Your Environment
The text was updated successfully, but these errors were encountered: