janelia-flyem / dvid

Distributed, Versioned, Image-oriented Dataservice
http://dvid.io
Other
197 stars 33 forks source link

branch-versions/master can yield different results #317

Closed DocSavage closed 5 years ago

DocSavage commented 5 years ago

As detected by @tingzhao, the branch-versions endpoint can return different results when dealing with a legacy repo that may have predated the branching system. http://emdata2.int.janelia.org:7000/api/repo/752d/branch-versions/master

DocSavage commented 5 years ago

Issue is old database could have every node as "master" so there is more than one path.

DocSavage commented 5 years ago

Decided to return error if multiple branch paths are detected. New documentation for the endpoint:

  GET /api/repo/{uuid}/branch-versions/{branch name}

    Returns a JSON list of version UUIDs for the given branch name, starting with the
    current leaf and working back to the root.  Use "master" for the default branch.

    If a repository predates the introduction of branch names and has multiple paths
    for the given branch name, the endpoint will return an Bad Request Error (400).