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

943 Коммитов

Автор SHA1 Сообщение Дата
Mathieu Pillard 7144f9620d
Support additional values in abuse report API addon_install_source (#17089)
* Support additional values in abuse report API addon_install_source

* Add migration for the new choices
2021-05-07 11:32:30 +02:00
Anish Krishnaswamy 6759994a63
Updated the API docs for homepage shelves endpoint (#17054)
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.
2021-05-05 13:17:24 +01:00
Lisa Chan 4e5dc5cdcb
RE: Add addon_type property to shelf module, remove search-themes shelf endpoint type (#16967)
* Remove search-themes endpoint choice, added addon_type field

* Updated test_admin.py

* Updated doc, models, forms (and test), test_serializers, test_admin, migration file

* Fixed lint issues

* Updated serializer to reflect addon_type choice name instead of integer

* Fixed lint issues

* Updated addon_type from int in test_admin
2021-04-21 17:30:41 +01:00
Mathieu Pillard 45e80b4a40
Remove platform from API v5 and stop filtering on it in downloads (#16741)
* 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
2021-03-16 12:27:22 +01:00
Andrew Williamson de949bc4cd
replace footer_text and footer_pathname in shelf response with cta style (#16640) 2021-03-01 10:56:30 +00:00
Andrew Williamson 002a6259b4
translatable homepage shelves (#16579) 2021-02-23 19:48:31 +01:00
Mathieu Pillard 11f4549f2b
Remove support for filtering by `platform` in the search/autocomplete API (#16611)
* 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
2021-02-23 19:10:58 +01:00
Andrew Williamson 3b887c1291
return the hero shelves with full localised fields (#16531)
* return the hero shelves with full localised fields

* refactor where we revert to another property in a serializer to FallbackField
2021-02-16 11:36:59 +00:00
William Durand 72d5bbaba2
Add `versions_url` to add-on API response (#16535)
* Add versions_url to add-on API response

* Update docs
2021-02-15 13:37:13 +01:00
Andrew Williamson dd050597d3
return grouped ratings with addon detail api (#16468) 2021-02-08 15:12:50 +00:00
Andrew Williamson afbbe5de1d
change discovery api l10n fields to have a consistent default (#16447)
* take the current locale into account during l10n for discovery api

* take the addons default_locale into account for discovery api
2021-02-04 13:31:21 +00:00
Andrew Williamson 3b5810722f
rm stripe/payment stuff (#16454)
* rm stripe/payment stuff

* rm some more unused constants

* revert the less auto-reformatting
2021-02-03 14:03:33 +00:00
Andrew Williamson 8af5b29db4
drop sponsored shelf and adzerk integration (#16396) 2021-01-26 14:54:28 +00:00
Andrew Williamson a986181308
return consistent l10n response for gettext-backed localized fields (#16363) 2021-01-26 12:57:57 +00:00
Andrew Williamson 64a8bad0b2
drop pagination from shelves api (#16370)
* drop pagination from shelves api

* double check the pagination properties aren't in the full shelf response
2021-01-22 14:55:51 +00:00
Andrew Williamson de374c4ceb
drop AppSupport model (#16326)
* drop AppSupport model

* in language-tools api, application param only mandatory for appversion, and ignored otherwise

* Delete 0029_delete_appsupport.py
2021-01-19 16:07:59 +00:00
Andrew Williamson 98c2fcebd7
flatten collection response in shelves api to just return the addons (#16329) 2021-01-18 14:47:14 +00:00
Andrew Williamson 3508abc995
differentiate search shelves for themes (#16327)
* differentiate search shelves for themes

* post rebase fix
2021-01-15 15:42:11 +00:00
Andrew Williamson 8808d2d670
Include hero shelves in /shelves/ response (#16317)
* Include hero shelves in /shelves/ response

* add test for both hero and defined shelves in a single response
2021-01-14 17:40:29 +00:00
Andrew Williamson 23db886b0d
change api docs to make v5 the default (#16303)
* 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
2021-01-12 16:20:18 +00:00
Andrew Williamson 9280e68135
always returned urls wrapped in outgoing + originals (#16125)
* 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
2021-01-07 11:20:39 +00:00
Lisa Chan 19c1524fe8
RE: Add API documentation for homepage shelves (#16087)
* Added homepage shelves to API docs

* Updated API doc based on feedback
2021-01-05 15:26:36 +00:00
Andrew Williamson 860cd8cc4b
return default and requested locale in dict responses in v5+ api (#16103) 2020-12-04 14:28:57 +00:00
Mathieu Pillard 6b7caa4632
Add ability to restrict add-on detail/version API and downloads in specific regions (#15965)
* 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
2020-11-12 14:18:26 +01:00
William Durand bdbfe71115
Add basic code to receive Stripe events (webhook) (#15901) 2020-11-04 15:22:30 +01:00
Andrew Williamson b222dfa200
drop heading, heading_text, description from discovery api (#15856)
* 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
2020-10-29 13:47:36 +00:00
Andreas Wagner e159570f1d
Update permissions in docs (#15796) 2020-10-26 13:07:29 +01:00
Andrew Williamson 1c552143c0
Add conversion tracking to Adzerk; refactor click into generic events (#15768)
* Add conversion tracking to Adzerk; refactor click into generic events

* rename events to event_data
2020-10-19 18:19:06 +01:00
Andrew Williamson 12fe18219f
exposed promoted in primary hero api addon object (#15764) 2020-10-19 11:33:21 +01:00
Andrew Williamson 6ffba9a355
implement click proxy for adzerk (#15704)
* implement click proxy for adzerk

* docs update
2020-10-13 18:47:11 +01:00
William Durand d326c652d4
Add-on summary/description might contain HTML tags (#15713) 2020-10-13 15:53:19 +02:00
Andrew Williamson dfcde84625
implement impression api endpoint for sponsored shelf (#15687)
* implement impression api endpoint for sponsored shelf

* update docs for impression endpoint
2020-10-12 11:11:29 +01:00
Andrew Williamson 92f3acc5da
add sponsored shelf that uses Adzerk for placement (#15670)
* 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
2020-10-08 12:54:29 +01:00
Andreas Wagner d131f3c78d
Add option to subscribe to unlisted submissions (#15606) 2020-10-06 11:49:24 +02:00
Mathieu Pillard 28d9862a5f
Always create appversions for both Firefox and Firefox for Android (#15644)
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.
2020-10-06 11:14:50 +02:00
William Durand cd17f03ac1
Remove documentation about download sources (#15512) 2020-09-17 11:26:29 +02:00
Andrew Williamson a06f104cbf
add ?promoted=badged search filter (#15478) 2020-09-14 17:39:13 +01:00
Andrew Williamson 6630f2fdcf
drop recommended=true filter from addons api (#15470)
* drop recommended=true filter from addons api

* docs fix
2020-09-11 18:06:56 +01:00
Andrew Williamson 5648e2f8ed
allow random addon sort to be used with promoted filter (#15469) 2020-09-11 10:57:22 +01:00
Andrew Williamson e2f6c622c8
Extend ?promoted= addon api filter to support multiple groups (#15448)
* Extend ?promoted= addon api filter to support multiple groups

* review nits
2020-09-11 09:23:08 +01:00
Andrew Williamson 0e04571c66
drop is_recommended from api addon detail (#15436) 2020-09-10 17:21:25 +01:00
Mathieu Pillard 6d489031b7
Remove unstability disclaimer from applications API documentation (#15430) 2020-09-07 16:39:15 +02:00
Andrew Williamson b1fa006974
promoted addon search api filter (#15324)
* promoted addon search api filter

* test all the groups; limit param values to enabled groups
2020-08-18 17:39:01 +01:00
Bob Silverberg 190a903de6
Update API code to return data about promoted add-ons (#15222) 2020-08-11 12:01:22 -04:00
Mathieu Pillard 33150ea181
Change appversions API to only be available through external auth (#15217)
* Change appversions API to only be available through external auth

* Fix flake8
2020-08-06 17:55:49 +02:00
Mathieu Pillard 4ae3c35417
Add internal API to create AppVersions (#15198)
* 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
2020-08-06 15:20:23 +02:00
Mathieu Pillard 66348f6b01
Remove views/code about info requests (#15168)
* 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
2020-08-05 14:29:34 +02:00
Andrew Williamson 00e0b4c1ae
update addons docs to mention that type search filter supports multiple values (#15114) 2020-07-30 12:34:16 +01:00
Bob Silverberg 901bbd41b1
Expose optional permissions in the Addon API (#15047) 2020-07-27 11:43:10 -04:00
Andrew Williamson ac50305b57
drop Block.include_in_legacy and derive legacy state from legacy_id (#15043) 2020-07-27 10:47:51 +01:00
Andrew Williamson 2a842fa808
reimplement description in PrimaryHeroShelf object (#14964)
* reimplement description in PrimaryHeroShelf object

* add ?raw param to primary endpoint to output l10nizable strings
2020-07-20 13:03:21 +01:00
William Durand b84b8f9892
Expose model_version in scanners API response (#14970) 2020-07-16 17:57:37 +02:00
Mathieu Pillard 2f710df2eb
Add new reviewer flag to disable auto-approval until the next manual approval (#14911)
* 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
2020-07-15 16:06:25 +02:00
William Durand 385fef4f94
Add created field in ScannerResultSerializer (#14877) 2020-07-07 18:38:14 +02:00
William Durand 3bca5ac25f
Update scanners API docs (#14776) 2020-06-30 10:57:12 +02:00
Andrew Williamson acaff670b2 extra blurb about deleting informatoin 2020-06-23 10:44:53 +01:00
Andrew Williamson b92e5e16aa update accounts delete API docs too 2020-06-23 09:50:09 +01:00
Bob Silverberg 3781ee0233
Remove `version` from retrieve and list draft_comments API responses (#14361) 2020-05-29 07:41:16 -04:00
Mathieu Pillard 4619939d64
Merge pull request #14373 from diox/send-fxa-id-and-not-email-to-basket-user-sync
Send fxa_id, not email, in user basket sync
2020-05-25 13:45:44 +02:00
Mathieu Pillard 14881955c0 Send fxa_id, not email, in user basket sync
Salesforce already have FxA data so it's best not to send the email
as it would be duplicate info anyway. FxA is the source of truth for
emails.
2020-05-25 13:04:35 +02:00
Lisa Chan 9153487c23
RE: Update install doc regarding elasticsearch timed out error (#14357) 2020-05-21 15:44:05 -04:00
Bob Silverberg f441e0fc5a
Move the `entries` from the `file` object into the version object for Browse and Compare APIs (#14218) 2020-05-19 10:48:13 -04:00
Bob Silverberg 5f06ebe6b6
Update Browse and Compare API endpoints to allow for `file_only` (#14163) 2020-05-06 08:25:13 -04:00
Bob Silverberg fed8ca24a3
Remove unnecessary file properties from reviewers API responses (#14105) 2020-04-30 14:34:02 -04:00
Andrew Williamson 005da78a07
Merge pull request #14083 from eviljeff/14018-blocklist-docs
document AMOs blocklist implementation
2020-04-29 16:34:12 +01:00
Bob Silverberg bfd3b046af
Remove properties from entries, and do not require entries to calculate file-level properties (#14043) 2020-04-28 11:42:27 -04:00
William Durand e077b8bea7
Add filters to the scanners api endpoint (#14078) 2020-04-28 16:28:13 +02:00
Andrew Williamson c7a05188e2 spelling! 2020-04-28 14:29:21 +01:00
Andrew Williamson 5a3ceb74d4 document AMOs blocklist implementation 2020-04-28 14:17:52 +01:00
Bob Silverberg 44928e107c
Add sha256, mimetype and size to File information returned by reviewers APIs (#14031) 2020-04-23 10:09:36 -04:00
Shashwat S 51f193da06 Update install docs for Windows
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.
2020-04-12 19:26:40 +05:30
Andrew Williamson 1152b0784d
Expose add-on name in blocklist/block api (#13786)
* Expose add-on name in blocklist/block api

* add a generic test in api/tests/test_fields.py
2020-03-20 11:17:24 +00:00
Christopher Grebs 41f17af6ad
Expose file.id in compare endpoint. (#13740)
* 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
2020-03-17 19:58:23 +01:00
Andrew Williamson d54dc781dc
add blocklist/block api (#13737)
* add blocklist/block api

* refactor test_serializer.py
2020-03-17 09:23:21 +00:00
Christopher Grebs e3e846a086
Add information about whether a file is minified to the review… (#13661)
* 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
2020-03-16 14:50:40 +01:00
Mathieu Pillard 7f85510195
Remove unnecessary version properties from APIs used by code-manager (#13658)
* Remove unnecessary version properties from APIs used by code-manager

* Fix queries optimizations and expectations
2020-03-06 20:23:49 +01:00
Mathieu Pillard 9cc031333c Switch from IRC to Matrix 2020-02-21 11:02:29 +01:00
Mathieu Pillard 66a19078e5 Add addon_install_source_url parameter to abuse report API 2020-02-12 11:34:38 +01:00
William Durand b28864c20b
Add admin buttons to allow/deny resubmission in the reviewer tools (#13425)
* 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
2020-02-07 12:53:31 +01:00
William Durand ef03f216c8
Expose `label` in scanner results API endpoint (#13343) 2020-01-29 11:38:01 +01:00
William Durand 95d694b45f
Add a new API endpoint for ScannerResult(s) (#13335) 2020-01-24 15:14:43 +01:00
Christopher Grebs 6bd7ad9d50
Remove UI test code (#13245)
Remove UI test code
2020-01-16 06:06:54 +01:00
Christopher Grebs d98a9397d0
Only calculate sha256 hash of currently selected file. (#13237)
* 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
2020-01-14 17:16:09 +01:00
dbxnr fd9bc77c2f Remove references to selenium 2020-01-13 23:24:33 +00:00
mirefly f838f6f704 Fix pytest.org link in docs 2020-01-05 23:06:21 -07:00
Andrew Williamson 70a2c8e98a
rm featured in the v4 api/shim in v3 api (#12949) 2019-11-25 16:06:36 +00:00
Christopher Grebs e2e5423286
Improve documentation regarding filename and it's absolute val… (#12929)
* Improve documentation regarding filename and it's absolute value.

Fixes #12608

* Use 'full' instead of 'absolute'
2019-11-21 13:03:19 +01:00
Mathieu Pillard 9ddf2c0e14
Refactor unlisted submission to go through auto-approval workflow (#12658)
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.
2019-11-13 11:59:07 +01:00
junngo 2968b71a1f drop is-source-public field except for v3 api 2019-11-12 00:23:51 +09:00
Mathieu Pillard a877485c27 Add 'AMO' as a valid report entry point in abuse reports 2019-10-29 12:49:30 +01:00
Andrew Williamson f6dafeb47a
move /authenticate api endpoint to new versionless api; update clients (#12570) 2019-10-11 17:20:43 +01:00
yatinmaan b3dbab3523 Update docs 2019-10-06 00:16:54 +05:30
Andrew Williamson c4f0e8964e wrap secondaryhero urls in outgoing if wrap_outgoing_links specified 2019-09-26 11:15:31 +01:00
Andrew Williamson 9c40be32af
remove requirement that primary hero featured image should be set (#12414) 2019-09-24 16:55:20 +01:00
Christopher Grebs 0bd4815d37
Upgrade Celery to 4.3 (#12073)
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
2019-09-18 17:36:01 +02:00
Andrew Williamson 3f41adb7a2
expose site_status in UserProfileSerializer and /site/ (#12356) 2019-09-16 14:26:20 +01:00
Christopher Grebs af1f6b439b Re-use AddonBrowseVersionSerializer for DraftComment API.
Fixes #12275
2019-09-06 21:20:04 +02:00
Stuart Colville d219e84688
Move templates to .github dir (#12291)
* Move templates to .github dir

* Fix path
2019-09-06 15:01:11 +01:00
Christopher Grebs 09750c8517
Correct canned_response description, document response values. (#12278)
* Correct canned_response description, document response values.

Also document possible null values.

Fixes #12263
Fixes #12087

* Use a definition list instead of duplicated data.

* Add more information about nullable values.
2019-09-05 15:12:45 +02:00
Andrew Williamson 912dc79a9a
updated primary hero shelf api to return raw description with <blockquote> (#12254) 2019-09-02 16:28:18 +01:00