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

Add missing prod.txt dependencies #21913

Merged
merged 1 commit into from
Feb 22, 2024
Merged

Add missing prod.txt dependencies #21913

merged 1 commit into from
Feb 22, 2024

Conversation

KevinMind
Copy link
Contributor

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   
python3 ./manage.py

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.

@KevinMind KevinMind requested a review from diox February 22, 2024 15:13
@KevinMind KevinMind merged commit cfee0c1 into master Feb 22, 2024
10 of 11 checks passed
@KevinMind KevinMind deleted the 21912 branch February 22, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants