Add missing prod.txt dependencies #21913
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: mozilla/addons#9481
Description
We merged a broken docker container that cannot run ./manage.py due to missing dependencies in the container.
Context
by merging our requirements files, we accidentally placed production dependencies in dev.txt
Currently we do not have a solid way to determine if what is in prod.txt satisfies our container's needs.
Testing
You can test this locally by building an image
docker build -t test_yaml --platform linux/amd64 --no-cache .
Then run the container
docker run -d --name test_yaml --platform linux/amd64 -v $(pwd):/data/olympia test_yaml tail -f /dev/null
Now shell in and try runing ./manage.py
docker exec -it test_yaml bash
You expect to get a list of available subcommands. If dependencies are missing, you will get an error.
NOTE: This is not foolproof. It only verifies that manage.py doesn't throw, but it could be that any one of the subcommands would throw.. I think.
We will ultimately need to design a way to test that our container can run and apply that test before merging PRs. Otherwise we are totally blind and can break master.