In case a developer is using Docker Desktop for Windows then
the containers don't prepare /etc/hosts file. Additionally,
elasticsearch faces OOM errors so added a Gotcha for this.
* Expose file.id in compare endpoint.
Fixes#13650
* Actually, expose the file id, not the version id.
* Rename to base_file_id, fix a few other doc typos
* Small refactor, use a nested serializer to render an actual object for base_file
* Fix naming
* Add information about whether a file is minified to the reviewers API.
Fixes#13589
* Add documentation
* experiment, don't delete all validation objects
* Fix how we're fetching the FileValidation, use parent.current_file.pk
* Increase num queries check for now
* Avoid that extra query
* Add methods to the Addon model to deal with DeniedGuid
* Update reviewers.js with new button IDs
* Add new reviewer API endpoints
* Add new buttons to allow/deny resubmission
The `Addon.is_guid_denied()` method is now a prop.
* linting fixes
* move new buttons to the right
* resubmission buttons are red now
* Only calculate sha256 hash of currently selected file.
This will calculate the hash only for the currently selected file which
will reduce the delay of the initial request significantly because we
won't have to calculate sha256 hashes for hundreds of files.
The additional calculation time when selecting a file should be fairly
low because we already have the content in memory and the code-manager
does prefetch some usual usage patterns which will ensure most of the
data is already rendered.
Fixes#12920
* Update docs
* Fix flake8
* Fix typo
Refactor unlisted submission to go through auto-approval workflow
Because unlisted versions can be submitted when the add-on is
disabled, this forces us to consider them as candidates for
auto_approve, but reject them later during processing.
Upgrade Celery to 4.3.0
This PR upgrades to Celery 4.3, introduces a small hack because of a regression in celery.
This PR does not introduce any helpers to make use of celery workers inside the tests, we delayed that to a later point to unblock the upgrade.
This PR does fix some inconsistencies with elasticsearch mocks along the way as they were making some tests fail (see comment logs), the mocks are now applied and rolled back much less than before which makes them easier to reason about and to debug.
Notes:
* acks_late now doesn't acknowledge in case of failures or timeouts (which is the case for index_addons). We could use task_acks_on_failure_or_timeout but I figured the new behavior should be fine.
* any CELERY_ALWAYS_EAGER setting in local_settings.py must be replaced by CELERY_TASK_ALWAYS_EAGER
commit log:
* Implement proper wait_for_tasks helper, make TestTaskQueued work with celery worker
* Revert changes removing threading code from es reindex tests
* Fix es reindex test, correct always eager usage.
* Small cleanups, fix docs, don't reload session worker.
* Ensure docker-compose celery result doesn't use the same database as any potential tests
* Monkeypatch for celery regression
* Actually use our own app where all tasks are already bound to. This also enables logging
* Experiment: Group celery worker tests together with elasticsearch and dont run them multitasked
* Remove envlist as it doesn't add anything to our specific setup
* Fix es-and-celery marker selection
* Remove completely redundant tests
* Fix hanging tasks, let's see what travis thinks... I'll follow up with cleanups and much more docs once tests are actually succeeding
* Define celery.ping in amo.celery, use redis result backend
* Cleanup celery worker implementation a bit.
Mimic our usage of elasticsearch specific tests, this avoids various
necessary workarounds and environment cleanups because django handles
things like settings properly in the first place.
* Untangle es mocks a bit, raise error in case of not properly stopped patches.
* Re-implement state test by using celery manager to wait for results
* Explicitly re-reinitialize the workers event loop and dont reuse anything existing
* Remove celery worker thread specific code.
* Reset default celery result backend setting
* Correct canned_response description, document response values.
Also document possible null values.
Fixes#12263Fixes#12087
* Use a definition list instead of duplicated data.
* Add more information about nullable values.