Page MenuHomeSoftware Heritage

Remove all API endpoints using an origin id.
ClosedPublic

Authored by vlorentz on Sep 6 2019, 4:44 PM.

Details

Summary

They were already deprecated.

This will allow simplifying code in swh.storage.

Diff Detail

Repository
rDWAPPS Web applications
Branch
rm-origin-id-endpoints
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 7743
Build 11126: Cypress tests for swh-web diffsJenkins
Build 11125: tox-on-jenkinsJenkins
Build 11124: arc lint + arc unit

Event Timeline

anlambert added a subscriber: anlambert.

Looks good to me. Let's get rid of these endpoints using these origin ids.

This revision is now accepted and ready to land.Sep 9 2019, 10:54 AM

For your information, I extracted all requests to swh-web in production containing /origin/ in their urls for the last 1 year (using the following Python script P522): 141892 requests were found.

As the associated elasticsearch index does not handle regexp query properly, I filtered the urls based on origin ids using grep ($ cat swh-web-origin-requests | grep -E /origin/[0-9]+)

All requests using origin ids for the last 1 year (aka today minus 1 year range) can be found here: P523 (for a total of 852 requests)

Almost all found requests consists querying an internal browse endpoint that has been removed since (rDWAPPS4762da3d332114f97bbebd86941d43a236929537).
This endpoint was called when performing an origin search through the Web UI.

Otherwise, only 18 requests to Web API endpoints using origin ids have been issued.

So removing the endpoints using origin ids seems pretty safe, considering they are not really used.

This revision was landed with ongoing or failed builds.Sep 10 2019, 11:57 AM
This revision was automatically updated to reflect the committed changes.