Page MenuHomeSoftware Heritage

[WIP] Add a dynamic query cost calculator
AbandonedPublic

Authored by jayeshv on Aug 29 2022, 4:00 PM.

Details

Reviewers
None
Group Reviewers
Reviewers
Maniphest Tasks
T4299: GraphQL: Static query validation and max cost limiting
Summary

WIP - Dynamically calculate the cost for the entire response.
Add 1 unit to the cost for every node returned.
raise a QueryCostError if the number goes beyond a threshold.

Related to T4299

Diff Detail

Repository
rDGQL GraphQL API
Branch
query-cost
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 31136
Build 48707: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 48706: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D8334 (id=30093)

Rebasing onto 4478a533a9...

Current branch diff-target is up to date.
Changes applied before test
commit 2717f93a571b793ec87487873c740016d7b84ed7
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Mon Aug 29 13:37:18 2022 +0200

    Add a dynamic query cost calculator
    
    Dynamically calculate the cost for the entire response.
    Add 1 unit to the cost for every node returned.
    raise a QueryCostError if the number goes beyond a threshold.
    
    Related to T4299

See https://jenkins.softwareheritage.org/job/DGQL/job/tests-on-diff/136/ for more details.