Page MenuHomeSoftware Heritage

Add max_edges argument to all the endpoints
ClosedPublic

Authored by seirl on Jan 7 2022, 4:00 PM.

Details

Summary

Used to implement DoS protection (T3161)

Test Plan

The unit tests already go through all the affected codepaths.

Diff Detail

Repository
rDGRPH Compressed graph representation
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D6892 (id=24998)

Rebasing onto 4d36535f9e...

Current branch diff-target is up to date.
Changes applied before test
commit 32d6b0ccf3b15e098b4321938f3ce690f9eae7d2
Author: Antoine Pietri <antoine.pietri1@gmail.com>
Date:   Fri Jan 7 15:58:59 2022 +0100

    Add max_edges argument to all the endpoints

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

seirl requested review of this revision.Jan 7 2022, 4:02 PM

The unit tests already go through all the affected codepaths

I don't know the code base enough.
The coverage report does not seem to agree though ;)

The coverage report does not seem to agree though ;)

The coverage is broken because we spawn the server in a separate process. I should file a separate task to fix this.

anlambert added a subscriber: anlambert.

Looks good to me. I do not know the codebase of swh-graph really well but I do not see what could go wrong considering the few changes.

This revision is now accepted and ready to land.Jan 11 2022, 2:23 PM