When does Nexus 3 generate the simple index for pypi repositories?

I roughly scanned the sources of the nexus-repository-pypi plugin and found PyPiHostedFacetImpl#getRootIndex() which eventually generates a simple-html-index-file. But I couldn’t find, where this is called.

How is the index creation triggered? Uploading an artifact doesn’t do this. Requesting the index file (https://…/simple/foobar) doesn’t create this (404). Rebuild index doesn’t generate the file. What am I missing?

I am currently using Version 3.23.0-03 (I am aware this should be updated, but this is not in my responsibility at the moment).

You should find that the handlers call getRootIndex from nexus-public/OrientPyPiHostedRecipe.groovy at d6d42d9c59fc76c1e0117a6728e8967e2675545b · sonatype/nexus-public · GitHub

Thanks for the fast response!

I found this line in code. But I’m not sure when the rootIndexMatcher() is called. When does this happen from the view of a user?

Each incoming request is checked against all the defined routes. In this case a GET/HEAD request containing the string /simple/ in the path would match against this defined route and then call the assigned handler (in this case rootIndexHandler)

I can’t explain to myself, but probably I have used the worng URL all the time. Probably the browse url or something like that.

Thank you so much!

Hi @sonatype-nexus what URL did you use in the end? I am not able to get it to generate/work either. Did you end up just trying something like pip install /packages/simple/ or did you use a browser to navigate to a specific URL?
@mdodgson can you please help clarify?

An update, a rebuild Index from the repository settings seems to have generated the indexes.