renku-python icon indicating copy to clipboard operation
renku-python copied to clipboard

Referencing a non existing branch in the service APIs doesn't fail

Open lorenzo-cavazzi opened this issue 2 years ago • 0 comments

Describe the bug If I try to invoke some of the APIs exposed by the service that allows specifying a branch (E.G. GET /config.show), and I put a non-existing branch name, I get a successful response with the content of a different branch.

To Reproduce I think the lowest level API to reproduce it is POST /cache.project_clone. But anything containing branch in the parameters leads to the same result. To reproduce the problem, invoke the API using a valid renku project as git_url and a non-existing branch as branch.

Expected behavior I would expect the API to fail with a UserRepoReferenceInvalidError error.

Screenshots and/or execution output Here is an example: image

image

Run environment (please complete the following information):

  • renku-python version: >= 1.1.4 are affected, as well as develop [removed the others, not relevant for the renku-core service]

lorenzo-cavazzi avatar Mar 31 '22 13:03 lorenzo-cavazzi