[AMO] Local patch for AMO and SAMO

RESOLVED FIXED

Status

RESOLVED FIXED
9 years ago
5 years ago

People

(Reporter: clouserw, Assigned: oremj)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
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.
(Reporter)

Comment 1

9 years ago
and for some reason it didn't link the attachment...

https://bug534752.bugzilla.mozilla.org/attachment.cgi?id=417573
Created attachment 418062 [details] [diff] [review]
patch for bug 534752

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.

Comment 4

9 years ago
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.

Updated

9 years ago
Assignee: server-ops → jeremy.orem+bugs
(Assignee)

Comment 5

9 years ago
[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
Last Resolved: 9 years ago
Resolution: --- → FIXED
(Assignee)

Comment 6

9 years ago
SAMO has been updated as well.
Component: Server Operations: Web Operations → WebOps: Other
Product: mozilla.org → Infrastructure & Operations
You need to log in before you can comment on or make changes to this bug.