thoth-station / management-api

An API service used for administration of deployed Thoth
GNU General Public License v3.0
3 stars 11 forks source link

Internal Server error when trying to register an index #900

Closed mayaCostantini closed 2 years ago

mayaCostantini commented 2 years ago

Describe the bug

When trying to register an index via the /python/package-index/register endpoint, an internal server error occurs:

{
  "details": {
    "datetime": "2022-07-05T09:10:51.734806",
    "type": "InternalServerError"
  },
  "error": "Internal server error occurred, please contact administrator with provided details."
}

Environments: prod (moc), stage and test

To Reproduce Steps to reproduce the behavior:

  1. Go to management-api (any deployment)
  2. Try to register the https://download.pytorch.org/whl/cu113 index:
    {
    "only_if_package_seen": false,
    "url": "https://download.pytorch.org/whl/cu113",
    "verify_ssl": true
    }

    with enabled set to true

  3. See the error

Expected behavior

Index is registered in Thoth's DB.

mayaCostantini commented 2 years ago

/priority critical-urgent /sig stack-guidance

mayaCostantini commented 2 years ago

/kind bug

mayaCostantini commented 2 years ago

Given the logs of the management-api pod, I think this should be fixed by https://github.com/thoth-station/management-api/pull/897 @shreekarSS could you please create a new patch release?

harshad16 commented 2 years ago

The changes are now live. If the warehouse URL is not provided, the API throws an error. Screenshot from 2022-10-13 16-09-10

Thanks, everyone for working on this. closing the issue.