Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.
This repository was archived by the owner on May 15, 2024. It is now read-only.

Allow Query with Limit > 250 #9

@ruidan-li

Description

@ruidan-li

Description

With the default rate limit (30 per minute) and the default upper bound of query limit (250), the maximum number of results of a query is strictly bounded (250 * 30 = 7,500 per minute). So when the expected number of results is larger than this upper bound, then there is almost no way to get the full results (unless the response is slow and thus it doesn't hit the API 30 times per minute).

Even though the limit in this SDK is not checked, the 250 upper bound is enforced at JupiterOne side:

JupiterOneApiError: [{'code': 'INTERNAL_SERVER_ERROR', 'message': 'Error executing J1QL query: "limit" must be a value between 1 and 250 (inclusive). Received: 500 (code=SYNTAX_ERROR)', 'locations': [{'line': 2, 'column': 3}], 'path': ['queryV1']}]

Reproduction

In the current design, when the expected result is larger than 7,500, and the response time is fast enough to allow >= 30 query execution, a JupiterOneApiRetryError is guaranteed to be triggered.

Environment

  • Version of this library used: 0.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions