-
-
Notifications
You must be signed in to change notification settings - Fork 116
Description
For some time—probably about a week—the scancode.io instances have not been working anymore. I thought it was my fault and debugged it for a while, as this bug/change coincided with changes in the runtime environment I'm using. After a while, I found that the issue was the original scancode.io repository, not my environment.
The VM image that I'm trying to scan:
It will result in the following error after the worker tries to unpack the VM image. Unfortunately, this is an extremely short and not helpful error message:
worker-1 | INFO [error] a bytes-like object is required, not 'str
You can replicate the not-working environment and working environment with a slightly older version and images.
Installation method 1 - Original - not working
cd
if [ -d scancode.io ]; then
pushd scancode.io
docker-compose down --rmi all -v --remove-orphans
popd
rm -rf scancode.io
fi
git clone https://github.com/aboutcode-org/scancode.io.git
cd scancode.io
git checkout main
make envfile
echo -e 'ALLOWED_HOSTS='*'\n' >> .env
docker-compose up --scale worker=2
Installation method 2 - older images + fixes on offline deployment
Note that I'm using my personal repository, which contains the fixes for docker-compose offline. I'm using an older version because the Redis environment changed 😸
cd
if [ -d scancode.io ]; then
pushd scancode.io
docker-compose down --rmi all -v --remove-orphans
popd
rm -rf scancode.io
fi
git clone https://github.com/AlexBaranowski/scancode.io.git
cd scancode.io
git checkout v34.9.1-fix
wget https://github.com/AlexBaranowski/scancode-io-tmp-working-containers/releases/download/bug/scancodeio-images.tar.gz
docker load --input scancodeio-images.tar.gz
make envfile
echo -e 'ALLOWED_HOSTS='*'\n' >> .env
docker-compose --file docker-compose-offline.yml up --scale worker=2
How this could be helpful
I think that checking the:
- system packages version diff
- python packages versions diff
could be helpful, so I'm providing the working images :). I won't bottom out this problem because I do not have more time to debug it as I have spent two days fixing the nonexistent bug in my environment :((( The second installation option is a good workaround for my needs.
Airgap not working as expected
Well, TBH, when it's fixed (the Docker images are once more working), I could update the offline installation docs, makefile, and docker-compose-offline.yml because they are outdated and not working ;)
Related issues
Best,
Alex