Page MenuHomeSoftware Heritage

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

Authored by anlambert on Tue, Jun 16, 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

anlambert created this revision.Tue, Jun 16, 2:13 PM

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?

ardumont accepted this revision.Tue, Jun 16, 2:37 PM
This revision is now accepted and ready to land.Tue, Jun 16, 2:37 PM
anlambert added inline comments.Tue, Jun 16, 2:46 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.

This revision was automatically updated to reflect the committed changes.