Граф коммитов

4644 Коммитов

Автор SHA1 Сообщение Дата
Ed Morley 49112e7d12 Bug 1197186 - Move urls.py to treeherder/config/
Since it's the root URL config that include()s configs from the separate
apps, so should not be inside a Django app directory itself.
2015-10-08 19:59:45 +01:00
Ed Morley 39b9656ac2 Bug 1197186 - Move whitenoise_custom.py to treeherder/config/
Since it's not specific to the Django app 'webapp'.
2015-10-08 19:59:45 +01:00
Ed Morley a5999ac2b9 Bug 1197186 - Move wsgi.py to a generic config/ directory
Since it's not specific to the Django app 'webapp'.
2015-10-08 19:59:44 +01:00
Ed Morley 685b055d7a Bug 1197186 - Move the global templates directory outside of webapp/
Templates directories inside Django apps are automatically detected, so
we shouldn't set the global directory inside a Django app. 404.html is
generic enough to be in the global directory, persona_login.html is only
used by the 'webapp' Django app, so is being left as-is.
2015-10-08 19:59:43 +01:00
Ed Morley 6735213a04 Bug 1212886 - Fail early if stage/prod grunt build forgotten
This prevents 404s on the UI if the output from `grunt build` hasn't
been committed to the repo prior to deploying to stage/prod.
2015-10-08 16:09:09 +01:00
Ed Morley d9bd20efd1 Bug 1212822 - Only load local.py in the Vagrant environment
Ideally we'd remove local.py entirely, in favour of environment
variables. However at least for now, it's still needed for setting the
logging preferences/enabling debugging apps for the Vagrant environment.
As such, it's being kept but disabled everywhere other than for local
development.

The stage/prod local.py files have been vetted, and (a) the contents
confirmed to match that in the environment, and (b) all affected
settings in base.py checked to ensure they read the correct environment
variable. Heroku doesn't have a local.py. As such, this should be a
no-op other than locally, where a Vagrant provision will be required.
2015-10-08 13:42:58 +01:00
Ed Morley 19d3570a1e Bug 1212822 - Check the environment for SITE_URL not TREEHERDER_SITE_URL
On stage/prod the environment variable set is SITE_URL rather than
TREEHERDER_SITE_URL (this doesn't affect anything at the moment, since
local.py is being used, but we want to remove it). Instead of changing
the puppet configs its probably easier to just adjust what variable we
look at, particularly since the non-prefixed form is more concise and
matches what it actually controls.

I've added SITE_URL to Heroku in preparation.
2015-10-08 13:42:58 +01:00
Ed Morley 3ac35b2488 Bug 1212822 - Allow setting PULSE_EXCHANGE_NAMESPACE via the environment
So it can still be set on stage/prod, where we want to stop using
local.py. (It's already set in the environment there, we just need to
start using it.)
2015-10-08 13:42:57 +01:00
Mauro Doglio 82d518682e Bug 1209555 - Fix job_log_url permission classes 2015-10-08 13:11:54 +01:00
Mauro Doglio be64542d11 Bug 1209555 - switch etl requests to hawk
I added a create_credentials command to help setting up the initial
development environment. The puppet setup now creates a new user and set
it as the owner of the treeherder-etl credentials.
2015-10-08 13:11:54 +01:00
Mauro Doglio 527b60faba Bug 1209555 - bump up client version 2015-10-08 13:11:54 +01:00
Mauro Doglio a6b9d736ca Bug 1209555 - add requests-hawk to requirements 2015-10-08 13:11:54 +01:00
Ed Morley a170d6c047 Bug 1212447 - Allow setting the data retention time via an env variable
By storing the duration as an int rather than a timedelta, we can set it
via the environment, rather than having to rely on local.py.

The variable has also been renamed to ease the transition and also make
its purpose clearer. Prod/Heroku use the default duration, and stage has
already had DATA_CYCLE_DAYS set to 45 in its environment, for parity
with the old stage local.py DATA_CYCLE_INTERVAL setting.
2015-10-08 12:13:19 +01:00
Ed Morley 97b64ea845 Bug 1209200 - Update test to take into account changes from bug 1211253
The PR's test run was green but yet failed once merged to master,
because Travis had run the merge tests prior to bug 1211253 landing.
2015-10-07 19:39:35 +01:00
Ed Morley 9bfd311ee8 Merge pull request #1011 from mjzffr/mediatests
Bug 1209200 - Add Treeherder b-m, b-y job symbols and VP group symbols
2015-10-07 16:24:36 +01:00
Ed Morley 201dc11955 Bug 1211836 - Remove unused resultset.aggregate_id 2015-10-06 23:27:35 +01:00
Ed Morley 0164b8f72f Bug 1211866 - Update django-extensions to v1.5.7
https://github.com/django-extensions/django-extensions/blob/master/CHANGELOG.md#157
https://github.com/django-extensions/django-extensions/compare/1.5.5...1.5.7
2015-10-06 16:01:36 +01:00
Ed Morley 745df95505 Bug 1211866 - Update django-environ to v0.4.0
https://github.com/joke2k/django-environ#040---23-september-2015
https://github.com/joke2k/django-environ/compare/v0.3...v0.4
2015-10-06 16:01:35 +01:00
Ed Morley 3e47f58a0d Bug 1211866 - Update django-rest-swagger to v0.3.4
https://github.com/marcgibbons/django-rest-swagger/blob/master/CHANGELOG.md#v034-august-19-2015
https://github.com/marcgibbons/django-rest-swagger/compare/0.3.2...0.3.4
2015-10-06 16:01:34 +01:00
Ed Morley ad4df5a2ff Bug 1211866 - Update drf-extensions to v0.2.8
http://chibisov.github.io/drf-extensions/docs/#0-2-8
https://github.com/chibisov/drf-extensions/compare/0.2.7...0.2.8
2015-10-06 16:01:34 +01:00
Ed Morley f9ee70006d Bug 1211866 - Update djangorestframework to v3.2.4
http://www.django-rest-framework.org/topics/3.2-announcement/
http://www.django-rest-framework.org/topics/release-notes/#32x-series
https://github.com/tomchristie/django-rest-framework/compare/3.1.3...3.2.4
2015-10-06 16:01:33 +01:00
Ed Morley 718ce7ed57 Bug 1211866 - Use non-deprecated DRF 'request' properties
In django-rest-framework v3.2+ request.DATA and request.QUERY_PARAMS
have been removed in favour of request.DATA and request.query_params
respectively (they've been deprecated since DRF v3.0+):
http://www.django-rest-framework.org/topics/3.2-announcement/#deprecations
2015-10-06 16:01:32 +01:00
Ed Morley 55c86687db Bug 1211866 - Update Django to v1.8.5
https://docs.djangoproject.com/en/1.8/releases/1.8.5/
https://github.com/django/django/compare/1.8.4...1.8.5
2015-10-06 16:01:31 +01:00
Ed Morley a79854f6b7 Bug 1211893 - Update httplib2 to v0.9.2
https://github.com/jcgregorio/httplib2/blob/master/CHANGELOG
https://github.com/jcgregorio/httplib2/compare/0.9.1...0.9.2
2015-10-06 15:50:24 +01:00
Ed Morley fe6e51d457 Bug 1211893 - Update oauth2 to v1.9.0.post1
Includes the fix for CVE-2013-4347.

https://github.com/joestump/python-oauth2/compare/hudson-python-oauth2-211...v1.9
2015-10-06 15:50:24 +01:00
Ed Morley 60a8d4015b Bug 1211900 - Update whitenoise to v2.0.4
https://github.com/evansd/whitenoise/blob/master/CHANGELOG.rst#v204
https://github.com/evansd/whitenoise/compare/v2.0.2...v2.0.4
2015-10-06 15:30:19 +01:00
Ed Morley 99adcdac0e Bug 1210738 - Declare the license type in package.json
To suppress the warning shown when using `npm install`.
2015-10-06 13:16:04 +01:00
Ed Morley 364f635917 Bug 1198536 - Remove job.build_url since it's unused 2015-10-05 20:41:34 +01:00
Ed Morley d152cd8048 Bug 1211275 - Remove unused jobsample.json and job_data.json.sample 2015-10-05 20:33:08 +01:00
Ed Morley 027abb7057 Bug 1211253 - Remove the concept of a platform's VM status
It's calculated during ingestion, but not used and in fact not actually
stored anywhere.
2015-10-05 18:49:25 +01:00
Ed Morley d235be0363 Bug 1211524 - Add readme badges for requires.io and david-dm.org
So we can more easily track out of date dependencies.

Note that since we pin our nodejs packages, the Node badges will remain
green even if dependencies are out of date, due to:
https://github.com/alanshaw/david-www/issues/48
...however the badge is still useful since it's just one click to see
the table.

To get the requires.io badge working a GitHub hook has to be set up,
which I've already done.
2015-10-05 17:47:49 +01:00
Ed Morley beeef2ed50 Bug 1211509 - Remove landscape.io support
Since landscape.io is down and has been pretty flaky for several months.
2015-10-05 17:05:54 +01:00
Ed Morley cfe5ffca3a Bug 1210748 - Update to hawkrest v0.0.8 since v0.0.6 removed from PyPI
https://github.com/kumar303/hawkrest/compare/0.0.6...0.0.8
2015-10-05 16:40:03 +01:00
Ed Morley c554745a2c Bug 1192957 - Add isort to the Travis run
Any import style deviations will cause the Travis run to fail, with the
diff output to the Travis log.
2015-10-02 17:55:29 +01:00
Ed Morley 571c57af71 Bug 1192957 - Mass-update python import style using isort
To fix pre-existing deviations from the style that will be enforced on
Travis in the next commit.
2015-10-02 17:55:29 +01:00
Ed Morley 40c90e3365 Bug 1192957 - Docs: Explain the Python import style and how to run isort
In the future, the new "Code Style" page will also be used to explain
other styles/linters used in the project, eg JavaScript / ESlint.
2015-10-02 17:55:28 +01:00
Ed Morley 1e599b6681 Bug 1192957 - Add config for isort
It can now be run with just `isort` and will do the right thing.

The chosen multi-class import style is:

from third_party import (lib1,
                         lib2,
                         lib3
                         ...)

See the docs added in a later commit, or:
https://github.com/timothycrosley/isort/blob/develop/README.rst
https://github.com/timothycrosley/isort/wiki/isort-Settings
2015-10-02 17:54:48 +01:00
Ed Morley 8be78f1f57 Bug 1192957 - Add isort v4.2.2 to dev.txt
https://github.com/timothycrosley/isort
2015-10-02 17:54:47 +01:00
Cameron Dawson 4a4efd6e76 Bug 1205906 - Adds JSON schema for text_log_summary artifacts 2015-10-02 09:36:15 -07:00
Ed Morley a31174407a Bug 1207613 - Remove the dist/ directory from master
Heroku now generates it on deploy, and for stage/prod we generate it
fresh on the stage/prod branch and force push each time. As such, we
have no need for the directory on master, and by removing it we avoid
confusion when new contributors grep the repo.

As an added bonus, the stage/prod deploy script should fail if the dist
directory is missing, so the grunt build cannot be forgotten prior to
deploying. (Currently if it's forgotten, we end up deploying the ancient
dist directory from master that was last updated prior to us switching
to the new deployment strategy.)
2015-10-02 11:55:54 +01:00
camd 58ae256b28 Merge pull request #1012 from mandaltapesh/logparse
Bug 1174645 - Improve job details message for missing logs
2015-10-01 17:08:51 -07:00
Cameron Dawson 7510eb98d9 Bug 1169320 - Documentation for pulse ingestion
This documentation instructs a user on how to setup their local
machine to ingest data from existing exchanges as well as posting
to their own to test their jobs.
2015-10-01 15:50:12 -07:00
Cameron Dawson 35fb130951 Bug 1169320 - Tests against the JobLoader 2015-10-01 15:50:12 -07:00
Cameron Dawson ff64f67247 Bug 1169320 - Adds ability to ingest Jobs from Pulse exchanges
This ingests jobs over a pulse stream if the resultset for the job
already exists.  There is a new management command called
``ingest_from_pulse`` which reads from a set of exchanges specified
in ``base.py`` or environment variables.  These will be loaded in a
local celery queue for ingestion into the DB.

The user is expected to create their own Pulse user with Pulse Guardian
to be able to ingest jobs as well as post to their own queue.

A JSON Schema in the form of a YML file is included to validate the jobs
prior to ingestion.  The resultset/push for a job must
already exist in Treeherder or the job will be skipped.
2015-10-01 15:50:12 -07:00
Cameron Dawson d23435f8ed Bug 1169320, 1199506 - Adds requirements, settings and JSON schema for Pulse Ingestion 2015-10-01 15:50:12 -07:00
William Lachance 834f0d090c Bug 1205789 - Fix back/forward button in perfherder graphs 2015-10-01 18:00:41 -04:00
Ed Morley 47f807375f Bug 1210546 - Run `grunt build` on Travis
To ensure build script/parsing breakage is detected early.
2015-10-01 21:43:49 +01:00
Tapesh 608f0f6bea Bug 1174645 - Improve job details message for missing logs 2015-10-01 00:37:38 +05:30
Ed Morley 0c79292d68 Bug 1201523 - Run grunt build during the Heroku deploy
This commit relies on the nodejs buildpack being added to the list of
buildpacks for the app, and prior to the Python buildpack. See:
https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app

The nodejs buildpack will automatically install the packages listed in
`dependencies` in package.json, so that we have the requirements for
the grunt build. We don't actually need node or all of the files in
node_modules after we've run the grunt build, so in the future could try
and remove them to reduce the resultant slug size (though it only
increased from 55MB to 70MB, so it's not urgent).

The dist directory has been added to `.slugignore` to prevent the
in-repo directory from being uploaded, since we'll be generating a new
one as part of the deploy. Once `dist/` is deleted from master, that
entry can be removed.
2015-09-30 18:34:56 +01:00
Ed Morley f4e915bdbe Bug 1201523 - Add grunt-cli to local dependencies list
Normally grunt-cli (a wrapper around grunt to allow it to be easily run
from the command line) would be installed globally, so that it is on the
PATH. However to save having to do this on prod/Heroku/Travis, we
install it locally - and it will then be available via:
`./node_modules/.bin/grunt`
...or else via just `grunt`, if referenced inside a package.json scripts
section.
2015-09-30 17:53:08 +01:00