scitran / core

RESTful API
https://scitran.github.io
MIT License
18 stars 18 forks source link

Support <id:xyz> syntax in resolver #1080

Closed kofalt closed 6 years ago

kofalt commented 6 years ago

When resolving a human-meaningful path, you can now send <id:xyz> syntax to unambiguously resolve a path segment. This is useful when an ambiguity exists amongst a container's children, such as two sessions with the same label.

Para exemplar:

POST /api/resolve HTTP/1.1

{"path":["scitran","Testdata","foo","<id:5a871c5f3871ca01205e78a2>"]}
nagem commented 6 years ago

The change looks innocuous enough. "Filtering" by id in code shines a light on the fact that we shouldn't be doing any label filtering in code either and let Mongo handle that. That change can be addressed outside this PR.

codecov-io commented 6 years ago

Codecov Report

Merging #1080 into master will increase coverage by 0.03%. The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1080      +/-   ##
==========================================
+ Coverage   90.78%   90.82%   +0.03%     
==========================================
  Files          50       50              
  Lines        6991     7017      +26     
==========================================
+ Hits         6347     6373      +26     
  Misses        644      644