Status

Marketplace
API
P3
normal
RESOLVED WONTFIX
5 years ago
2 years ago

People

(Reporter: Andy McKay, Unassigned, Mentored)

Tracking

x86
Mac OS X
Points:
---

Details

(Whiteboard: [lang=py][marketplace-transition])

(Reporter)

Description

5 years ago
When you get an app from the API you get the regions. As a dict. The client then (rightfully so) put back all the data. The problem is that the region is being put back as a list. Something that the client doesn't understand.

It would be nicer if the regions were a list of URLs pointing to the region resources. Then when the PUT occurred, the client could just pass back the URLs of the regions they'd like to use.

This requires:

- changing the output of regions on the app resource
- changing the input of regions

For the moment since this broke things, I've commented it out.

https://github.com/mozilla/zamboni/commit/e8d58c
(Reporter)

Comment 1

5 years ago
And don't forget the search side of this. This make @robhudson all happy and not like you've just given him a pint of Coors Lite.
Priority: -- → P4
(Reporter)

Updated

5 years ago
Duplicate of this bug: 889692
(Reporter)

Comment 3

5 years ago
This would make krupa happier if we could fix this so in the API QA could turn regions on off for test apps en masse.
(Reporter)

Updated

5 years ago
Priority: P4 → P2
Assignee: nobody → wraithan
Assignee: wraithan → nobody

Updated

5 years ago
Depends on: 910623
The documentation on the regions parameter was removed in https://github.com/mozilla/zamboni/commit/98c1bb903bd03e85478f06429d87f7af7ece8d99#diff-5d3f3edc027f7584d97983db4d72a692L193, make sure it gets added back when this is fixed.

Updated

4 years ago
Assignee: nobody → mpillard
Because we need to handle special regions, payments, calculate difference between previous and new regions etc I believe the best approach would be to re-use mkt.developers.RegionForm, and possibly do that on a separate endpoint to make the implementation easier (we can always adapt later, but keeping it separate initially will make things much easier to test and avoid introducing new problems in the current API)

Something like a 'regions' @action on the AppViewSet should work.

Updated

4 years ago
Assignee: mpillard → nobody
Priority: P2 → P3
Whiteboard: [contribute]
Whiteboard: [contribute] → [good first bug]
Hi Andy/MP-Team, it looks like this might not be very much clear to the newbie how to fix this. Can you put some information here for newbies so that they can pick this bug and fix it.

Thanks,
Ram
Flags: needinfo?(amckay)
(Reporter)

Comment 7

3 years ago
I don't know if this is relevant any more, someone on the marketplace team might be able to help.
Flags: needinfo?(amckay)
This is still relevant.  The bug description is pretty good IMHO, and should be accessible to python developers, particularly if they are already familiar with Django. This requires changing the backend code (in the "zamboni" repository, where our API lives), the instructions to set it up are available over at http://marketplace.readthedocs.org/en/latest/topics/backend.html

It probably requires modifying the serializers in https://github.com/mozilla/zamboni/blob/master/mkt/webapps/serializers.py ; we use Django REST Framework, so this documentation should be useful: http://www.django-rest-framework.org/api-guide/serializers/
Whiteboard: [good first bug] → [good first bug][lang=py]
Mathieu, would you mentor this bug?
Flags: needinfo?(mpillard)
Yes, but do note the python/Django requirement. It's only a good first bug for contributors knowing Python, preferably Django as well.
Flags: needinfo?(mpillard)
Sure, it think this has become clear from comment 8. Nevertheless, someone who would be willing to answer specific questions helps people not knowing zamboni inside out a lot.

Thanks!
Mentor: mpillard
Whiteboard: [good first bug][lang=py] → [lang=py]

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
Whiteboard: [lang=py] → [lang=py][marketplace-transition]
You need to log in before you can comment on or make changes to this bug.