Closed JossWhittle closed 3 years ago
huh, that definitely is strange - the containers are deployed with an automated build on merge, and according to the registry the last build was 20 days ago. Could you compare the working version of Django against what was built here? https://app.circleci.com/pipelines/github/singularityhub/sregistry/147/workflows/9e08f383-cf67-44ce-9b4f-97cbcaa06035/jobs/1285. If there is an issue there then it must be that the older version is being cached, or something like that.
So the version pulled from quay does actually have the advertised version 3.11.2
of djangorestframework but also has the error related to the base_name
parameter. Building locally actually results in an earlier version 3.10.3
than is pinned.
docker-compose up -d
# Pulls images from quay
NAME=$(docker ps -aqf "name=sregistry_uwsgi_1")
docker exec $NAME pip list | grep djangorestframework
Yields:
djangorestframework 3.11.2
docker-compose down
docker build -t quay.io/vanessa/sregistry .
docker-compose up -d
NAME=$(docker ps -aqf "name=sregistry_uwsgi_1")
docker exec $NAME pip list | grep djangorestframework
Yields:
djangorestframework 3.10.3
I'm afraid I can't reproduce that - building locally I get 3.11.2.
$ docker run --rm -it quay.io/vanessa/sregistry:latest bash
root@2c68e1f0c442:/code# pip freeze | grep djangorest
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
djangorestframework==3.11.2
I think the issue is that we missed one base_name:
router.register(r"^build", views.RecipePushViewSet, base_name="build") # build
I'm not sure why you are building and getting an older version (maybe a cache?) but what I can do is a PR to fix this bug, and then also bump the python version in the container (3.5 is EOL). This is a non work related project, so I'll have this for you at the end of the day to test. Thanks for reporting!
Having a closer look the the version difference is because requirements.txt
was updated after the last (v1.1.31
) release.
https://github.com/singularityhub/sregistry/blame/v1.1.31/requirements.txt#L22
https://github.com/singularityhub/sregistry/blame/master/requirements.txt#L22
I re-cloned on master and now a locally built image has the correct 3.11.2
version as you'd expect but there is naturally the issue with base_name
.
The confuser I think has been due to docker-compose pulling whichever the :latest image is when it needs to be the matching tagged release image when you clone a release tag or download the zipped bundle.
That would make sense, it's sort of assumed that the user will just clone master, but if the clone is to a release, the release should use the matching tag. I can use this convention going forward.
@JossWhittle please see https://github.com/singularityhub/sregistry/pull/363. Instead of pinning versions in the docker-compose (which is hard to maintain) I added a section to the docs, and comments alongside the image names. When you get a chance could you please test? When we merge that PR there will be a container build and deploy to quay, and I can also draft a release here.
@vsoch sorry for the delayed response. All working now by modifying the docker-compose to use the correct images. Thank you for the assistance in debugging.
Sure thing! So the bump in Python in the base images is A-ok?
Ping @JossWhittle did you get a chance to review the PR for this issue?
The PR branch spins up correctly through docker-compose using the new python version, but this isn't a test using a fully configured installation.
I'm still using v1.1.31 in production currently by changing the compose file for version pinning and adding traefik for SSL.
Describe the bug
Related to #266. The pre-built quay.io/vanessa/sregistry image does not seem to have the pinned version of the djangorestframework. Building the image locally is stated as optional in the installation docs but is required to properly execute the management utilities.
To Reproduce
Expected behavior