tree: 312b25f79413b3826b31cd0e01d667fa61b25833 [path history] [tgz]
  1. api/
  2. benchmark/
  3. businesslogic/
  4. doc/
  5. elements/
  6. features/
  7. framework/
  8. project/
  9. proto/
  10. schema/
  11. search/
  12. services/
  13. sitewide/
  14. static/
  15. templates/
  16. testing/
  17. third_party/
  18. tools/
  19. tracker/
  20. .coveragerc
  21. .eslintrc.json
  22. .expect_tests.cfg
  23. .expect_tests_pretest.py
  24. .gitignore
  25. .testcoveragerc
  26. app.yaml.m4
  27. appengine_config.py
  28. bower-locker.bower.json
  29. bower.json
  30. codereview.settings
  31. cron.yaml
  32. dispatch.yaml
  33. dos.yaml
  34. Makefile
  35. module-besearch.yaml.m4
  36. module-latency-insensitive.yaml.m4
  37. monorailapp.py
  38. OWNERS
  39. package-lock.json
  40. package.json
  41. queue.yaml
  42. README.md
  43. registerpages.py
  44. settings.py
appengine/monorail/README.md

Monorail Issue Tracker

Monorail is the Issue Tracker used by the Chromium project and other related projects. It is hosted at bugs.chromium.org.

If you wish to file a bug against Monorail itself, please do so in our self-hosting tracker. We also discuss development of Monorail at infra-dev@chromium.org.

Getting started with Monorail development

Here's how to run Monorail locally for development on any unix system (not under google3):

  1. You need to get the Chrome Infra depot_tools commands to check out the source code and all its related dependencies and to be able to send changes for review.
  2. Check out the Monorail source code
    1. cd /path/to/empty/workdir
    2. fetch infra
    3. cd infra/appengine/monorail
  3. Make sure you have the AppEngine SDK:
    1. It should be fetched for you by step 1 above (during runhooks)
    2. Otherwise, you can download it from https://developers.google.com/appengine/downloads#Google_App_Engine_SDK_for_Python
  4. Install MySQL v5.6.
    1. If you're on a Debian derivative, use your package manager:
      1. sudo apt-get install default-mysql-server default-mysql-client
    2. Otherwise, download from the offical page.
      1. Do not download v5.7 (as of April 2016)
  5. Get the database backend running and use the command-line to create a database named “monorail”:
    1. sudo /usr/bin/mysqld_safe
    2. mysql --user=root --password=<pw>
    3. CREATE DATABASE monorail;
  6. Install Python MySQLdb. Either:
    1. sudo apt-get install python-mysqldb
    2. Or, download from http://sourceforge.net/projects/mysql-python/
      1. Follow instructions to install.
      2. If needed, add these lines to your ~/.profile file and restart on MacOS 10.8:
        1. setenv DYLD_LIBRARY_PATH /usr/local/mysql/lib/
        2. setenv VERSIONER_PYTHON_PREFER_64_BIT no
        3. setenv VERSIONER_PYTHON_PREFER_32_BIT yes
      3. In Mac OSX 10.11.1, if you see errors about failing to import MySQLdb or that _mysql.so references an untrusted relative path, then run: sudo install_name_tool -change libmysqlclient.18.dylib
        /usr/local/mysql/lib/libmysqlclient.18.dylib
        /Library/Python/2.7/site-packages/_mysql.so
  7. Set up one master SQL database. (You can keep the same sharding options in settings.py that you have configured for production.).
    1. mysql --user=root monorail < schema/framework.sql
    2. mysql --user=root monorail < schema/project.sql
    3. mysql --user=root monorail < schema/tracker.sql
  8. Configure the site defaults in settings.py. You can leave it as-is for now.
  9. Set up the front-end development environment:
    1. Make sure you've run gclient runhooks, which will install the correct versions of node and npm.
    2. Run npm install -g bower to install Bower.
  10. Run the app:
    1. Run ‘make serve’
  11. Browse the app at localhost:8080 your browser.
  12. Optional: Create/modify your Monorail User row in the database and make that user a site admin.
    1. UPDATE User SET is_site_admin = TRUE WHERE email = 'YOUR@EMAIL';
    2. Restart your local dev appserver.

Instructions for deploying Monorail to an existing instance or setting up a new instance are here.

Here's how to run unit tests from the command-line:

Testing

To run all Python unit tests, in the appengine/monorail directory run:

make test

For quick debugging, if you need to run just one test you can do the following. For instance for the test IssueServiceTest.testUpdateIssues_Normal in services/test/issue_svc_test.py:

../../test.py test appengine/monorail:services.test.issue_svc_test.IssueServiceTest.testUpdateIssues_Normal --no-coverage

Frontend testing

To run the frontend tests for Monorail, you first need to set up your Go environment. From the Monorail directory, run:

eval `../../go/env.py`

Then, to run the frontend tests, run:

make wct

Troubleshooting

  • **TypeError: connect() got an unexpected keyword argument ‘charset’ This error occurs when dev_appserver cannot find the MySQLdb library. Try installing it via sudo apt-get install python-mysqldb.
  • TypeError: connect() argument 6 must be string, not None This occurs when your mysql server is not running. Check if it is running with ps aux | grep mysqld. Start it up with /etc/init.d/mysqld start on linux, or just mysqld.
  • dev_appserver says OSError: [Errno 24] Too many open files and then lists out all source files dev_appserver wants to reload source files that you have changed in the editor, however that feature does not seem to work well with multiple GAE modules and instances running in different processes. The workaround is to control-C or kill the dev_appserver processes and restart them.

Supported browsers

Monorail supports all browsers defined in the Chrome Ops guidelines.

File a browser compatability bug here.