This updates various things…
* make use o `--user` argument of pip and `$PYTHONUSERBASE` to install python libraries in the correct places where the `olympia` user has permissions
* Add a new `rootshell` command
Fixes#12366
* Correct if statement
* Use separate tag for easier testing
* Try running directly with user olympia
* Small cleanup
* Add docs
* Fix comment
* Add 'rootshell' command
* Build circleci for local dev
* Fix pip execution by using 'python -m' to fetch the correct pip
* Pick up upstream user/group for builds and implement PYTHONUSERBASE and PIP_USER
* Correctly pass USER_ID and GROUP_ID to Dockerfile when building
* Small cleanups
* Build our test branch
* Fall back to manual uploads for testing
* Cleanup
* Revert back to :latest tag
* move all the make commands that operate on a single container to Makefile-docker
* add default user to Dockerfile
* revert the PYTHON_COMMAND var change
* Fix docs for python 3
* Make travis behave like it's inside our container, fix tox/makefile accordingly
* Fix docs build by choosing another label than _search (which is already used)
* Fix codestyle linter issues
* Remove extra force_bytes import
* Add ignore for int|null in docs as it's used in a couple places and it's valid
* Fix more docs build failures in reviewers.rst
Also build docs with -W by default to make future docs breakage
easier to spot locally.
* Leave -f Makefile-docker for UI Tests as they are not running from the standard container
* Call generate_jsi18n_files on `make update_assets`.
Fixes#10438 and thus local docker instances and circleci tests.
* Actually call update_assets in circleci
This also adds support for specifiying which version to use when installing
packages, though at the moment it's not possible to switch python versions
without reinstalling everything, because both versions share /usr/local/bin
* Add new olympia.core.languages module as a replacement for supported
languages
* Implement new ApplicationsVersions.get_latest_application_version
helper
Fixes#9516Fixes#8850 along the way, removes the need for #8779 and unblocks #2739
Unless I'm mistaken there isn't anyone to really look at this and most
errors and problems should be related to legacy pages anyway.
Let's remove things we're not using or looking at.
Fixes#4845
Let's just remove the manual `update_assets` call and document that
whenever it get's changed / updated the appropriate pytest tests should
be adapted too.
That way we only run it once and potentially fix our unstable 'assets'
job.
Fixes#9656
This is needed for mozilla/addons-nginx#7 and #9080 to be more useful.
The data that `generate_ui_test_addons` generates can directly be used
in the new frontend homepage.
This PR also stops seamonkey and thunderbird add-ons to be generated
by default.
* Changed fxa account generation to allow assigning an fxa ID to a created user.
* Moved pytest execution to makefile to access variables.
* Removed second login tests as the devhub tests also log in.
Until we can figure out a solution or a method of testing the login that will work for multiple integration test suits running they should be disabled.
Port code and tests to Django 1.11.
* Update requirements to Django 1.11.14, remove session_csrf
* Use --run-syncdb for migration calls
* Remove unused setup-docker script
* Port code and tests to Django 1.11.
* Remove django-session-csrf everywhere, it got replaced by django's own
session csrf protection
* Make sure we are calling `client.get()` with `follow=True` where necessary
* Replace django.core.urlresolvers import with django.urls
* Port custom `IconWidgetRenderer` to Django 1.11 as `IconTypeSelect`
* Properly use `_queryset_class` for custom manager classes
* Make use of `base_manager_name` on our models `Meta` instead of `use_for_related_objects`
on the manager where appropriate. This is required to make translations, soft-delete
and more work. See comment on Addons.Meta for more details.
* Various fixes along the way to make tests work
* Port form errors for locale editing forms to Django 1.11 and make use of
form.add_error instead of our own custom process
* Mark TestDetailPage.test_304 as xfail for now, somehow Etags seem to be broken
for that view during tests but work fine in manual tests
* Fix amo.celery, we cannot have any imports at the module-level that may
import the ORM
* Fix global_settings context processor for 500-server error cases
* Fix `changed_data` handling in `AMOModelForm`
* Remove `queryset_transform` and implement it directly in amo/models
* Fix pagination, Django changed how `num_pages` work and how `count` can be overwritten
* Add a new test that tests database transforms as `BaseQuerysetTestCase`
* Make sure `legacy_redirect` only appends `?` if there are actual GET parameters
* Re-implement `LicenseRadioChoiceInput` as `LicenseRadioSelect` which is now Django 1.11 compatible
* Remove our custom `form_kwargs` uplift from Django 1.9
* Correct how we're using `Category.objects.create` and only pass `db_name` instead of `name`, previously
this didn't error but now it (luckily!) does
* Update `FileSelectWidget` to correctly work with Django 1.11, use custom rendering
* Fix decorator ordering for `files.views:browse`
* Update database settings to correctly use `TEST` object
* Fix `select_related` call in `RatingViewSet`
* Remove custom `DateTimeCast` implementation
* Fix `addon_factory` calls in `reviewers/tests/test_views.py` to correctly set
`is_webextension`
* Port our `TranslationDescriptor` and `TranslatedField` to Django 1.11. Also, make sure form error handling works
* Add a new test that checks that `default=None` is a valid setting for translation fields
* Add a new test that checks that translations from related fields are correctly fetched
* Remove possible ambiguity from translations `TestWidget` tests
* Make sure that the correct `MEDIA_URL` is set in `TestDownloadsUnlistedVersions` to fix
external cdn tests
* Remove custom happyforms code. Django cleans text fields now by default
* Move translations app to the top of INSTALLED_APPS, add a lengthy comment
* Pass additional arguments to contribute_to_class, fix smaller nits
* Set MEDIA_URL and STATIC_URL to an external value by default. That's how they're configured in dev, stage and prod anyway.
Please note that we didn't replace all our custom form rendering with proper templated widgets yet. This will
happening in some follow-up work.
Fixes#5271, Fixes#1569
This will simplify the upgrade to Django 1.11 and allow us to keep this
under control, upstream isn't properly maintained.
* Cleanup jingo-minify, keep only parts we are using. Cleanup tests
Also fix and simplify compress_assets to link to the correct /static/ folder.
Originally we hardcoded to look for settings.STATIC_ROOT but that
doesn't suffice since it's set to /site-static/ by default.
We are now using hardcoding the source of our static files instead of
guessing and mistakenly re-using STATIC_ROOT.
This commit also removes verbosity as an argument and simply logs all
errors immediately.
To simplify testing it adds a --force parameter.
To verify this works locally:
* Change settings.STATIC_ROOT to `'/site-static/`'
* Add `/site-static/` to the folders served by nginx (I'll open an issue
on our nginx container to serve this by default too)
* You may have to restart the nginx container after that for nginx to
pick things up
* Remove everything inside site-static folder
* Run `make update_assets`
Fixes#8532
This will simplify the upgrade to Django 1.11 and allow us to keep this
under control, upstream isn't properly maintained.
* Copies jingo-minify into our code
* Removed all parts we aren't using (yui, git integration, `{{ inline_css }}` template tag etc)
* Try to clean up how subprocess calls are being made
* Cleaned up tests
This doesn't change anything regarding how jingo-minify works. It's still using good old `cat` and other ugly things but the code now looks nicer.
See 742297fef9 for more specific details about the cleanup from the original jingo-minify dump.
Fixes#8532