Closed Bug 535454 Opened 15 years ago Closed 15 years ago

[AMO] Local patch for AMO and SAMO

Categories

(Infrastructure & Operations Graveyard :: WebOps: Other, task)

All
Other
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: clouserw, Assigned: oremj)

Details

Attachments

(1 file)

We've fixed a bug with our beta channel code and ask that you apply attachment 417573 [details] [diff] [review] to production AMO and services.amo.  We're applying this off cycle because labs needs it for their weave release.
and for some reason it didn't link the attachment...

https://bug534752.bugzilla.mozilla.org/attachment.cgi?id=417573
This is a better patch that the one Wil listed; it includes a fix for a bug that would probably only manifest itself on preview, but a bug nonetheless.
BTW, the patch was qa'd on preview by stephend. It was committed after the original patch in r57921, detailed in bug 534752 comment 7.
Thanks a lot for the quick fix. 

When will this be pushed live? Weave Sync 1.0b3 was released last Friday, but our users are still not seeing it.
Assignee: server-ops → jeremy.orem+bugs
[root@mradm02 addons.mozilla.org-remora]# curl 'https://bug535454.bugzilla.mozilla.org/attachment.cgi?id=418062' | patch -p1 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1452  100  1452    0     0  35881      0 --:--:-- --:--:-- --:--:--     0
patching file site/app/webroot/services/update.php
Hunk #1 succeeded at 195 with fuzz 1.


[root@mradm02 addons.mozilla.org-remora]# svn diff site/

Index: site/app/webroot/services/update.php
===================================================================
--- site/app/webroot/services/update.php	(revision 57619)
+++ site/app/webroot/services/update.php	(working copy)
@@ -195,8 +195,20 @@
         
         if ($addon['status'] == STATUS_PUBLIC) {
             if ($want_beta) {
-                // Beta versions stay on the beta channel.
-                $where = 'WHERE files.status = '.STATUS_BETA;
+                $version_status = mysql_fetch_array(mysql_query("
+                    SELECT versions.id, status
+                    FROM files INNER JOIN versions
+                    ON files.version_id = versions.id
+                    WHERE versions.addon_id = {$addon['id']}
+                      AND versions.version = '{$sql['version']}'
+                    LIMIT 1"));
+
+                // Version numbers that look like betas should stay on the same
+                // channel as the version currently in use.  That way, beta
+                // versions stay on the beta channel, while public versions
+                // remain on the public channel.
+                $status = isset($version_status['status']) ? $version_status['status'] : STATUS_BETA;
+                $where = 'WHERE files.status = '.$status;
             } else {
                 // If public, we only pull public files
                 $where = 'WHERE files.status = '.STATUS_PUBLIC;
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
SAMO has been updated as well.
Component: Server Operations: Web Operations → WebOps: Other
Product: mozilla.org → Infrastructure & Operations
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: