AllexVeldman / pyoci

Publish and download python packages using (private) OCI registries.
MIT License
2 stars 0 forks source link

Renovate uses the JSON api by default #8

Open AllexVeldman opened 1 month ago

AllexVeldman commented 1 month ago

If a source ends in "/simple/" renovate uses the simple API we have currently implemented. If not it uses the JSON API for some metadata.

Redirecting <>/simple/ to <> might work here.

AllexVeldman commented 1 month ago

Renovate log:

DEBUG: GET https://pyoci.allexveldman.nl/ghcr.io/***/***/json = (code=ERR_NON_2XX_3XX_RESPONSE, statusCode=400 retryCount=0, duration=669) (repository=***)
DEBUG: Datasource connection error (repository=***)
       "datasource": "pypi",
       "packageName": "***",
       "url": "https://pyoci.allexveldman.nl/ghcr.io/***/***/json",
       "errCode": "ERR_NON_2XX_3XX_RESPONSE"
DEBUG: Failed to look up pypi package *** (repository=***, packageFile=pyproject.toml, dependency=***)
AllexVeldman commented 1 month ago

Renovate also falls back on 404 on the json API: https://github.com/renovatebot/renovate/blob/7d1a1aa9b320843aac3521ac08e0b093996b6ec4/lib/modules/datasource/pypi/index.ts#L63C1-L69C10

So returning 404 instead of 400 could also work.