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

158 Коммитов

Автор SHA1 Сообщение Дата
James Graham 67b335f4c5 Add integration between autoclassification and manual starring.
This adds a new FailureClassification for autoclassified
intermittent. When a job is completely classified by the
autoclassifer, and it has the same number of structured and
unstructured error lines, it is marked as an autoclassified
intermittent.

Conversely, when there is exactly one structured and one unstructured
error line, the autoclassifier did not match the job, but has a
detector that could match the job, and the job is marked as
intermittent by a human, add a new autoclassification target
corresponding to the error line.
2015-10-22 15:43:53 +01:00
Ed Morley 8ae9071901 Bug 1197186 - Move settings to treeherder/config/
Since they're not specific to the Django app 'webapp'.

Whilst we're there, the local & example settings files have been
renamed. In the future I'd like to combine settings_local.example.py
with puppet/files/treeherder/local.vagrant.py, but I'll do that in
another bug.
2015-10-08 19:59:46 +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
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
Ed Morley 60b8f347bd Bug 1179310 - Stop commenting on bugs when classifying failures
To reduce bugspam as well as the impact on full text search times for
bugzilla.mozilla.org's database, we're turning off bug comments.
2015-09-30 16:16:59 +01:00
James Graham 7b6fa25402 Bug 1204942 - First cut at autoclassify / intermittent orange detection.
This adds an autoclassify command and a detect_intermittents command.
The former is designed to take an incoming job with an error summary
and look for existing results marked as intermittent that are a close
match for the new result. At present only one matcher is implemented;
this requires an exact match in terms of test name, result and error
message. Matching is also constrained to be based on single lines; it
is anticipated that future iterations may add support for matching on
groups of lines.

The detect_intermittents command is designed to take a group of jobs
running on the same push and with the same build job (i.e. same
testsuite, same chunk, etc.) and look for new intermittents to add to
the database. This currently only looks for test failures where there
is at least one green job and one non-green job.

There is currently no UI for seeing matches or for adding new
prototypical intermittents as match candidates. There is also no
integration with bugzilla; future development should add association
of frequent intermittents with bugs.
2015-09-21 22:47:19 +01:00
Ed Morley 90ba77e596 Bug 1192801 - Remove per-file MPL boilerplate since it's unnecessary
The MPL 2.0 terms state that as long as a LICENSE file is present, the
per-file header text is not required. See "Exhibit A" at the end of:
https://www.mozilla.org/MPL/2.0/
2015-08-18 23:32:11 +01:00
Ed Morley 475f427860 Remove duplicate imports in conftest.py 2015-08-12 09:31:26 +01:00
Ed Morley 1c00ccfcc7 Bug 1192661 - Clean up Python import order
Created using |isort -p tests -rc .| and a couple of manual tweaks.

The order is:
* futures
* std library
* third party packages
* local imports
* relative local imports
...with each group ordered with "import x" before "from x import y", and
then alphabetically.
2015-08-10 18:33:49 +01:00
Ed Morley fad76032a5 Bug 1165335 - Switch from urllib to requests for bugscache API query
urllib isn't handling the unicode found in some log lines correctly,
whereas requests does. This prevents UnicodeEncodeError exceptions when
making the request to the bugscache API to find the bug suggestions for
these log lines.
2015-08-05 11:58:22 +01:00
Ed Morley 21ca58c3d2 Bug 1185030 - Remove the contenttype field from the datasource table
Since it's redundant now that the objectstore has been removed.
2015-07-23 11:23:06 +01:00
Cameron Dawson 00cfe6643d Bug 1140349 - Remove the objectstore code
After the previous commit, the Objectstore is effectively "dead code".
So this commit removes all the dead code after anything left over in
the Objectstore has been drained and added to the DB.
2015-07-21 14:13:21 -07:00
Mauro Doglio b9881f937c Bug 1183575 - Create a requests auth backend for 2-legged oauth 2015-07-20 16:12:33 +02:00
Ed Morley 2d087edaea Bug 1182455 - Remove support for different DB hosts per datasource
Having the ability to use different DB hosts for each project sounded
like a good idea, but in reality, we have no need for it.

This switches us to using the global read-write and read-only database
host names rather than the fields on the datasource table. As such, the
'host', 'read_only_host' and 'type' (eg 'mysql') fields can be removed.
The Django model had a unique_together on host+name, so we now need to
make 'name' (ie database name) a unique key on it's own.

In addition, this removes the 'creation_date' field, since we don't use
it anywhere, and we can just look at the commit history to see when a
repo was created. (I imagine it may have had more use if we actually had
started partitioning the databases uses the old 'dataset' count field).

In a future bug, I'll remove the redundant substitution of 'engine' for
'InnoDB' in the template schema, given that engine is now always InnoDB
in create_db().
2015-07-11 13:20:00 +01:00
Ed Morley 9371347bc2 Revert "Bug 1175432 - Use dj-database-url to simplify DB environment variables"
This reverts commit 3330b3c567.
2015-07-09 23:05:49 +01:00
Ed Morley 3330b3c567 Bug 1175432 - Use dj-database-url to simplify DB environment variables
dj-database-url extracts DB host, port, username, password and database
name from the env variable 'DATABASE_URL' (unless another env variable
name is specified). If the env variable is not defined, it falls back to
the default passed to dj_database_url.config().

This means for Heroku and similar we can replace the multiple DB env
variables with just one URL for default & one for read_only.

This also effectively makes the setting of the read only DB variable
mandatory for stage/production/heroku, since DEFAULT_DATABASE_URL won't
be valid for them - so prevents us inadvertently not using the read only
DB.

Before this is deployed, we'll need to update the stage/prod puppet
configs & Heroku settings to add the new environment variable.
2015-07-09 17:54:29 +01:00
Ed Morley 49d4dfc59d Bug 1178389 - Remove job_log_url.parse_timestamp
Since it's unused.
2015-06-30 22:48:00 +01:00
William Lachance 3b5a9032da Merge pull request #688 from vaibhavmagarwal/refactor
Bug 1178474 - Have a common function for calling various endpoints.
2015-06-30 14:21:49 -04:00
Vaibhav Agrawal 096560caf5 Bug 1178474 - Have a common function for calling various endpoints. 2015-06-30 10:53:04 -07:00
Ed Morley caaec5d047 Bug 1178719 - Use --noinput when running migrate from scripts
Since otherwise we may end up with interactive prompts.
Note: When using call_command() we instead have to use 'interactive'
instead of 'noinput' due to https://code.djangoproject.com/ticket/22985,
which is only fixed in Django 1.8+.
2015-06-30 14:15:02 +01:00
Ed Morley d2010a6215 Bug 1178232 - Remove support for multiple Datasources of the same type
The datasource table has a 'dataset' field, to allow for multiple
datasources of the same type (for partitioning; eg the "1" in
`mozilla-central_jobs_1`). However we have never used it, so let's just
remove it.
2015-06-30 14:10:07 +01:00
Ed Morley b3b76ff346 Bug 1160561 - Remove TEST_DB_PREFIX pref
Since we really don't need it.
2015-05-28 16:09:45 +01:00
Cameron Dawson 70ddc6a951 Bug 1080760 - Missing fixure added to fix tests 2015-05-21 14:37:34 -07:00
Cameron Dawson 942e314361 Revert "Bug 1151806 - Implement chunking for job ingestion"
This reverts commit e71e781565.

This commit caused pending and running jobs to be put into the objectstore.
This causes their completed versions not to be ingested.
2015-05-21 11:46:38 -07:00
Cameron Dawson e71e781565 Bug 1151806 - Implement chunking for job ingestion 2015-05-20 15:09:17 -07:00
William Lachance dc084310f6 Bug 1163674 - Update treeherder client to be more generic
* Create a generic TreeherderClient class
* Add a single method called `post_collection` which takes care of all
  details of validation, submitting stuff and raising errors
* Also add a new update_parse_status method, for updating status (replaces
  manual calls to post information on raw TreeherderRequest)
2015-05-19 17:32:22 -04:00
William Lachance 0e6e61fbbe Bug 1159831 - Make treeherder use in-tree copy of treeherder-client 2015-05-01 13:34:29 -04:00
Cameron Dawson 44511e4518 Bug 1154470 - refactor artifact handling into its own model 2015-04-17 10:56:44 -07:00
Ed Morley bddfcfed70 Bug 1153186 - s/TBPL_BUGS_TRANSFER_ENABLED/MIRROR_CLASSIFICATIONS/ 2015-04-13 18:55:35 +01:00
Ed Morley 533a656b49 Bug 1137278 - Defer import of thclient until vendor/ is in sys.path
The treeherder client is in the vendor directory, however that doesn't
get added to the sys.path until settings/base.py is loaded, so defer the
import until we need it.
2015-03-03 18:47:48 +00:00
Ed Morley 30ad99c7c0 Bug 1059814 - Non-whitespace pep8 fixes using autopep8 aggressive mode
Generated using:
autopep8 --in-place --recursive --aggressive --aggressive
--max-line-length 999 --exclude='.git,__pycache__,.vagrant,build,vendor,
0001_initial.py,models.py,test_note_api.py,test_bug_job_map_api.py' .

autopep8's aggressive mode, unlike standard mode, makes non-whitespace
changes. It also uses lib2to3 to correct deprecated code (W690), some of
which aren't pep8 failures. Some of these changes are more dubious, but
rather than disable W690 completely, I've just excluded the files where
the unwanted changes would have been made, so we can benefit from the
rest.
2015-03-03 02:34:37 +00:00
James Lal 38e0669187 Bug 1113281 - Add pulse messages when after cancel/retrigger r=maurodoglio
- Rename configs to make it easier to run tests without pulse
 - Fix scoping bug (all messages used to be published under same exchange!)
2015-02-19 13:49:11 -08:00
Ed Morley f5c0b53e0c Bug 1059814 - Whitespace pep8 fixes
Generated using:
autopep8 --in-place --recursive .

Before:
$ pep8 | wc -l
1686

After:
$ pep8 | wc -l
57

A later autopep8 run will be performed using --aggressive, which makes
non-whitespace changes too.
2015-02-15 14:52:31 +00:00
Cameron Dawson 698fd05519 Bug 1119479 - Upgrade to Django 1.7 2015-02-10 11:34:07 -08:00
Ed Morley 280c687159 Bug 1125464 - Always set read_only_host when creating job/OS Datasources
read_only_host was previously only ever set when using the
init_datasources script, and not via any other means.
2015-01-24 19:30:17 +00:00
Ed Morley 6bf711fb4a Bug 1059811 - pyflakes: Remove unused variables 2015-01-16 12:33:32 +00:00
Jonathan French dbb4d11e09 Bug 1090689 - Add MPL2.0 headers to the repo 2014-11-03 13:06:03 -05:00
mdoglio b03b332099 Bug 1076769 - setup lock strategy for the log parser
During a log parser run, the same log cannot be parsed by another
worker. This is done using a memcached-based lock mechanism.
2014-10-16 15:30:40 +01:00
mdoglio 926df47e62 Bug 1076752 -add test for pushlog ingestion 2014-10-08 18:54:36 +01:00
mdoglio cb3d46df36 Bug 1072291 - handle 404 responses from json-pushes 2014-09-26 17:08:28 +01:00
Jonathan Eads 1a97cfa944 modified detection of new result sets strategy 2014-08-26 14:05:17 -07:00
Cameron Dawson 1ee5a68273 Fixed bug suggestions to match all error lines from the log 2014-07-16 14:14:23 -07:00
Cameron Dawson 74d8e08e2a fixing test mocking 2014-07-16 10:30:23 -07:00
Cameron Dawson 8fa03016c1 fix bug suggestions 2014-07-16 10:30:23 -07:00
mdoglio 8e0c47068c add log parsing status handling 2014-07-03 15:58:04 +02:00
jeads a0d82137cc Merge pull request #161 from mozilla/tbpl-classification-proxy
send classification data to tbpl
2014-06-09 15:32:22 -07:00
Jonathan Eads 0042aec91a removed localhost 2014-06-05 14:40:36 -07:00
Jonathan Eads 6b5a5e8310 removed localhost reference, added treeherder-service to sys.path 2014-06-05 13:39:05 -07:00
mdoglio 7b11ec408d send classification data to tbpl 2014-06-03 18:46:20 +02:00
Jonathan Eads d4fd6826d0 added request.addfinalizer call to register fin() methods 2014-06-03 08:51:15 -07:00
Jonathan Eads a8d0d10e50 added scope for model fixtures 2014-06-02 12:15:13 -07:00
Jonathan Eads d313b86522 added disconnects 2014-06-01 20:00:52 -07:00
mdoglio 3c6c018232 fix test setup to allow model migrations 2014-04-10 15:05:39 +01:00
mdoglio 5066348c43 add job classification socketio event 2014-03-13 14:17:34 +00:00
mdoglio 45fdb47f0c add session authentication to notes and bug_job_map creation 2014-03-06 11:08:29 +01:00
Jonathan Eads 044217b997 removed manage.py command to write out credentials 2014-02-04 15:23:01 -08:00
Jonathan Eads efcff53d2d fixed stuff 2014-02-04 13:31:34 -08:00
Jonathan Eads abd2c37bef fixed tests 2014-01-31 18:24:43 -08:00
vagrant 35be73269c made changes 2014-01-31 19:35:46 +00:00
jeads b6324455d0 Merge pull request #72 from mozilla/job-names
Job names
2013-11-22 11:28:20 -08:00
Jonathan Eads e090da8597 removed duplicate refdata fixture 2013-11-21 16:46:28 -08:00
mdoglio 5eea00d5b8 add bugscache ingestion and bugs suggestions artifacts 2013-11-21 14:31:57 +00:00
mdoglio c48ba29d06 merging updates 2013-11-21 14:29:19 +00:00
Cameron Dawson f9c9fa0aec tests now passing. seeing if they'll pass on the server. 2013-11-13 17:24:24 -08:00
mdoglio ab9a2e7268 optimized revisions lookups 2013-11-07 21:00:15 +00:00
Jonathan Eads 55caeafa6e webapp/api test changes 2013-11-05 09:09:26 -08:00
Jonathan Eads 5ef0f73327 adding handling for lists of data for all model methods 2013-10-25 17:17:01 -07:00
mdoglio 8fc8199675 make the tests pass and conditional job state update 2013-09-16 15:58:03 +02:00
mdoglio e48904c95e add resultset ingestion api endpoint 2013-09-04 15:38:59 +01:00
mdoglio edc52fd271 remove unuseful comment 2013-06-28 18:26:50 +02:00
mdoglio b7cf4d0b13 merge from master 2013-06-18 15:15:40 +02:00
mdoglio 1f0b3380e6 code cleaning 2013-05-15 13:54:42 +01:00
mdoglio 17d98479e2 add celery ecosystem 2013-05-13 19:19:19 +02:00
mdoglio 5de21fbc1d Merge branch 'master' into fix-test-isolation 2013-05-07 16:15:10 +01:00
mdoglio d4c17ea6db fix test isolation recreating db tables at every test setup 2013-05-01 11:50:55 +01:00
Cameron Dawson ce466a578d adding artifact test code and job model creation test code 2013-04-30 14:07:13 -07:00
Jonathan Eads b5f0c026c0 merged stuff 2013-04-26 15:42:16 -07:00
Jonathan Eads 1de79d9a2a merged 2013-04-26 14:34:20 -07:00
Cameron Dawson 08b4c24833 made the long test only run if '--runslow' option is used 2013-04-26 11:18:18 -07:00
Cameron Dawson 6e417c7831 removed bad function, merge from latest master 2013-04-25 17:41:24 -07:00
Jonathan Eads eaccfecd00 merged conftest.py 2013-04-25 16:13:06 -07:00
Cameron Dawson c86771e05b added test to ingest all sample jobs 2013-04-23 17:24:06 -07:00
Cameron Dawson e542309e02 fix merge conflicts 2013-04-19 18:06:00 -07:00
Cameron Dawson 1f0fb9a9b5 objectstore tests are now passing 2013-04-19 18:04:00 -07:00
Cameron Dawson 58d3591315 fixed fixture updates for JobsModel and most objectstore tests passing 2013-04-19 17:35:59 -07:00
Cameron Dawson 1a54dc6b26 fixed job fixture for tests 2013-04-19 10:58:46 -07:00
mdoglio 6d43a2fccb remove session scope from datasource test fixtures 2013-04-19 14:02:18 +02:00
Cameron Dawson 1290f6c646 base model generic to datasource now 2013-04-18 22:26:30 -07:00
Jonathan Eads eb1cbc90de changed fixture scope to session 2013-04-18 16:47:10 -07:00
vagrant 90b548da9a added fixture for sample data 2013-04-18 23:23:58 +00:00
Cameron Dawson a025220123 merge updates and test changes 2013-04-18 08:49:19 -07:00
Cameron Dawson bef1cbab6b merged from refdata 2013-04-17 09:38:40 -07:00
mdoglio dcb703dcf5 fix RefDataManager and add firts working test on it 2013-04-17 17:13:24 +01:00
Cameron Dawson f94c0d2796 fixed lots of datasource issues. still not working with the jobs model, however 2013-04-16 16:45:51 -07:00
Cameron Dawson ce6c095690 fixed circular reference in datasource.py by renaming it to sql_datasource.py 2013-04-16 16:08:06 -07:00
Cameron Dawson d1c0058a4e adding jobsmodel funcarg for pytests 2013-04-16 11:00:34 -07:00
mdoglio 6cf291cf1f merge changes from master into sql-datasource 2013-04-02 18:53:04 +01:00
mdoglio 3c77ab5f43 move webapp/models.py to model/models.py. 2013-04-02 18:16:13 +01:00
mdoglio 321a7c8cf3 remove unused import 2013-04-02 18:16:13 +01:00
mdoglio 78e9623098 remove cache.clear() from tests setup/teardown 2013-04-02 18:16:13 +01:00