Граф коммитов

24 Коммитов

Автор SHA1 Сообщение Дата
Rob Hudson 4f8fb977d6 Move to using gevent workers instead of meinheld
This is for Python upgradability since meinheld is no longer active.
2024-03-01 12:58:06 -08:00
Rob Hudson 1f89a4c82e Revert uwsgi 2024-01-29 16:00:19 -08:00
Rob Hudson fffce43a73 Fixes #13247: Replace gunicorn+meinheld with uWSGI 2024-01-29 12:05:50 -08:00
Rob Hudson df39b58c7b Bump Whitenoise 2022-02-28 18:04:13 -05:00
Rob Hudson 2177e4d2dc
Fix #11057: Update codebase to prefer python3 syntax (#11086)
* Update `super()` calls

* Update for use f-strings

* Remove utf-8 comments

* Import from built-in `unittest.mock`

* Use native dict and set syntax

* Update exception errors

* Remove six compatibility code

* Remove explicit utf-8 encoding

* Use `yield from`
2022-01-11 07:21:16 -08:00
Steve Jalim a8ed6ae9c4
Add pre-commit hook for including the MPLv2 in all source code files (#10617)
* 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
2021-10-22 13:09:44 +01:00
Steve Jalim ab38b080ab
10570: Add isort support to project (#10573)
* 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
2021-10-11 18:08:58 +01:00
Rob Hudson 31943fea75 Black format all Python files 2021-09-30 16:03:35 -04:00
Paul McLanahan 0fcf769426 Revert "Revert "Move from Raven to Sentry-SDK for error reporting""
This reverts commit 8847fe3ec2.

Fixing this again plus upgrading pytest libraries
2020-09-24 10:47:18 -04:00
Paul McLanahan cba24f845d Fail to start if the database file is missing 2020-09-09 12:21:13 -04:00
Alan Alexander 8847fe3ec2 Revert "Move from Raven to Sentry-SDK for error reporting"
This reverts commit ae9360bf43.

Seems to be causing pytest to behave strangely, spinning up tons and tons of extra processes.
2020-07-21 14:42:11 -04:00
Paul McLanahan ae9360bf43 Move from Raven to Sentry-SDK for error reporting
Fix #6378
2020-07-21 10:56:05 -04:00
Paul McLanahan a852e04d5f Use newrelic-admin in run-prod.sh (#8277)
Instead of importing newrelic in the wsgi file.

Fix #7372
2019-12-06 16:34:45 -06:00
Josh Mize ed8d624ff1
Add 'newrelic.ini' param to newrelic.agent.initialize() (#7161) 2019-05-07 10:36:13 -05:00
Josh Mize 5b8b210a73 Remove unused ability to use custom newrelic.ini 2019-05-02 15:54:12 -04:00
Josh Mize a3ee82e942 Import newrelic.agent first in wsgi app 2019-05-02 15:11:29 -04:00
Paul McLanahan b5fa181eec Fix default setting for Newrelic INI File in wsgi/app.py (#5709) 2018-05-16 17:08:41 -05:00
Paul McLanahan 54b8cbbf8a Fix #5583: Support loading some config from the DB
* 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.
2018-05-16 16:16:22 -04:00
Paul McLanahan 41a74968ce Use Whitenoise as wsgi middleware, not Django
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.
2017-07-19 23:48:42 -04:00
Paul McLanahan 914d8007f4 Restructure jenkins deployment. Demos build in main pipeline.
* 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
2017-05-10 17:01:06 -04:00
Paul McLanahan 9160321dae Upgrade Whitenoise to 3.3.0
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
2017-01-30 12:42:21 -05:00
Paul McLanahan fafda32525 Add the raven Sentry client for error reporting 2016-08-25 10:16:33 -04:00
Paul McLanahan 1d95d881ac Remove old files associated with legacy infra 2016-03-22 16:50:54 -04:00
Paul McLanahan 2eebfd676e Add ability to run via gunicorn 2015-04-14 10:32:24 -04:00