Developer pages calls MakePremiumPerAccess twice

RESOLVED FIXED in 2013-09-17

Status

Marketplace
Payments/Refunds
P4
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Andy McKay, Assigned: davidbgk)

Tracking

2013-09-17
x86
Mac OS X
Points:
---

Details

(Reporter)

Description

5 years ago
Looks like if you update an app in the developer pages, we call the MakePremiumPerAccess and UpdateRating method twice.

Jul  3 13:49:47 localhost6.localdomain: [] s.bango:INFO Bango client call: MakePremiumPerAccess from wsdl: exporter :/data/www/payments-dev.allizom.org/solitude/lib/bango/client.py:88
Jul  3 13:49:47 localhost6.localdomain: [] s.proxy:INFO Calling service: bango at https://webservices.test.bango.org/mozillaexporter/service.asmx :/data/www/payments-proxy-dev.allizom.org/solitude/lib/proxy/views.py:53
Jul  3 13:49:50 localhost6.localdomain: [] s.bango:INFO Bango client call: UpdateRating from wsdl: exporter :/data/www/payments-dev.allizom.org/solitude/lib/bango/client.py:88
Jul  3 13:49:51 localhost6.localdomain: [] s.proxy:INFO Calling service: bango at https://webservices.test.bango.org/mozillaexporter/service.asmx :/data/www/payments-proxy-dev.allizom.org/solitude/lib/proxy/views.py:53
Jul  3 13:49:52 localhost6.localdomain: [] s.bango:INFO Bango client call: UpdateRating from wsdl: exporter :/data/www/payments-dev.allizom.org/solitude/lib/bango/client.py:88
Jul  3 13:49:52 localhost6.localdomain: [] s.proxy:INFO Calling service: bango at https://webservices.test.bango.org/mozillaexporter/service.asmx :/data/www/payments-proxy-dev.allizom.org/solitude/lib/proxy/views.py:53
Jul  3 13:49:53 localhost6.localdomain: [] s.bango:INFO Bango client call: MakePremiumPerAccess from wsdl: exporter :/data/www/payments-dev.allizom.org/solitude/lib/bango/client.py:88
Jul  3 13:49:54 localhost6.localdomain: [] s.proxy:INFO Calling service: bango at https://webservices.test.bango.org/mozillaexporter/service.asmx :/data/www/payments-proxy-dev.allizom.org/solitude/lib/proxy/views.py:53
Jul  3 13:49:55 localhost6.localdomain: [] s.bango:INFO Bango client call: UpdateRating from wsdl: exporter :/data/www/payments-dev.allizom.org/solitude/lib/bango/client.py:88
Jul  3 13:49:55 localhost6.localdomain: [] s.proxy:INFO Calling service: bango at https://webservices.test.bango.org/mozillaexporter/service.asmx :/data/www/payments-proxy-dev.allizom.org/solitude/lib/proxy/views.py:53
Jul  3 13:49:56 localhost6.localdomain: [] s.bango:INFO Bango client call: UpdateRating from wsdl: exporter :/data/www/payments-dev.allizom.org/solitude/lib/bango/client.py:88
Jul  3 13:49:56 localhost6.localdomain: [] s.proxy:INFO Calling service: bango at https://webservices.test.bango.org/mozillaexporter/service.asmx :/data/www/payments-proxy-dev.allizom.org/solitude/lib/proxy/views.py:53
(Reporter)

Updated

5 years ago
Assignee: nobody → david
(Reporter)

Updated

5 years ago
Version: 1.5 → 1.3
(Reporter)

Updated

5 years ago
Target Milestone: --- → 2013-09-10
(Reporter)

Updated

5 years ago
Target Milestone: 2013-09-10 → 2013-09-17
(Assignee)

Comment 1

5 years ago
Andy, I'm not sure it's a bug given that:

* the duplication of the call to UpdateRating is related to https://bugzilla.mozilla.org/show_bug.cgi?id=836865
* the repeated call to the sequence MakePremiumPerAccess/UpdateRating/UpdateRating correspond to the retrieval of the resource + update of the resource price

We can change the update_price method to be a classmethod but that breaks the retrieve then update process that we used to have with ORMs.
(Reporter)

Comment 2

5 years ago
(In reply to David Larlet [:davidbgk] from comment #1)
> * the repeated call to the sequence
> MakePremiumPerAccess/UpdateRating/UpdateRating correspond to the retrieval
> of the resource + update of the resource price

Its this one. MakePremiumPerAccess/UpdateRating/UpdateRating should only be called once if possible

> We can change the update_price method to be a classmethod but that breaks the retrieve then update 
> process that we used to have with ORMs.

Sorry not sure on this point, its calling on the retrieve and the update?
(Assignee)

Comment 3

5 years ago
> Sorry not sure on this point, its calling on the retrieve and the update?

https://github.com/mozilla/zamboni/blob/master/mkt/developers/views_payments.py#L109

There is a get here, leading to setup_bango then _create_bango then _push_bango_premium
Right after, there is an update_price which calls _push_bango_premium too
(Reporter)

Comment 4

5 years ago
(In reply to David Larlet [:davidbgk] from comment #3)
> > Sorry not sure on this point, its calling on the retrieve and the update?
> 
> https://github.com/mozilla/zamboni/blob/master/mkt/developers/views_payments.
> py#L109
> 
> There is a get here, leading to setup_bango then _create_bango then
> _push_bango_premium
> Right after, there is an update_price which calls _push_bango_premium too

Right, so lets avoid doing that.
(Assignee)

Comment 6

5 years ago
https://github.com/mozilla/zamboni/commit/9eb63d4a979ce91ced99e03bac108ba46605603a
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.