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

87 Коммитов

Автор SHA1 Сообщение Дата
Mathieu Pillard 04c983890c
Remove code and dependencies dealing with creating actual FxA users in tests (#20811)
* Remove code and dependencies dealing with creating actual FxA users in tests
2023-06-12 11:48:33 +02:00
Mathieu Pillard 3ef358c672
Switch to docker compose v2 (plugin) instead of v1 (docker-compose pip package) (#20755) 2023-05-26 14:05:21 +02:00
Mathieu Pillard 7730f6f3bb
Drop Django 3.2 tests (#20693) 2023-05-15 14:51:24 +02:00
Mathieu Pillard 5c0e7a3c88
Merge deployment and development Dockerfiles (#20480)
* Merge deployment and development Dockerfiles
* Stop using root to install dependencies
* Run make commands from os with --user olympia
2023-03-23 15:46:56 +01:00
Andreas Wagner df93e522e1
Specify platform docker images where necessary (#20366) 2023-02-20 19:44:55 +01:00
Mathieu Pillard 97ba20c9a2
Run CI/local envs with ES 7 and update client libs (#19441)
* Run CI/local envs with ES 7 and update client libs

Also drive-by update CI to have the right versions of MySQL/Redis

* Remove deprecated, no longer necessary send_get_body_as parameter

* Fix deprecation warnings

* Update tests

* Unused import

* More deprecation fixes
2022-07-11 11:35:18 +02:00
Mathieu Pillard 4b97ad368c
Elasticsearch 7.x compatibility & cleanups (#19126)
* Elasticsearch 7.x compatibility & cleanups

* Fix double import

* Bump versions

* Add position back
2022-04-21 15:28:32 +02:00
William Durand c2c1be15ae
Update redis docker image (#19001)
This is needed to run addons-server with Apple silicons.
2022-03-22 14:09:57 +01:00
Mathieu Pillard 0047612d29
Serve xpis through addons server (#18978)
* Import addons-nginx into addons-server

* Serve xpis through X-Accel-Redirect instead of redirecting to dedicated domain

The so called "CDN URLs" for files are less useful now that even AMO main domain
is behind a CDN, and we want to move away from it because internally it exposes
paths on EFS that nginx is serving directly, making directory structure changes
difficult.

This commit focuses on the download_file/download_latest endpoints
addons-server exposes, and leaves the old dedicated CDN domain intact for the
moment - it is still used by the update service but will go away in a future
commit.

* Few fixes and test updates

* filename is an optional argument

* Test fixes

* Add assertions about caching

* Fix latest url

* Rename type_ to download_type

* reformat url definition
2022-03-16 15:19:47 +01:00
Andrew Williamson 4b4b8b2407
default local dev to django3.2; deploy to addons-dev with 3.2 (#17452) 2021-07-08 10:31:48 +01:00
Andrew Williamson c535369fc6
serve sitemap files via HttpResponseXSendFile instead (#17114) 2021-05-18 09:23:29 +01:00
Mathieu Pillard 12f5e3d36a
Upgrade rabbitmq for local development (#16739) 2021-03-15 12:07:12 +01:00
William Durand 1b72db9fa6
Fix docker-compose config for addons-frontend (#16281) 2021-01-08 15:18:12 +01:00
William Durand 2a3ce33286
Migrate to Circle CI (#16189) 2020-12-18 12:13:48 +01:00
Mathieu Pillard 7054d9f9c8
Upgrade Travis and local envs to MySQL 8.0.x, fixing broken tests (#15911)
* Upgrade Travis and local envs to MySQL 8.0.x, fixing broken tests

* Avoid hardcoding the filename twice when downloading mysql/elasticsearch
2020-11-05 13:03:59 +01:00
Mathieu Pillard ec0d8f9293
Upgrade to Elasticsearch 6.x (#14206)
* Upgrade to Elasticsearch 6.x

Because ES 6.x removed mapping types, move update_count and download_count in
separate ES indexes. This requires a full reindex, including stats, but we need
to create an entirely new cluster anyway.

ES 5.x compatibility is kept for now.
2020-05-28 20:47:07 +02:00
mirefly ac89818085 Fix the startup order of nginx and frontend containers 2020-03-28 10:42:41 -06:00
mirefly 0ccf9c98fa
Hide disabled files when delete an add-on (#13531)
Hide disabled files when delete addon
2020-02-21 14:06:27 +01:00
dbxnr 0c845636a9 Remove code for ui tests 2020-01-13 23:15:17 +00:00
Christopher Grebs b9ac5f4413
Run dockerfile commands with correct user. (#12579)
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
2019-10-22 11:24:05 +02:00
Christopher Grebs dcc103af6e
Fix uwsgi autoreload (#12316)
* Move CI envvar definition to selenium override config.

This should fix autoreload.

* Actually use  to be more explicit

* Disable integration tests

* Try out different approach

* Add docs, move back the variable definition to docker-compose.yml

* Update comment
2019-09-12 14:05:33 +02:00
Benjamin Forehand Jr 0e3725f031
Add additional docker compose 'ups' (#12058)
* Add additional docker compose 'ups'

* Trying to disable autoreload.

* Try disabling autoreload via env variable.

* Added docker compose changes.

* Change image name.
2019-08-08 11:57:45 -05:00
Christopher Grebs 5423c6476c
Sign add-ons with recommendation signer based on DiscoveryItem. (#11627)
* Sign add-ons with recommendation signer based on DiscoveryItem.

This also prepares for the possibility that we may have to use different
credentials for the recommendations signer. In case we don't, ops only
has to set the creds twice which seems fair.

Fixes #11062

* Unify travis and docker-compose configs, test separate signer hawk creds

* Add end-to-end test for reviewer tools signing

* Enable autograph for reviewers-and-zadmin
2019-06-12 15:01:36 +02:00
Christopher Grebs a4a9e699a2
Sign recommended add-ons with specific autograph signer (#11587)
Fixes #11062

* Upgrade autograph to 3.3.2
* Configure a new signer for recommended add-ons
* Sign recommended add-ons
* Adapt to recent specs
2019-06-06 12:37:30 +02:00
Christopher Grebs 59bb810842
Update to autograph 3.2.0
Fixes #11414
2019-05-14 09:28:49 +02:00
Andrew Williamson 6aebb99b1f
remove support for django1.11 and python2 (#11195) 2019-04-15 15:17:10 +01:00
Benjamin Forehand Jr 901ad6a5f8
Update docker-compose file to use latest addons-frontend image. Added new homepage test. (#11050) 2019-04-01 10:12:28 -04:00
Andrew Williamson ec4ac13ad7
deploy django22 on -dev & defaul on local dev (#11025) 2019-03-27 11:37:52 +00:00
Mathieu Pillard 19e782a96d Stop building Python 2 images 2019-03-25 11:55:09 +01:00
Benjamin Forehand Jr 2d99d6f3da
Fix ui tests for new nginx config (#10888)
* Fixes for Ui-tests using new nginx config.
2019-03-11 19:20:06 -04:00
Christopher Grebs 7b34c1b7d1
Fix addons-frontend running as default frontend. (#10692)
The frontend runs quite nicely with the changes from addons-nginx container but the initial page load runs into some wacky connection errors.

https://www.irccloud.com/pastebin/gTMteTUf/

This change fixes this.

Fixes https://github.com/mozilla/addons-server/issues/10855
2019-03-05 13:23:56 +01:00
Andrew Williamson 6fdf5bb9bf switch local dev to python3 2019-02-08 21:54:35 +08:00
Christopher Grebs f26a150086
Remove amo-validator, remove support for uploading legacy-addons. (#10553)
* Remove amo-validator, remove more support for uploading legacy-addons.

This is dropping most of our compatibility checks for legacy add-ons and
completely blocks them from being uploaded.

We workaround this block for mozilla-signed add-ons by issuing the same
error, just as a warning instead of an actual error.

This affected *loads* of our tests so the PR contains more test-changes
then I'd like.

In addition to that this PR adds file extension validation for uploads,
we only did that in our JavaScript and never in our code. So from now
on, we have a hard limit to only allow whatever is in
`VALID_EXTENSIONS`.

Further...

* drop amo-validator and related dependencies
* remove `dump_apps` management command
* removed unused fixture files from the repo

Fixes #10502

Future improvement idea for our test-suite: Unify add-on file fixtures
under one single folder to avoid any duplication.

There is most certainly some more improvements that could be made to
code and test structure but I went for the least changes, it's way too
huge already :-/

* Fix syntax error in JavaScript, thus ui tests

* Switch back to passing 'channel' around

* Move valid addon file extensions to constants/base

* Fix validate() call

* Fix more tests

* Update src/olympia/devhub/tests/test_views_validation.py

Co-Authored-By: EnTeQuAk <cg@webshox.org>

* Remove old comment

* Issue description specific only to Thunderbird and Seamonkey if targeting thunderbird or seamonkey
2019-02-01 08:52:04 +01:00
Mathieu Pillard 9214d8c782 Use latest-py3 tag in docker-compose instead of a separate image name 2019-01-23 12:33:12 +01:00
Mathieu Pillard 04f8ebe038 Use separate Dockerfile for Python 3, built from python3.6 base image
Can't use Python 3.7 yet because of issues with celery.
2019-01-22 12:40:40 +01:00
Mathieu Pillard 3181fd0794 Create a separate web3 container, a Python 3 variant of the web container
This doesn't run services yet, and is just useful to run tests. Because
it shares the same image as the regular web container, an initial
make update_deps is necessary to get it working. After that, running
pytest as normal should function normally and be using Python 3.
2019-01-17 14:43:24 +01:00
Christopher Grebs 7f76448708
Upgrade autograph image to 2.7.0
Fixes #10357
2019-01-14 15:42:05 +01:00
Christopher Grebs 4a207aeed2
Split selenium based docker-config into tests/ui/docker-compose.selenium.yml (#10143)
Unfortunately, we'll have to duplicate the environment config but I added
a comment so that should be fine. It's very rarely being used anyway.

Fixes #9288
2018-12-03 17:40:00 +01:00
Christopher Grebs cf629f5ba0
Expose correct addons and user-media paths in docker container. (#9706)
Fixes #9705
2018-10-16 13:45:29 +02:00
Benjamin Forehand Jr fe0084b223
Attempt at serving new dir to user media for addon install test. (#9700) 2018-10-15 15:10:46 -04:00
Greg Guthe 3a44661ed3
bump autograph version to 2.3.0 for travis CI and docker compose 2018-08-30 07:48:35 -04:00
Benjamin Forehand Jr 80bbc69dfd
Added configuration to run multiple ui tests in parallel. (#9266)
* 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.
2018-08-28 14:48:35 -04:00
Christopher Grebs 6f3f687790
Unify database configuration, enable 'read committed' transaction level
Fixes #7158
2018-08-21 07:21:01 +02:00
Mathieu Pillard dec7cc87f6 Remove more traces of redis 2018-07-30 11:30:13 +02:00
Christopher Grebs 5585ddcf09
Disable more xpack features, add some documentation.
Fixes #8887
2018-07-26 16:32:19 +02:00
Benjamin Forehand Jr ab1fe7c170 Add ui login tests (#8076)
* Update tests for fxa login.

* Updates to docker compose file to allow localhost logins.

* Updated files.

* Updated readme and circle file.

* Fix typo.

* Removed debugging steps and updated readme and comments.

* April 26 Homepage update.
2018-04-23 08:02:15 +02:00
Benjamin Forehand Jr 9747bb84fe
Updated UI tests to use the new AMO frontend. (#7565)
* Uses addons-frontend docker image to create an instance of the new frontend.
* Add testing for both mobile and desktop resolutions.
2018-03-01 14:05:40 -08:00
Christopher Grebs 818ea06ace
Merge branch 'master' of github.com:mozilla/addons-server into 493-move-olympia-test 2018-02-08 16:43:14 +01:00
Christopher Grebs d52015d365
Default to 'and' operator for match queries. Remove slug search, prioritize exact matches more. (#7303)
* Default to 'and' operator for match queries. Remove slug search, prioritize exact matches more.

References many "component: search" issues. What I tested with a
database of all public add-ons:

Example searches:

tab center redux - should find "Tab Center Redux" while "Tab Mix Plus" is probably second and "Redux DevTools" 4th or so
Open Image in New Tab -> should find "Open Image in New Tab" while "Open Bookmarks in New Tab" should be 2nd or 3rd
CoinHive -> Finds "Coinhive Blocker", "CoinBlock" (prefix search) and "NoMiners" (description)
Privacy -> Finds "Privacy Badger", "Privacy Pass", "Privacy Settings", "Google Privacy" (probably 4th or so) and "Blur" (summary + description + many users). Scores "Ghostery" on the first page but ranks it in the middle
firebu -> Finds "Firebug", "Firebug Autocompleter", "Firefinder for Firebug"
fireb -> Scores "Fire Drag" first, puts "Firebug" approximately 3rd or so
Menu Wizzard -> Finds "Menu Wizard" (fuzzy, typo) first, then "Add-ons Manager Context Menu" apparently because it matches good in the title and has many users
Frame Demolition -> Finds "Frame Demolition"
Demolition -> Finds only "Frame Demolition", same for "Demolation" (typo)
reStyle -> Finds "reStyle" and scores a few add-ons that match on "restore" next since the term is similar
MegaUpload DownloadHelper -> finds "MegaUpload DownloadHelper" first, scores "Video DownloadHelper" and "RadpidShare DownloadHelper" next. Doesn't find "Popup Blocker" anymore as currently happening on -prod
MegaUpload -> only finds "MegaUpload DownloadHelper" and nothing else
No Flash -> Scores "No Flash" first, then depending on users "Download Flash and Video", "YouTube Flash Video Player" and "YouTube Flash Player" (not necessarily in that order)
Disable Hello, Pocket & Reader+ -> finds "Disable Hello, Pocket & Reader+" first (yeay!), then scores "Reader", "Disable WebRTC" and "In My Pocket" next similarly to what's happening on -prod currently

Not working yet:

privacybadger -> "Privacy Badger" -> will probably need some kind of ngram filtering and analyzing (#591)
eyes -> 'decentraleyes' -> Not sure this should actually work, will probably need some more analyzing too (#591)

Not sure if it's specifically only because of these changes but #3248 is fixed.

This potentially fixes #7244, #6891, #6837, #6417, mozilla/addons#359.

Not sure if this fixes #mozilla/addons#567 but the results look much more promising and the amount of results doesn't explode here. I only have 2.8k add-ons for testing though so I'm not too sure.

And might be relevant to #6137.

This is a big step towards #2661, I doubt we can call this fixed though.

* Fix name tests

* Speed up ES tests, make scoring results more predictable by using only one shard and one replica

* Add tests

* Only test on new apiv3 based search.

* Fixup 'get_results'

* Remove debug print

* Isort imports

* Fix test settings, I'm blind.

* Adapt number of shards to what we define in settings_test

* Test search for grapple

* Remove property filtering in legacy api search, fix tests, fix flake8

* Add comment explaining shard config

* Fix tests again, add default platform, fix total counts again.

* Try to do some fixture cleanup, let's see...

* More test refactoring, make use of dfs-query-then-fetch during tests, allow us to test this later too via a waffle flag.

* Don't use waffle flag for legacy search, only for apiv3 searches.

* Fix unused import, fix usage of 'params'

* Use query-then-fetch in a regular addons-view tool, fix a few more tests to be able to handle the waffle-flag

* Create the dfs query then fetch flag only in ESTestCase, delete it properly. More serializer fixes

* precache the waffle flag for autocomplete tests too

* Minor cleanups

* Add docs, fix code style

* Add a todo

* Fix codestyle
2018-01-30 06:26:30 +01:00
Christopher Grebs 17bb6968e5
First part moving to olympia.test 2018-01-26 07:11:48 +01:00