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

Make up go brrrrrrrr #22781

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Make up go brrrrrrrr #22781

wants to merge 1 commit into from

Conversation

KevinMind
Copy link
Contributor

@KevinMind KevinMind commented Oct 18, 2024

Fixes: mozilla/addons#15066
Fixes: mozilla/addons#15046

Description

This PR cuts out most of the remaining slowness from make up in development mode by:

  • removing the locale/assets/source stages from development
  • removing and simplifying docker volumes
  • etc etc

Context

With this PR make up in dev mode will be much more efficient, though slightly different than production mode. Running in production mode is now trivial so this is probably an okay tradeoff. If you want to verify a feature or develop like you're in prod, you can do so. But we will save a lot of time by making up fast.

This PR also fixes race conditions we had during docker build by:

  • ensuring only 1 of development or production dependency stages is installed per build.
  • ensuring no volumes are shared by web/worker. By using anon volumes we now will have 1 for each. Not a big deal as they will be cleaned up automatically

Testing

Run make up in development and production mode by specigying the docker target

make up DOCKER_TARGET=production
make up DOCKER_TARGET=development

You should be able to:

  • load the app, no static files missing
  • load i118n json files (in prod they will be real in dev they will be stubs)
  • upload/download addon artifacts

Seeding

This PR also fixes a bug where seeding the db does not synchronize the storage with the db state. Now it does. So running

./manage.py seed_data

Should clear the DB, seed it and sync the data and storage directories.

Checklist

  • Add #ISSUENUM at the top of your PR to an existing open issue in the mozilla/addons repository.
  • Successfully verified the change locally.
  • The change is covered by automated tests, or otherwise indicated why doing so is unnecessary/impossible.
  • Add before and after screenshots (Only for changes that impact the UI).
  • Add or update relevant docs reflecting the changes made.

@KevinMind KevinMind force-pushed the dev-mode-next branch 2 times, most recently from fd69245 to b6ec560 Compare October 18, 2024 13:02
Base automatically changed from dev-mode to master October 18, 2024 15:39
@KevinMind KevinMind force-pushed the dev-mode-next branch 3 times, most recently from 04cff9a to 5ca1211 Compare October 18, 2024 19:21
data seed command synchronizes storage directory

Remove storage volume (reuse olympia volume)

Remove data_olympia (use anonymous volume)

Remove sources from development DOCKER_TARGET

Invert docker-compose.ci to docker-compose.dev (update defaults in setup script to support prod mode in ci)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant