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

add tests on new performance params and get_latest_result #58

Conversation

grkhr
Copy link
Contributor

@grkhr grkhr commented Jun 5, 2023

>>> python test_async_client.py
2023-06-05 17:32:06,945 INFO dune_client.base_client executing 1215383 on medium cluster
2023-06-05 17:32:07,594 INFO dune_client.base_client waiting for query execution 01H262ZQPK0T213MA4N9M45G84 to complete: ExecutionState.EXECUTING
...2023-06-05 17:32:13,496 INFO dune_client.base_client executing 1215383 on medium cluster
2023-06-05 17:32:13,887 INFO dune_client.base_client waiting for query execution 01H262ZXTYWNYSS8X74MDZK188 to complete: ExecutionState.EXECUTING
.2023-06-05 17:32:19,062 INFO dune_client.base_client executing 1215383 on large cluster
.2023-06-05 17:32:19,467 INFO dune_client.base_client executing 1215383 on medium cluster
2023-06-05 17:32:19,781 INFO dune_client.base_client waiting for query execution 01H26303NQWR62QXW9F6TY8KQG to complete: ExecutionState.PENDING (queue position: 1)
.
----------------------------------------------------------------------
Ran 6 tests in 18.005s

OK
>>> python test_client.py      
2023-06-05 17:32:30,759 INFO dune_client.base_client executing 1229120 on medium cluster
.2023-06-05 17:32:31,902 INFO dune_client.base_client executing 1215383 on medium cluster
...2023-06-05 17:32:34,069 INFO dune_client.base_client executing 1276442 on medium cluster
.2023-06-05 17:32:34,722 INFO dune_client.base_client executing 9999999999999 on medium cluster
2023-06-05 17:32:35,044 ERROR dune_client.models Can't build ExecutionResponse from {'error': 'Query not found'} due to KeyError: 'execution_id'
.2023-06-05 17:32:35,045 INFO dune_client.base_client executing 1215383 on medium cluster
2023-06-05 17:32:35,356 ERROR dune_client.models Can't build ExecutionResponse from {'error': 'invalid API Key'} due to KeyError: 'execution_id'
2023-06-05 17:32:35,650 ERROR dune_client.models Can't build ExecutionStatusResponse from {'error': 'invalid API Key'} due to KeyError: 'execution_id'
2023-06-05 17:32:36,015 ERROR dune_client.models Can't build ResultsResponse from {'error': 'invalid API Key'} due to KeyError: 'execution_id'
.2023-06-05 17:32:36,303 ERROR dune_client.models Can't build ExecutionStatusResponse from {'error': 'The requested execution ID (ID: Wonky Job ID) is invalid.'} due to KeyError: 'execution_id'
.2023-06-05 17:32:36,303 INFO dune_client.base_client executing 1215383 on medium cluster
.2023-06-05 17:32:37,328 INFO dune_client.base_client executing 99999999 on medium cluster
2023-06-05 17:32:37,687 ERROR dune_client.models Can't build ExecutionResponse from {'error': 'Query not found'} due to KeyError: 'execution_id'
.2023-06-05 17:32:37,689 INFO dune_client.base_client executing 1215383 on medium cluster
.2023-06-05 17:32:38,973 INFO numexpr.utils NumExpr defaulting to 8 threads.
2023-06-05 17:32:39,161 INFO dune_client.base_client executing 1215383 on medium cluster
.2023-06-05 17:32:40,018 INFO dune_client.base_client executing 1215383 on large cluster
.
----------------------------------------------------------------------
Ran 13 tests in 10.259s

OK

@grkhr
Copy link
Contributor Author

grkhr commented Jun 5, 2023

hey @bh2smith

added some tests

@grkhr grkhr changed the title add tests add tests on new methods and params Jun 5, 2023
@grkhr grkhr changed the title add tests on new methods and params add tests on new performance params and get_latest_result Jun 5, 2023
Copy link
Collaborator

@bh2smith bh2smith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for adding tests!

@bh2smith bh2smith merged commit 742ecac into duneanalytics:main Jun 8, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 8, 2023
@bh2smith
Copy link
Collaborator

bh2smith commented Jul 11, 2023

Hey @grkhr -- I am trying to make use of this performance feature and continue to get this response when setting performance to "large":

'{"error":"Invalid performance tier"}'

Are you able to run the e2e tests locally?

Here is a failing CI run: https://github.com/cowprotocol/dune-client/actions/runs/5518368129/jobs/10062326261

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants