Closed
Bug 823140
Opened 13 years ago
Closed 13 years ago
Stage caching or pinning isn't working as expected
Categories
(Marketplace Graveyard :: API, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: alexis+bugs, Assigned: andy+bugzilla)
References
Details
(Whiteboard: p=2)
I'm using the API to submit a new application there.
I'm doing this following the different steps that are documented on the API page, so:
1. validate the manifest url
2. create the app from the manifest, once validated
3. Add screenshots to it
4. Update the app with missing information
5. Change the status of the app to "pending", to put it in the review queue.
When doing 5. I get a 400, telling me that it's missing the support email:
{"error_message": {"status": ["You must provide a support email."]}}
Here is how I do so, with some code. This is using the marketplace.python code, available on PyPI or here: https://github.com/mozilla/Marketplace.Python
client = get_client('developer@mozilla.com')
url = self.get_manifest_url()
res1 = client.validate_manifest(url)
manifest_id = res1.json()['id']
res2 = client.create(manifest_id)
app_id = res2.json()['id']
client.create_screenshot(app_id, '/some/path/toscreenshot')
app = res2.json()
app.update(
support_email='alexis@notmyidea.org',
device_types=['mobile', 'desktop'],
categories=[, ],
privacy_policy='True',
)
client.update(app_id, app)
client.app_state(app_id, status='pending')
get_client is as follows:
salt = 'XXX' # Ask me the pass on irc if needed.
key = hashlib.md5(salt + email + 'key').hexdigest()
secret = hashlib.md5(salt + email + 'secret').hexdigest()
return marketplace.Client(
domain='marketplace.allizom.org',
protocol='https',
port='443',
consumer_key=key,
consumer_secret=secret)
| Reporter | ||
Updated•13 years ago
|
Assignee: nobody → amckay
| Assignee | ||
Comment 1•13 years ago
|
||
Works on -dev and locally. But raises the same error on stage. I'm going to say this isn't a code issue per se and something odd going on with stage. Exactly what that be, I don't know without further digging.
Comment 2•13 years ago
|
||
CCing jason and oremj if they have any ideas. Otherwise -> andym to dig, but if you need access or help with stage please don't hesitate to ask.
Target Milestone: --- → 2013-01-10
Updated•13 years ago
|
Assignee: amckay → jthomas
Comment 3•13 years ago
|
||
I looked to see if there was any configuration difference between dev and stage in puppet/settings but didn't see anything apparent.
Assignee: jthomas → nobody
Updated•13 years ago
|
Assignee: nobody → amckay
| Assignee | ||
Comment 4•13 years ago
|
||
Is this still a problem, Alexis, I note that the API waffle flag is off on stage so you can't use the API at all, so I suspect things have changed.
Flags: needinfo?(alexis)
| Assignee | ||
Updated•13 years ago
|
Target Milestone: 2013-01-10 → ---
| Reporter | ||
Comment 5•13 years ago
|
||
I still have the same results here: I'm able to talk with the API, but it keep saying me that it doesn't work because I have to provide a support email, which I gave.
The message is exactly the same I put on my first comment. I can help you reproduce this if you need.
Flags: needinfo?(alexis)
| Assignee | ||
Updated•13 years ago
|
Target Milestone: --- → 2013-02-28
| Assignee | ||
Updated•13 years ago
|
Whiteboard: p=2
| Assignee | ||
Comment 6•13 years ago
|
||
I used the Marketplace.Python client and I've got past this. Can you regenerate the error and hopefully we can find a log of the error?
[master] example $ python main.py validate_manifest http://tmgxskcmuogq.test-manifest.herokuapp.com/manifest.webapp
https://marketplace.allizom.org:443/api/apps/validation/
Validation issued, id: 1ddea5223f4d41f0b777c71b3fc02a64
[master] example $ python main.py create 1ddea5223f4d41f0b777c71b3fc02a64
https://marketplace.allizom.org:443/api/apps/app/
id: 436285, slug:
[master] example $ python main.py status 436285
https://marketplace.allizom.org:443/api/apps/app/436285/
status: 0
privacy_policy: None
support_url: None
description: None
resource_uri: /api/apps/app/436285/
device_types: []
premium_type: free
summary: Test manifest
app_slug: test-app-tmgxskcmuogq
support_email: None
previews: []
homepage: None
id: 436285
categories: []
name: Test App (tmgxskcmuogq)
[master] example $ python main.py update 436285
https://marketplace.allizom.org:443/api/apps/app/436285/
Please provide data, hit Enter for no change
privacy_policy (None): asd
support_url (None): http://foo.com/
description (None): alsjdh
device_types ([]):
This parameter is required.
device_types ([]): desktop
summary (Test manifest): alsjdh
support_email (None): a@a.com
payment_type (free): free
homepage (None): http://boo.com/
categories ([]):
This parameter is required.
categories ([]): 153
name (Test App (tmgxskcmuogq)):
https://marketplace.allizom.org:443/api/apps/app/436285/
Your app has been updated
| Assignee | ||
Updated•13 years ago
|
Flags: needinfo?(alexis)
| Assignee | ||
Updated•13 years ago
|
Target Milestone: 2013-02-28 → ---
| Assignee | ||
Comment 7•13 years ago
|
||
So I think issue relates to caching, invalidation or db pinning. Note that these issues do not occur on -dev or prod, just stage.
Changes are being saved, but they aren't visible for about 5 minutes. When you do another post to the page, it looks like its got the wrong data in the cache and this is the reason. Hitting the site and using the devhub works fine, likely because that is pinned to master. I tried pinning the api to master but no help yet.
This also occurs with the developer/api > terms page. If you accept the terms and go back to the api, it still things the terms have not been accepted.
| Assignee | ||
Comment 8•13 years ago
|
||
So I think issue relates to caching, invalidation or db pinning. Note that these issues do not occur on -dev or prod, just stage.
Changes are being saved, but they aren't visible for about 5 minutes. When you do another post to the page, it looks like its got the wrong data in the cache and this is the reason. Hitting the site and using the devhub works fine, likely because that is pinned to master. I tried pinning the api to master but no help yet.
This also occurs with the developer/api > terms page. If you accept the terms and go back to the api, it still things the terms have not been accepted.
Summary: API for app submission isn't working → Stage caching or pinning isn't working as expected
| Assignee | ||
Comment 9•13 years ago
|
||
Jason fixed redis on stage, which was affecting invalidations.
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: needinfo?(alexis+bugs)
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•