[Prod-only] Screenshot previews don't auto-appear/poll

VERIFIED FIXED in 5.12.9

Status

addons.mozilla.org Graveyard
Developer Pages
--
major
VERIFIED FIXED
7 years ago
2 years ago

People

(Reporter: stephend, Assigned: andym)

Tracking

unspecified
5.12.9

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

7 years ago
Created attachment 509656 [details]
Screenshot

For whatever reason, production only seems to poll a couple of times to check the status of the recently-uploaded screenshot, to generate the preview (after clicking Save).

See bug 628792 for background; it's the same bug, but since it works on preview, and was verified there, this is something else (assuming the code is there).

STR are the same as in bug 628792, but including again for posterity:

1. Log in to any of your test add-ons
2. Upload the following image, click Save
4. Wait for your screenshot to appear in the preview pane

If you have Admin access on prod, feel free to test using https://addons.mozilla.org/en-US/developers/addon/a9-9331/edit
I have seen this a couple times. The image is requested and I get a 403. Then I open the link in a separate tab and I get a 200.
(Reporter)

Comment 2

7 years ago
http://screencast.com/t/l2Uvuf7s7 - the double images are (hopefully due to) someone else testing alongside me.

FTR, preview also throws up the 403:

[17:39:08.765] POST https://addons.allizom.org/en-US/developers/addon/a9-9331/upload_preview [HTTP/1.1 200 OK 6874ms]


[17:39:17.417] POST https://addons.allizom.org/en-US/developers/addon/a9-9331/edit_media/edit [HTTP/1.1 200 OK 1428ms]
[17:39:18.859] GET https://addons-cdn.allizom.org/img/uploads/previews/thumbs/53/53030.png?modified=1296783553 [HTTP/1.1 403 Forbidden 178ms]
[17:39:18.930] GET https://addons.allizom.org/en-US/developers/ajax/addon/a9-9331/image/status?_=1296783558834 [HTTP/1.1 200 OK 203ms]
I read this whole thing and watched the screencast, but I don't know what the problem is (in the screencast, it looks like you left the page before it finished ajax loading?).  Can you post the actual results/expected results?
(Assignee)

Comment 4

7 years ago
We were wondering in IRC if the timing for the python polling and the actual image being on the CDN were slightly off. I've altered the JS to have two seperate polls now, one for icon and one for preview.
Everything is hitting the same NFS mount (in fact, the CDN might even be a vhost alias).  Sounds like you're on it though, so -> andym
Assignee: nobody → amckay
(Reporter)

Comment 6

7 years ago
(In reply to comment #3)
> I read this whole thing and watched the screencast, but I don't know what the
> problem is (in the screencast, it looks like you left the page before it
> finished ajax loading?).  Can you post the actual results/expected results?

I left the page to demonstrate that the image is actually uploaded, but that isn't reflected in the preview/thumbnail.  The expected result is that, while remaining on the Edit page after uploading screenshots, the "AJAX-loading" image spins, the /image/status?=foo GET request keeps firing, and, once it's found the uploaded image, automatically replaces the AJAX-loading image with the thumbnail preview.
(Assignee)

Comment 7

7 years ago
Not completely sure this will fix things to be honest, but makes the screenshot polling independent of the python icon polling. So that if the NFS/CDN/whatever are out of sync it shouldn't matter.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Reporter)

Comment 8

7 years ago
(In reply to comment #7)
> Not completely sure this will fix things to be honest, but makes the screenshot
> polling independent of the python icon polling. So that if the NFS/CDN/whatever
> are out of sync it shouldn't matter.

By "this," I'm assuming you mean https://github.com/jbalogh/zamboni/commit/0a142af48d28f23264bb725abc42dca3f2b4f7f7?
(Reporter)

Comment 9

7 years ago
Won't be able to test this in staging (since it's worked fine since the original fix).  I've regression-tested, and will keep doing so -- will verify in prod in 5.12.9.
Target Milestone: --- → 5.12.9
(Reporter)

Comment 10

7 years ago
Created attachment 511593 [details]
Post-fix screenshot

Thanks for the fix, Andy!
(Reporter)

Comment 11

7 years ago
Verified FIXED on https://addons.mozilla.org/en-US/developers/addon/a9-9331/edit.
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.