The API response was incorrect for the /shelves/ endpoint. It mentions
headline instead of title and cta.text instead of footer.text. The
documentation needs to be updated to reflect the actual API response.
* Remove platform from API v5 and stop filtering on it in downloads
Also prepare the removal of the field on the model by making it
nullable and removing the index
* Update API docs
* Remove support for filtering by `platform` in the search/autocomplete API
Also add a migration to ensure all Files have platform=all set now that
versions no longer have multiple files in our database.
* Remove obsolete test
* drop AppSupport model
* in language-tools api, application param only mandatory for appversion, and ignored otherwise
* Delete 0029_delete_appsupport.py
* change api docs to make v5 the default
* change banners under /v4_frozen/ to say api is frozen and centralize version list
* Update v3 legacy banners too
* always returned urls wrapped in outgoing + originals
* document the slightly unusual data structure for the secondary hero shelves
* more codestyle fixes
* don't outgoingify the `_default` key in the dict.
* test fix
* Add ability to restrict add-on detail/version API and downloads in specific regions
* Document that we can return a 451 error in the API
* Pass a country code as the tests expect
* Add Link header to 451 responses
* drop heading, heading_text, description from discovery api
* bump the migration (and don't need to drop recommendable field now)
* turn off 'disco-heading-and-description-shim' in v4
* add sponsored shelf that uses Adzerk for placement
* cleanup of some commented out code
* log a broken json response as an adzerk fail too
* totally not just renaming the test class to work around an ES indexing bug
* change to use mixins instead of subclassing TestESAddonSerializerOutput
We need to keep both in sync because in manifests the distinction
doesn't exist, and validation is currently performed assuming
compatibility for both applications.
* Add internal API to create AppVersions
* Add missing test for 403
* Remove commented breakpoint call
* Add missing appversion in test_alpha_star_already_exists() test
* Remove views/code about info requests
Info requests are no longer possible, replaced with delayed rejections
(or simple reviewer reply with no deadline).
* Move migration
* Remove `request` from VersionForm, it's no longer needed
* Add new reviewer flag to disable auto-approval until the next manual approval
This will be used by delayed review rejections to "pause" listed auto-approvals
for an add-on until the next version that fixes the issues noted by the reviewer
is approved.
* Bump migration
* Test for the field being False
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.