Page MenuHomeSoftware Heritage

api: Update /revision/(sha1_git)/log/ endpoint
ClosedPublic

Authored by anlambert on Jun 16 2020, 2:13 PM.

Details

Summary

Clarify the order in which revisions are returned (BFS) in documentation.

Stop returning next-link in response headers as it is not sufficient to properly
resume the BFS traversal on the revision graph.

Remove any references to pagination in documentation and rename per_page query
parameter to limit (also set its max value to 1000).

Add warning in documentation explaining how a client can obtain the full BFS
traversal of the revision graph.

Remove useless optional prev_sha1s URL argument.

Closes T2450

Diff Detail

Repository
rDWAPPS Web applications
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 D3291 (id=11668)

Rebasing onto 2d0db7f23a...

Current branch diff-target is up to date.
Changes applied before test
commit ab6de4ee83760df2df7d75f9ad571f5ae716dec0
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Jun 16 14:08:32 2020 +0200

    api: Update /revision/(sha1_git)/log/ endpoint
    
    Clarify the order in which revisions are returned (BFS) in documentation.
    
    Stop returning next-link in response headers as it is not sufficient to properly
    resume the BFS traversal on the revision graph.
    
    Remove any references to pagination in documentation and rename per_page query
    parameter to limit (also set its max value to 1000).
    
    Add warning in documentation explaining how a client can obtain the full BFS
    traversal of the revision graph.
    
    Remove useless optional prev_sha1s URL argument.
    
    Closes T2450

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

looks fine to me.

swh/web/api/views/revision.py
232

is lookup_revision_log_with_limit still used in service?

This revision is now accepted and ready to land.Jun 16 2020, 2:37 PM
swh/web/api/views/revision.py
232

That function was privately defined in the endpoint implementation and is not required anymore so I removed it.