thoth-station / user-api

Web Service exposing Thoth functions to the RESTful worlds
https://thoth-station.github.io/
GNU General Public License v3.0
8 stars 18 forks source link

GET ​/python​/package​/versions gives 404 Error not found #1784

Closed shreekarSS closed 2 years ago

shreekarSS commented 2 years ago

Describe the bug

Get API gives 404 Error not found with default value , expecting to list available python versions

"error": "Package 'tensorflow' not found", "parameters": { "name": "tensorflow", "order_by": null, "os_name": "ubi", "os_version": "9", "python_version": "3.9" } }

To Reproduce Steps to reproduce the behavior:

  1. Try https://khemenu.thoth-station.ninja/api/v1/ui/#/PythonPackages/list_python_package_versions

Expected behavior Expecting to list available python versions

goern commented 2 years ago

/sig devsecops /priority critical-urgent

harshad16 commented 2 years ago

The response seems to be correct, as if we don't find the package, it should be a 404

However, if we use the correct params, we would get 200 for example: https://test.thoth-station.ninja/api/v1/python/package/versions?name=tensorflow&os_name=ubi&os_version=8&python_version=3.6

maybe we should keep the default example pointing to ubi8 and python 3.8 till we get ingestion done for ubi9 and python3.9

changing these respectively should give default results. https://khemenu.thoth-station.ninja/api/v1/python/package/versions?name=tensorflow&os_name=ubi&os_version=8&python_version=3.8

https://github.com/thoth-station/user-api/blob/043924d0aff6e480489013ad64432222729fb061/openapi/openapi.yaml#L1365 https://github.com/thoth-station/user-api/blob/043924d0aff6e480489013ad64432222729fb061/openapi/openapi.yaml#L1372