зеркало из https://github.com/mozilla/treeherder.git
Bug 1169916 - Stop using Cython to build the log parser
Since it only speeds up parsing by a few percent of total runtime, and is therefore not worth the added complexity for deployment and local hack-test-debug cycles when working on the log parser. The .gitignore and update.py entries will be removed in a later commit, once the stage/prod src directories have been cleaned up.
This commit is contained in:
Родитель
6b1e4f602b
Коммит
58813b0c51
|
@ -4,6 +4,3 @@ docs
|
|||
htmlcov
|
||||
puppet
|
||||
treeherder/etl/data/credentials.json
|
||||
treeherder/log_parser/artifactbuildercollection.so
|
||||
treeherder/log_parser/artifactbuilders.so
|
||||
treeherder/log_parser/parsers.so
|
||||
|
|
|
@ -25,7 +25,6 @@ before_script:
|
|||
# Required for Karma tests (http://docs.travis-ci.com/user/gui-and-headless-browsers/)
|
||||
- export DISPLAY=:99.0
|
||||
- sh -e /etc/init.d/xvfb start
|
||||
- python setup.py build_ext --inplace
|
||||
- mysql -e 'create database treeherder;'
|
||||
script:
|
||||
- npm test
|
||||
|
|
|
@ -12,5 +12,4 @@ COPY ./requirements/common.txt /app/requirements.txt
|
|||
COPY ./docker/etc/profile.d/treeherder.sh /etc/profile.d/treeherder.sh
|
||||
COPY . /app
|
||||
RUN ./bin/peep.py install -r requirements.txt
|
||||
RUN ./setup.py build_ext --inplace
|
||||
RUN mkdir -p /var/log/gunicorn && mkdir -p /var/log/treeherder/
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#! /bin/bash -e
|
||||
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
python setup.py build_ext --inplace
|
|
@ -60,8 +60,6 @@ def update(ctx):
|
|||
with ctx.lcd(th_service_src):
|
||||
# Collect the static files (eg for the Persona or Django admin UI)
|
||||
ctx.local("python2.7 manage.py collectstatic --noinput")
|
||||
# Rebuild the Cython code (eg the log parser)
|
||||
ctx.local("python2.7 setup.py build_ext --inplace")
|
||||
# Update the database schema, if necessary.
|
||||
ctx.local("python2.7 manage.py migrate --noinput")
|
||||
# Update reference data & tasks config from the in-repo fixtures.
|
||||
|
|
|
@ -6,12 +6,6 @@ This is a list of maintenance tasks you may have to execute on a treeherder depl
|
|||
Apply a change in the code
|
||||
--------------------------
|
||||
|
||||
If you changed something in the log parser, you need to do a compilation step:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
> ./setup.py build_ext --inplace
|
||||
|
||||
In order to make the various services aware of a change in the code you need to restart supervisor:
|
||||
|
||||
.. code-block:: bash
|
||||
|
|
|
@ -38,12 +38,6 @@ class treeherder {
|
|||
group => "${APP_GROUP}",
|
||||
}
|
||||
|
||||
exec{"build-extensions":
|
||||
command => "${VENV_DIR}/bin/python ${PROJ_DIR}/setup.py build_ext --inplace",
|
||||
user => "${APP_USER}",
|
||||
cwd => "${PROJ_DIR}",
|
||||
}
|
||||
|
||||
file { [
|
||||
"/var/log/gunicorn",
|
||||
"/var/log/celery",
|
||||
|
|
|
@ -22,9 +22,6 @@ kombu==3.0.26
|
|||
# sha256: KjGJ950ce4ohSaDng8C0IX-tmzCm59YEUPJVPcLA5X4
|
||||
simplejson==3.6.5
|
||||
|
||||
# sha256: FDB-emmvmg0OACTURq9-UcwOPk0N-xDTa6g35eWEQBU
|
||||
Cython==0.22
|
||||
|
||||
# Required by datasource
|
||||
# sha256: gRBAtkfl1WhvhNtBXv1pfmJQAIsRK2kJunesBZ4UDHQ
|
||||
MySQL-python==1.2.5
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
[pep8]
|
||||
filename = *.py,*.pyx
|
||||
exclude = .git,__pycache__,.vagrant,bin/peep.py,build,node_modules
|
||||
exclude = .git,__pycache__,.vagrant,bin/peep.py,node_modules
|
||||
# E121,E123,E126,E226,E24,E704: Ignored in default pep8 config:
|
||||
# https://github.com/jcrocholl/pep8/blob/8ca030e2d8f6d377631bae69a18307fb2d051049/pep8.py#L68
|
||||
# Our additions...
|
||||
|
@ -16,8 +15,7 @@ max-line-length = 140
|
|||
# flake8 is a combination of pyflakes & pep8.
|
||||
# Unfortunately we have to mostly duplicate the above, since some tools use
|
||||
# pep8's config (eg autopep8) so we can't just define everything under [flake8].
|
||||
filename = *.py,*.pyx
|
||||
exclude = .git,__pycache__,.vagrant,bin/peep.py,build,node_modules
|
||||
exclude = .git,__pycache__,.vagrant,bin/peep.py,node_modules
|
||||
# The ignore list for pep8 above, plus our own PyFlakes addition:
|
||||
# F403: 'from module import *' used; unable to detect undefined names
|
||||
ignore = E121,E123,E126,E226,E24,E704,E501,F403
|
||||
|
|
13
setup.py
13
setup.py
|
@ -4,18 +4,9 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import os
|
||||
from distutils.core import setup
|
||||
|
||||
# Prevents an ImportError on Read the Docs, since they don't use
|
||||
# (or need) the packages in common.txt, which includes Cython.
|
||||
if os.environ.get('READTHEDOCS'):
|
||||
ext_modules = []
|
||||
else:
|
||||
from Cython.Build import cythonize
|
||||
ext_modules = cythonize("treeherder/log_parser/*.pyx")
|
||||
from setuptools import setup
|
||||
|
||||
setup(
|
||||
name="treeherder",
|
||||
ext_modules=ext_modules
|
||||
url="https://github.com/mozilla/treeherder"
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче