Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package indexing not happening unless py-server docker image is restarted #455

Open
rchevalier-brainchip opened this issue Oct 26, 2022 · 10 comments
Assignees
Labels

Comments

@rchevalier-brainchip
Copy link

Hi,

I am currently using v1.5.1 docker image.
Image is started with the following script:

#!/bin/bash

pyserver_port=81

py_server_up(){
    echo -n "Stopping previously running pyserver instances... "

    stoppev=$(docker stop py-server 2>&1)
    if [ "$stopped" = "py-server" ] ; then
        docker rm $stopped
    fi
    echo "DONE"

    echo "Starting new python package server instance..."
    docker run \
      --volume=/home/brainchip/pip-packages/linux:/data/packages/linux \
      --volume=/home/brainchip/pip-packages/manylinux:/data/packages/manylinux \
      --volume=/home/brainchip/pip-packages/windows:/data/packages/win \
      --publish=$pyserver_port:8080 \
      --restart=always \
      --detach=true \
      --name=py-server \
      pypiserver/pypiserver:v1.5.0

}

#####
py_server_up

and python packages are uploaded to /home/brainchip/pip-packages using scp.

Uploading new packages, they are not seen through the server web interface unless I restart the docker image (just like if there was no indexing refresh).

Could you help me letting me know if a known issue and the additional data I could collect if not?

Thanks,
RC

@kevinbull
Copy link

We are running version 1.5.0 in a docker container and I see the same sort of behavior except a container restart doesn't update the package list for me. I can get a console into the container and see the whl file in the packages directory with all the same permissions as other files but it still doesn't show in the /packages or /simple URLs.

@kevinbull
Copy link

I replaced the v1.5.0 container with one running v1.5.1 and I still can't see the whl file. The web UI lists 13 other whl and gz files from the packages directory but not the one that was placed there programmatically. This is very strange all the file permissions are identical.

@dee-me-tree-or-love
Copy link
Member

Thanks a lot for reporting this @rchevalier-brainchip and @kevinbull! I think that this might be related to #449 under the hood, but I will still need to start a thorough investigation. Thank you very much for reporting the reproducible configurations where the issues are faced! 👌 I hope we will be able to resolve it rather soon.

@rchevalier-brainchip
Copy link
Author

Thanks @dee-me-tree-or-love, I will try the suggested w/a (#449 (comment)) and let you know (we added a cron job to periodically restart the server meanwhile)

@dee-me-tree-or-love
Copy link
Member

Great @rchevalier-brainchip, thanks a lot for trying this out! Indeed, if you could share any insights it would be super helpful! Thanks for sharing the workaround for the time being and sorry for the encountered challenges 🙏

@rchevalier-brainchip
Copy link
Author

Hi @dee-me-tree-or-love I have just restarted the docker image adding the following:

    docker run \
      --volume=/home/brainchip/pip-packages/linux:/data/packages/linux \
      --volume=/home/brainchip/pip-packages/manylinux:/data/packages/manylinux \
      --volume=/home/brainchip/pip-packages/windows:/data/packages/win \
      --publish=81:8080 \
      --restart=always \
      --detach=true \
      --name=py-server \
      pypiserver/pypiserver:v1.5.0 run -p 8080 --server gunicorn --backend simple-dir

I will let you know if suggested w/a works as soon as a new package is uploaded by out continuous integration

@rchevalier-brainchip
Copy link
Author

I confirm that the above w/a works for us.

@kevinbull
Copy link

I can confirm the w/a also works with 1.5.1

@rchevalier-brainchip
Copy link
Author

Just to mention that I have setup a new server with 2.0.1 and that this issue is still there ... I had to apply the same wokraround again: #455 (comment)

@natanans
Copy link

I have been going through this bug for some time on my docker ....many thanks for the work around!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants