TestEngineering/UI/AMO/Tips and Pointers: Difference between revisions
(Created page with 'Coming soon!') |
StuartPhilp (talk | contribs) m (StuartPhilp moved page TestEngineering/Web/AMO/Tips and Pointers to TestEngineering/UI/AMO/Tips and Pointers) |
||
(71 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
== '''AMO''' == | |||
= Setup: staging and production = | |||
* Staging: https://preview.addons.mozilla.org | |||
* Production: https://addons.mozilla.org | |||
= Production = | |||
'''[https://intranet.mozilla.org/UpdateAMO#Content_Push Production push docs]''' | |||
* AMO uses [http://www.zeus.com/products/zxtmlb/index.html 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 [http://us.php.net/gettext 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 <pre><!-- [http://viewvc.svn.mozilla.org/vc?revision=24322&view=revision r24322 --></pre><p>This means you're at [http://viewvc.svn.mozilla.org/vc?revision=24322&view=revision 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 [https://addons.mozilla.org/services/monitor.php 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 == | |||
* http://github.com/jbalogh/zamboni/blob/master/apps/amo/__init__.py#L98 | |||
== 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 == | |||
[https://preview.addons.mozilla.org/z/en-US/firefox/addons/smorgasbord 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) === | |||
* Used for the API -- [https://wiki.mozilla.org/Update:RequirementsV33 spec here, [https://developer.mozilla.org/index.php?title=en/addons.mozilla.org_%28AMO%29_API_Developers%27_Guide/The_generic_AMO_API DevMO doc 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.* | |||
* You can test other locales in the API: | |||
** [https://preview.addons.mozilla.org/de/firefox/addon/78926 Lesezeichenleiste verstecken add-on] | |||
*** [https://preview.addons.mozilla.org/en-US/firefox/api/1.5/addon/search/Lesezeichenleiste%20verstecken API search URL] | |||
** For external sites, both 3rd party and sites like [http://addons.mozilla.jp/ 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 [http://cm-phpmyadmin01.mozilla.org/index.php?db=addons_reskin 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 == | |||
* Can be administrated through https://addons.allizom.org/en-US/firefox/discovery/modules | |||
== Add-on SRC=? Attributes == | |||
mysql> select * from download_sources; | |||
+----+----------------------+--------+---------------------+<br> | |||
| id | name | type | created |<br> | |||
+----+----------------------+--------+---------------------+<br> | |||
| 1 | category | full | 2009-08-06 19:21:17 |<br> | |||
| 2 | search | full | 2009-08-06 19:21:17 |<br> | |||
| 3 | collection | full | 2009-08-06 19:21:17 |<br> | |||
| 4 | recommended | full | 2009-08-06 19:21:17 |<br> | |||
| 5 | homepagebrowse | full | 2009-08-06 19:21:17 |<br> | |||
| 6 | homepagepromo | full | 2009-08-06 19:21:17 |<br> | |||
| 7 | api | full | 2009-08-06 19:21:17 |<br> | |||
| 8 | sharingapi | full | 2009-08-06 19:21:17 |<br> | |||
| 9 | addondetail | full | 2009-08-06 19:21:17 |<br> | |||
| 10 | external- | prefix | 2009-08-06 19:21:17 |<br> | |||
| 11 | developers | full | 2009-11-12 17:18:47 |<br> | |||
| 12 | installservice | full | 2009-11-12 17:18:47 |<br> | |||
| 13 | fxcustomization | full | 2009-11-12 17:18:47 |<br> | |||
| 14 | oftenusedwith | full | 2010-02-02 20:05:27 |<br> | |||
| 15 | similarcollections | full | 2010-02-02 20:05:27 |<br> | |||
| 16 | userprofile | full | 2010-02-08 19:48:51 |<br> | |||
| 18 | email | full | 2010-02-23 19:47:14 |<br> | |||
| 19 | rockyourfirefox | full | 2010-02-23 19:47:14 |<br> | |||
| 20 | mostshared | full | 2010-03-23 19:09:26 |<br> | |||
| 21 | fxfirstrun | full | 2010-05-13 16:07:59 |<br> | |||
| 22 | fxwhatsnew | full | 2010-05-13 16:07:59 |<br> | |||
| 23 | creatured | full | 2010-06-03 16:24:38 |<br> | |||
| 24 | version-history | full | 2010-08-05 16:14:09 |<br> | |||
| 25 | addon-detail-version | full | 2010-08-05 16:14:09 |<br> | |||
| 26 | discovery-pane | full | 2010-09-14 16:12:38 |<br> | |||
| 27 | mozcom- | prefix | 2010-12-28 16:05:42 |<br> | |||
+----+----------------------+--------+---------------------+<br> | |||
== Testing Search (weights/ordering) == | |||
https://wiki.mozilla.org/Update:Remora:Search | |||
== Browse Page Vs. Category Landing Page == | |||
* Category Landing Page | |||
** when you click on a Category link from left navigation, you are generally taken to Category landing page (if there are a enough add-ons in that category | |||
** For e.g. if you are on [https://addons.allizom.org/en-US/firefox 'Firefox' app page] and you click on 'Shopping' category you will most likely land on [https://addons.allizom.org/en-US/firefox/extensions/shopping Category Landing Page] since this category has more than 5 add-ons | |||
** On [https://addons.allizom.org/en-US/firefox/extensions/shopping Category Landing Page] you should see a big section of category-featured add-ons on the top, on the bottom you should see 3 columns listing 'Recently Added', 'Top Downloads' & 'Top Rated' add-ons( all for that category). On the bottom of each column there is a link to 'View All' (in that category) | |||
* Browse Page | |||
** when you click on a Category link from left navigation and if you end up on Browse page that's because there are not enough add-ons in that category to show a Cat. landing Page | |||
** For e.g. if you are on [https://addons.allizom.org/en-US/mobile 'Mobile' app page] and you click on 'Shopping' category you will most likely land on [https://addons.allizom.org/en-US/mobile/extensions/shopping/ Category Browse] page since this category fewer add-ons | |||
** Browse page will not have the 3 columns of 'Recently Added', 'Top Downloads' & 'Top Rated' add-ons. |
Latest revision as of 20:34, 26 August 2016
AMO
Setup: staging and production
- Staging: https://preview.addons.mozilla.org
- Production: https://addons.mozilla.org
Production
- 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
- Valid files
Special Add-ons
- EULA - Yahoo.com Toolbar
- Privacy Policy - Yahoo.com Toolbar
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)
- Used for the API -- spec here, [https://developer.mozilla.org/index.php?title=en/addons.mozilla.org_%28AMO%29_API_Developers%27_Guide/The_generic_AMO_API DevMO doc 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.*
- You can test other locales in the API:
- Lesezeichenleiste verstecken add-on
- 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.
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
- Can be administrated through https://addons.allizom.org/en-US/firefox/discovery/modules
Add-on SRC=? Attributes
mysql> select * from download_sources;
+----+----------------------+--------+---------------------+
| id | name | type | created |
+----+----------------------+--------+---------------------+
| 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 |
| 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 |
| 21 | fxfirstrun | full | 2010-05-13 16:07:59 |
| 22 | fxwhatsnew | full | 2010-05-13 16:07:59 |
| 23 | creatured | full | 2010-06-03 16:24:38 |
| 24 | version-history | full | 2010-08-05 16:14:09 |
| 25 | addon-detail-version | full | 2010-08-05 16:14:09 |
| 26 | discovery-pane | full | 2010-09-14 16:12:38 |
| 27 | mozcom- | prefix | 2010-12-28 16:05:42 |
+----+----------------------+--------+---------------------+
Testing Search (weights/ordering)
https://wiki.mozilla.org/Update:Remora:Search
Browse Page Vs. Category Landing Page
- Category Landing Page
- when you click on a Category link from left navigation, you are generally taken to Category landing page (if there are a enough add-ons in that category
- For e.g. if you are on 'Firefox' app page and you click on 'Shopping' category you will most likely land on Category Landing Page since this category has more than 5 add-ons
- On Category Landing Page you should see a big section of category-featured add-ons on the top, on the bottom you should see 3 columns listing 'Recently Added', 'Top Downloads' & 'Top Rated' add-ons( all for that category). On the bottom of each column there is a link to 'View All' (in that category)
- Browse Page
- when you click on a Category link from left navigation and if you end up on Browse page that's because there are not enough add-ons in that category to show a Cat. landing Page
- For e.g. if you are on 'Mobile' app page and you click on 'Shopping' category you will most likely land on Category Browse page since this category fewer add-ons
- Browse page will not have the 3 columns of 'Recently Added', 'Top Downloads' & 'Top Rated' add-ons.