HumanBrainProject / hbp-validation-framework

Apache License 2.0
5 stars 12 forks source link

Problem with registering models #287

Closed appukuttan-shailesh closed 3 years ago

appukuttan-shailesh commented 4 years ago

I tried registering a model with project_id set to four different values: 1) model-validation [private Collab] 2) shailesh-testing1 [private Collab] 3) shailesh-testing [public Collab] 4) hhnb-registeredmodels [public Collab]

(1), (2) and (4) worked, while I got an error for (3):

ResponseError: Error in adding model. Response = {'detail': 'Invalid collab id'}

image

I am a member of all 4 Collabs listed above. For Collabs in (2), (3) and (4) I am listed as Admin, while in (1) as Editor.

appukuttan-shailesh commented 4 years ago

I tried with a couple of other Collabs:

It works for both of these. Not sure why the problem is restricted to 'shailesh-testing' Collab.

This issue does not affect me much at the moment (so low on priority), but good to remember that such a problem exists.

appukuttan-shailesh commented 4 years ago

I believe the problem is with this method. On this line, we are doing a match with "startswith".

I believe this causes it to fail as I have two collabs named: shailesh-testing and shailesh-testing1. When I try to use the latter there is no problem because it is unique (no common substring) but with former name, it matches both the above Collabs.

Maybe useful..... in ebrains_drive, the repo matching is done like this.