TestEngineering/UI/AMO/Tips and Pointers

From MozillaWiki
< TestEngineering‎ | UI
Revision as of 04:05, 5 January 2010 by Stephend (talk | contribs)
Jump to navigation Jump to search

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 bug 487503

Testing

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

Buttons

AMO 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)

  • Used for the API -- spec here
    • In Firefox's "Get Add-ons" tab (Tools->Add-ons->Get Add-ons). This can be configured using about:config by changing
 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.*
    • For external sites, both 3rd party and sites like addons.mozilla.jp
    • Should only output XML. Evar.
  • 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.