When testing on dev we found that spawning workers took about 4-5 seconds per worker, so 4 workers would take about 20 seconds to spin up, causing a lot of health check flapping and pod churn. Locally testing pre-forking allowed for much faster start-up times, so we'll test this on dev.
* 10614: Add pre-commit hook for including the MPLv2
Adds to Python, JS, SCSS, Jinja HTML, Fluent templates and shell scripts
Note that the order of application of the hooks is important - we want to add a missing license before we check the formatting of files
* 10614: Update MPLv2 comments on all templates to match standard format produced by pre-commit hook
* Updates existing MPLv2 text to use a https URL
* Amend a handful of Fluent templates that used a token instead of the string "Mozilla" - this standardised things; translation was not used or needed
* Add missing MPLv2 where needed
* Update three tests that regressed with these changes, above
* 10614: Update pre-commit config to not add MPL to JS libraries; Remove MPL from the four files which should not have had it
* Update requirements to avoid requests version clash
* 10570: Add isort to project
* 10570: Add isort config to project
* 10570: Add isort as a test run/CI step
* 10570: Add isort to pre-commit config
* 10570: Update isort config to allow tests/pages.py to be first-party, which is more appropriate
* 10570: Apply isort to entire codebase, using project config
* 10570: Explicitly include lib/ as a first-party import
This behaviour is already implicit in the current config, but making it explicit, partly to protect against a future change. Also makes it easier to grok what will happen to various bedrock-codebase imports
* 10570: Update isort config to stack Django imports above third-party ones
* 10570: [nit-fix] Update run-tests.sh to call isort with the same syntax pattern as we call black
* Convert from python-decouple to everett for config loading
* Gives us more flexibility on loading waffle switches
and funnelcake definitions as well as potentially new
config types in future.
* Create a model for storing configs
* Create a management command for loading configs from git repo
Relies on mozmeao/www-config#94 for loading configs.
When used as a Django middleware all asset responses include
all headers intended for page responses (e.g. CSP and XSS protection).
Switch to WSGI middleware to avoid sending extra data as well as
to avoid confusing Safari.
* Fix demo deploy and update docs.
* Make it work with deis1 and deis2
* Enforce max 63 char app names
* Fix SSL redirect for Deis v2 clusters. Allow settings per cluster.
* Improve env file handling and combination for demo deploys
* Use new envcat utility
* Deploy our dev, stage, and prod apps to virginia and tokyo clusters
Gives us a couple of new and improved things:
* Adds the new "immutable" Cache-Control header extension
* Uses whitenoise for dev so all of the files work
Also increase default cache header expiry to 6 hours from 1 minute.
The majority of files used on bedrock are immutable (include the
file content hash) and will be unaffected by this change.
Well... actually it mostly just moves most of funfactory
from an external lib to bedrock.base. But at least this way
we can remove the bits we don't need and be ready to make
the changes we need to upgrade to Django 1.8.
I can't come close to writing as perfect a commit message
for this as @willkg did for fjord, so I'll just leave this here.
https://github.com/mozilla/fjord/commit/9d7c97b
- Create newsletter app and move hacks.mozilla.org.html there
- Set up to display Django messages to the user.
- Make displaying most of the information on the page conditional on having a formset, so we can still use the same template when some error occurs in processing.
- Handle errors by displaying translated messages to the user. Also use Playdoh logging to log errors and debug information.
- If no token given, or token is invalid, let user supply an email
address and sign up for newsletters.