TestEngineering/UI/AMO/Tips and Pointers

AMO

Setup: staging and production

Production

Production push docs

  • AMO uses Zeus, which heavily caches content. You can tell you're getting a cached copy of the content by looking at the headers and seeing "Via: Moz-Cache-zlb??" where ?? is a number and not seeing no-cache headers. being logged in bypasses this cache completely
  • If you see some_string_define on AMO, it's either 1) a raw string define, or (more likely) 2) Apache needs to restart to pick up the gettext() changes.
  • AMO runs on a cluster of servers. To tell what server is showing you the current page look for the "X-AMO-ServedBy" header.
  • To view the revision of AMO you're currently seeing, view-source of any page; in the bottom, you'll see something like
    <!-- [http://viewvc.svn.mozilla.org/vc?revision=24322&view=revision r24322 -->

    This means you're at SVN revision number 24322 -- you can cross-link this to whatever revision number was posted in the checkin comment in the bug.

  • Pages won't validate due to some proprietary attributes we use (like "addonname") but it should be very close.
  • Database queries are cached in memcache for 60 minutes. This means if you change something that doesn't invalidate the cache it won't actually change for up to 60 minutes.
  • If you want a really fast check to see if basic infrastructure is working look at the services monitor. This is also one of the things nagios watches.

Cron Jobs

  • Personas are imported at :21 after the hour (both prod/preview)
  • Calculating weekly download, total download, collections, and review stats happens every 20 minutes
  • Calculating the compatibility report happens every 5 minutes
  • You can see exact times and all cron jobs in http://github.com/jbalogh/zamboni/tree/master/scripts/crontab/

Testing

List of add-on types

Public vs. sandbox status

  • If the latest version of a public add-on is in sandbox, then the previous public version of the add-on is listed in the add-on detail page.

Add-on Uploading

  • Add-ons need to have:
    • At least 1 category
    • A description...

before they can be complete; click on the "Complete Add-on" button to make them so

  • ...and now, they can be either in the "release" or "beta" channel

Status codes

  • To be valid, an add-on must have:
    • Valid files
      • Which gives a version "valid" status

Special Add-ons

  • EULA - Yahoo.com Toolbar
  • Privacy Policy - Yahoo.com Toolbar

Buttons

AMO buttons

  • Download the User Agent Switcher Add-on
  • Open your firefox browser and type about:config
  • Accept the terms and proceed
  • Create a new boolean preference called useragentswitcher.reset.onclose with the value false
  • Now add the user agents for Firefox Mobile, SeaMonkey and Thunderbird using the User Agent Switcher add-on
  • Proceed to test the buttons


https://versioncheck.amo/

  • Used by applications to see if their add-ons are up to date. Can be modified using about:config by changing
 extensions.update.url
  • Should only output XML. Ever.

https://services.addons.mozilla.org/ (also known as the AMO API)

 extensions.getAddons.recommended.url
 extensions.getAddons.search.url (replace "services" in each URL with "preview")
  • SAMO filters by OS and version-compatibility ranges
    • e.g. If you're using Firefox 3.0.8 on Windows, you should only see add-ons that are either for "ALL" or "Win", with compat range of something -> 3.0.*
  • You can test other locales in the API:
  • IMPORTANT: Gets tagged and shipped with AMO, usually, so be sure its changes have been vetted
    • Ask if it's been tagged along with the rest of the AMO changes, with each release

Staging

Found at: https://preview.addons.mozilla.org/

  • The site updates from SVN every 15 minutes automatically. It also reruns the clean and build scripts which make the compressed js files, etc.
  • The database is a very old copy from production AMO. It is only updated when requested through IT (talk to webdev first please).
    • -207 and -261 errors might sometimes abound; tread carefully. Usually, it's a staging-only file-mirror thing, but ya never know :-)
  • If you're feeling wild you can directly access the staging database to verify table structure or data.

Errors to ignore:

  • -261/-203 errors when trying to install an add-on *only* from https://preview.addons.mozilla.org -- the files aren't synced regularly from the file-mirror DB; if you see this on production, it's a bug and should be filed against IT (but wait half a day or so)

Featured add-ons

  • Rotated/added/deleted through the Admin tool->Feature Manager -- have expiration dates

Discovery Pane

Add-on SRC=? Attributes

| 1 | category | full | 2009-08-06 19:21:17 |
| 2 | search | full | 2009-08-06 19:21:17 |
| 3 | collection | full | 2009-08-06 19:21:17 |
| 4 | recommended | full | 2009-08-06 19:21:17 |
| 5 | homepagebrowse | full | 2009-08-06 19:21:17 |
| 6 | homepagepromo | full | 2009-08-06 19:21:17 |
| 7 | api | full | 2009-08-06 19:21:17 |
| 8 | sharingapi | full | 2009-08-06 19:21:17 |
| 9 | addondetail | full | 2009-08-06 19:21:17 |
| 10 | external- | prefix | 2009-08-06 19:21:17 |
| 11 | developers | full | 2009-11-12 17:18:47 |
| 12 | installservice | full | 2009-11-12 17:18:47 |
| 13 | fxcustomization | full | 2009-11-12 17:18:47 |
| 14 | oftenusedwith | full | 2010-02-02 20:05:27 |
| 15 | similarcollections | full | 2010-02-02 20:05:27 |
| 16 | userprofile | full | 2010-02-08 19:48:51 |
| 17 | userprofile | full | 2010-02-23 19:47:14 |
| 18 | email | full | 2010-02-23 19:47:14 |
| 19 | rockyourfirefox | full | 2010-02-23 19:47:14 |
| 20 | mostshared | full | 2010-03-23 19:09:26 |

Testing Search (weights/ordering)

https://wiki.mozilla.org/Update:Remora:Search