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

832 Коммитов

Автор SHA1 Сообщение Дата
Ed Morley 1a9aa94eb4 Bug 1180052 - Include the job_id in the submission to ElasticSearch
So that OrangeFactor can use it to link to the log viewer (and more).
Also stop sending the dummy 'logfile' key, since it's not used by
OrangeFactor.
2015-07-06 16:34:38 +01:00
Ed Morley 15ebebe765 Bug 1180052 - Rename submit_timestamp to classification_timestamp
...when referring to the datetime that a classification was made. This
avoids confusion in ElasticsearchDocRequest, since previously we had
two similarly named variables: 'job_data["submit_timestamp"]' and
'self.submit_timestamp', the former referring to the time the job was
scheduled, the latter to the time the classification was submitted.
2015-07-06 16:34:38 +01:00
William Lachance 4465f41be8 Bug 1178970 - Add job group/type ids to return value of /jobs/ endpoint 2015-07-05 19:31:16 -03:00
Ed Morley a41c52dcbd Bug 1178235 - Fix test_buildapi.py so it doesn't hit the network
Fixes test_ingest_builds4h_jobs_1_missing_resultset to stop it from
accessing hg.mozilla.org during the test run, causing it to fail when
offline.
2015-06-30 22:58:30 +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 6b1e4f602b Bug 1178234 - Remove repository_version
Since it's unused, and hg.mozilla.org now has this information available
via its API.

Note: This commit depends on bug 1178719, to prevent issues during
deployment. Also, due to https://code.djangoproject.com/ticket/25036 a
migrate will need to be run interactively after deployment, to clean up
the old repositoryversion content type.
2015-06-30 14:16:47 +01: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
KWierso 35101264bc Bug 1158572 - Add a job name to non-buildbot classification bug comments 2015-06-30 12:16:58 +01:00
Ed Morley e9efcf8584 Bug 1178224 - Remove the unused result_set_artifact table 2015-06-30 01:39:45 +01:00
William Lachance 4a74b3704e Bug 1171707 - Fix locking when concurrently updating performance series
Before if two celery jobs were updating the same series, one would overwrite
the other because the locking code did not actually work (it just always
unconditonally got a new lock without checking if anything was using it).
This fixes that.
2015-06-29 15:03:44 -04:00
Mauro Doglio 1155e674a6 Bug 1177460 - add resultset status endpoint 2015-06-25 12:39:26 -07:00
Ed Morley 8637384d8c Bug 1175870 - Stop adding a "header" property to the text_log_summary
The header property is no longer used, since bug 1057341 made the log
viewer display job details from /jobs/ endpoint instead.
2015-06-18 18:21:50 +01:00
Cameron Dawson f92ba96cb2 Bug 1174192 - Allow specifying tier for a job from the client 2015-06-18 08:46:47 -07:00
Jonathan French fd42f301f7 No bug - Fix etl test_common comment 2015-06-18 09:37:39 -04:00
Ed Morley 140b5a76b1 Bug 1175882 - Prettify the json sample data
To make it easier to find the relevant lines when updating tests, as
well as clearer when reviewing the subsequent diffs.
2015-06-18 13:38:17 +01:00
Ed Morley ede44d579e Merge pull request #635 from ccooper/master
Bug 1160717 - add parsing for Horizon builds
2015-06-17 23:16:13 +01:00
William Lachance e1077aca41 Bug 1174877 - Updates to make perf alert analysis code useful for perfherder
* Using machine history is now optional (perfherder doesn't track it, and
  we don't think we need it)
* Performance datums, analyze_t take keyword arguments to make API more
  intuitive
* Various other minor updates to make code easier to understand
2015-06-17 14:59:56 -04:00
William Lachance eeba95595c Bug 1174877 - properly integrate graphserver analysis code into repo
* Create a proper setup.py so it can eventually be distributed on pypi
  (and installed locally meanwhile)
* Make relevant tests run along with the rest of treeherder-service's tests
* Remove dashboard, old graphserver business logic
2015-06-17 14:59:04 -04:00
Chris Cooper 4db8aa1e64 Bug 1160717 - add parsing for Horizon builds 2015-06-16 15:18:36 -04:00
Cameron Dawson bd868a2663 Bug 1172052 - handle text_log_summary artifact blobs that are both dicts and json strings 2015-06-09 11:14:51 -07:00
Cameron Dawson 567c3e6065 Bug 1170201 - Add required job_guid when adding artifacts to a client job object 2015-06-02 14:52:53 -07:00
Ed Morley 6055a63b16 Bug 1170636 - Fix log name typo in parse_status conditional 2015-06-02 22:50:38 +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
Ed Morley d6df689589 Bug 1166901 - Update the jasmine fixtures path after the repo merge
The fixtures path changed from:
webapp/test/mock/*
...to:
tests/ui/mock/*

However basePath in the Karma config was also changed from webapp/
to the repo root.
2015-05-27 22:18:21 +01:00
William Lachance fac87ff899 Bug 1163138 - Add a management command to allow importing perf data
This also extends treeherder client to handle performance data.
2015-05-27 11:54:57 -04:00
Joel Maher f6a5073e1a Bug 1156907 - migrate counters from graph server into treeherder 2015-05-26 16:17:49 -04:00
Cameron Dawson f598198c72 Bug 1151806 - Implement chunking for job ingestion - fixed 2015-05-22 16:00:44 -07: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 358e90f685 Bug 1080760 - Auto-generate bug suggestions asynchronously
This introduces two new ways to generate ``Bug suggestions`` artifacts from
a ``text_log_summary`` artifact
1. POST a ``text_log_summary`` on the ``/artifact`` endpoint
2. POST a ``text_log_summary`` with a job on the ``/jobs`` endpoint.

Both of these cases will schedule an asynchronous task to generate the
``Bug suggestions`` artifact with ``celery``.

Artifact generation scenarios:

JobCollections
^^^^^^^^^^^^^^
Via the ``/jobs`` endpoint:

1. Submit a Log URL with no ``parse_status`` or ``parse_status`` set to "pending"
    * This will generate ``text_log_summary`` and ``Bug suggestions`` artifacts
    * Current *Buildbot* workflow

2. Submit a Log URL with ``parse_status`` set to "parsed" and a ``text_log_summary`` artifact
    * Will generate a ``Bug suggestions`` artifact only
    * Desired future state of *Task Cluster*

3. Submit a Log URL with ``parse_status`` of "parsed", with ``text_log_summary`` and ``Bug suggestions`` artifacts
    * Will generate nothing

ArtifactCollections
^^^^^^^^^^^^^^^^^^^
Via the ``/artifact`` endpoint:

1. Submit a ``text_log_summary`` artifact
    * Will generate a ``Bug suggestions`` artifact if it does not already exist for that job.

2. Submit ``text_log_summary`` and ``Bug suggestions`` artifacts
    * Will generate nothing
    * This is *Treeherder's* current internal log parser workflow
2015-05-20 16:28:32 -07:00
Cameron Dawson e71e781565 Bug 1151806 - Implement chunking for job ingestion 2015-05-20 15:09:17 -07:00
Ed Morley 2efb703f16 Bug 1056877 - Update UI path references after directory moves
As part of merging the UI repo into this one, the following directory
moves were performed:
  webapp/app/                   ->  ui/
  webapp/test/                  ->  tests/ui/
  webapp/config/                ->  tests/ui/config/
  webapp/scripts/               ->  tests/ui/scripts/
  webapp/scripts/web-server.js  ->  web-server.js
2015-05-20 16:55:55 +01:00
Ed Morley 347592a10e Merge treeherder-ui into this repo 2015-05-20 12:03:05 +01: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
Ed Morley c223f2a094 Bug 1165702 - Remove webapp/logs/.gitkeep
The directory is empty apart from a .gitkeep, since it only exists to
house jstd.log, which is output by watchr.rb. I was going to move the
directory around in bug 1056877, but let's just delete it and move the
log file one directory higher up.
2015-05-18 12:18:03 +01:00
Jonathan French 19b71bc4b4 Bug 1164881 - Add MPL2.0 headers to recent treeherder repo files 2015-05-14 11:45:26 -04:00
Cameron Dawson 637552acb8 Bug 1163182 - refactor bug suggestions artifact generation 2015-05-12 11:12:52 -07:00
Cameron Dawson 037c5fccab Merge branch 'client-requests-take-2' 2015-05-05 14:19:44 -07:00
Cameron Dawson 19e333dd0d Bug 1144417 - Use requests rather than httplib in treeherder-client
Now implemented using the ``timeout`` param.  Same value as before with httplib.
2015-05-05 14:08:41 -07:00
Ed Morley bd97a4cb5c Bug 1154009 - Categorise OS X 10.7 jobs as 10.7 rather than 10.8
We were previously calling them OS X 10.8 for aesthetics in TBPL,
however it can cause confusion with developers. In addition, in
Treeherder the platform is not just used in the UI, but for downstream
analysis, so using the incorrect platform has more severe consequences.
2015-05-05 15:08:08 +01:00
Ed Morley 0530a8b0f7 Revert bfef91b (Bug 1080760 - Tests for bug suggestion artifact changes)
Since we're about to revert the functionality it tests.
2015-05-03 21:11:43 +01:00
Ed Morley efa98c7528 Revert most of 437a3c3 (the switch to requests in treeherder-client)
This reverts bug 1144417 (Treeherder-client using requests) apart from
the version bump hunk - for causing bug 1160856.
2015-05-03 20:54:49 +01:00
William Lachance 0e6e61fbbe Bug 1159831 - Make treeherder use in-tree copy of treeherder-client 2015-05-01 13:34:29 -04:00
Ed Morley 24be8651cb Bug 1159664 - Remove superfluous format param from resultset API calls
Since it's not even checked by the API.
2015-05-01 15:55:25 +01:00
Ed Morley 9e29351e6a Bug 1139941 - Remove leftover references to with_jobs URL parameter
Since it was removed in bug 1097090.
2015-04-30 09:59:01 +01:00
Ed Morley 1b5610407c Bug 1139941 - Remove references to obsolete with_jobs URL parameter
Since it was removed in bug 1097090 & so no longer does anything.
2015-04-30 09:58:13 +01:00
Cameron Dawson bfef91b71f Bug 1080760 - Tests for bug suggestion artifact changes 2015-04-28 13:06:14 -07:00
William Lachance 3efbfc5f3c Bug 1158973 - Batch digest updates when http requests return 2015-04-28 13:25:38 -04:00
Cameron Dawson 6b1279c9d0 Bug 1158878 - support job submission with pre-parsed logs
This supports ingesting job ``log_references`` that have a
``parse_status`` value.  This is so that external tools can submit jobs
that don’t require our internal log parsing.  They will then submit
their own log summary artifact.
2015-04-27 17:33:48 -07:00
camd 07ee8d0546 Merge pull request #471 from mister-raindrop/bug1139517
Bug 1139517 - Changes log name of buildbot logs from 'builds-4h' to 'buildbot_text'
2015-04-27 14:54:32 -07:00
Wes Kocher 6944b0c7ca Bug 1157945 - Add support for g2 jobs 2015-04-24 10:28:56 -07:00
Krishnashish Gogoi bc0b48b262 Bug 1139517 - Changes log name of buildbot logs from 'builds-4h' to 'buildbot_text'
This commit changes all the references to 'builds-4h' to 'buildbot_text'. Following
are the changed files along with the no. of occurences that have been changed in
each.

1. tests/etl/test_buildapi.py: 3 occurences
2. tests/sample_data/job_data.txt: 304 occurences
3. treeherder/etl/buildapi.py: 1 occurence
4. treeherder/model/sample_data/job_data.json.sample: 2 occurences

In treeherder/webapp/api/logslice.py, a conditional was removed. The todo above
it instructed it to be removed once this bug was addressed.

To make sure all tests run properly, three files were renamed. Only the portion
of the filename that said 'builds-4h' was changed to say 'buildbot_text'.
2015-04-23 06:18:19 +05:30
Ed Morley 8478629ef4 Bug 1056877 - Update links & puppet/Vagrant config for new repo name
The 'treeherder-service' repo has been renamed to 'treeherder', ready
for when the treeherder-ui repo is imported into it. This means the
Github URL, Travis URL and directory name when cloned changes. The Read
The Docs URL cannot be changed, so for now we will leave as-is, and in
the future (once service and UI docs combined) we will create a new
project on RTD with name "treeherder".

This updates doc links and puppet/Vagrant configs, but leaves the
stage/prod deploy script alone, since renaming the directories on our
infra is non-trivial. The dev instance will need some TLC since unlike
stage/prod, it does use the puppet scripts in the repo.
2015-04-20 22:00:04 +01:00
Cameron Dawson ed5a799302 Merge branch 'refactor-artifact-model' 2015-04-20 13:30:38 -07:00
Cameron Dawson 44511e4518 Bug 1154470 - refactor artifact handling into its own model 2015-04-17 10:56:44 -07:00
Ed Morley 21bbb4554b Bug 1153966 - Drive-by comment fixes 2015-04-14 00:22:24 +01:00
Ed Morley b1f14bb458 Bug 1153966 - Remove unused Pulse consumer code
Unlike the Pulse publishing, the code for consuming data from Pulse is
unused, being a leftover from initial attempts to ingest buildbot data
via pulse, rather than builds-{4hr,running,pending}.js
2015-04-14 00:21:50 +01:00
Ed Morley bddfcfed70 Bug 1153186 - s/TBPL_BUGS_TRANSFER_ENABLED/MIRROR_CLASSIFICATIONS/ 2015-04-13 18:55:35 +01:00
Ed Morley 0c12b0dd83 Bug 1153186 - Remove tbpl from test names 2015-04-13 18:55:32 +01:00
Ed Morley a3af89f2b8 Bug 1153186 - Rename OrangeFactorRequest BugzillaBugRequest
We're submitting to Elasticsearch (used by OrangeFactor), not directly
to OrangeFactor, so "Elasticsearch" is more appropriate. The use of
"Bug" in the name makes it sound like we're submitting a bug, which
we're not, we're submitting a bug comment (or ES doc) which contains a
number of different fields, in response to a classification entry made a
sheriff iff the classification included a bug number, which is slightly
different, and too nuanced to include in the name.

As such whilst not perfect, I think this is slightly clearer:
s/OrangeFactorRequest/ElasticsearchDocRequest/
and
s/BugzillaBugRequest/BugzillaCommentRequest/
2015-04-13 18:55:31 +01:00
Ed Morley 8c836a93fb Bug 1153186 - Use "classification_mirroring" in filenames instead of "tbpl"
These tasks no longer submit to TBPL, but to Bugzilla/Elasticsearch
directly, so this is a more appropriate name.
2015-04-13 18:55:30 +01:00
Ed Morley 929431c8ce Bug 1153138 - Simplify regex for l10n repack jobs
Now that the job names have been made more consistent by bug 740142, we
can simplify our regex again :-)

This is a direct revert of the last three hunks in:
d7abe14635
...plus appropriate updates to the job names in the tests.
2015-04-13 16:55:53 +01:00
Ed Morley 6524c37eab Bug 1153361 - Tests should not depend on a certain default repo value 2015-04-13 16:52:59 +01:00
Cameron Dawson c51409d34e Bug 1150734 - add signature field to jobs in job list
This allows for more precise filtering with the ``job`` (buildername)
link in the detail panel.
2015-04-09 08:05:46 -07:00
Ed Morley 94a081e480 Bug 1152681 - Mark test_parse_mozlog_log as xfail to make Travis green
We've disabled json log parsing, so we need to temporarily mark the
corresponding test as expected fail.
2015-04-09 12:19:20 +01:00
William Lachance 1ca8207dd0 Bug 1152376 - Create a top-level treeherder module seperate from application 2015-04-09 00:05:10 -04:00
Cameron Dawson d7abe14635 Bug 1150880 - add regex handling for l10n repacks 2015-04-07 16:16:00 -07:00
Cameron Dawson f3ee2a81fa Bug 1113322 - add support for tier-2 jobs 2015-03-30 11:52:26 -07:00
Ed Morley 5e4b356d25 Bug 1124613 - Log parser: Save the search terms used for bug suggestions
For debugging & also for when filing new intermittent failure bugs, it
is useful to see which search terms were extracted from a log failure
line, and used to query the bugscache for bug suggestions. In the future
this could be used by an intermittent bug filer to verify the bug
summary contained the term extracted for failures of that type.
2015-03-21 00:37:25 +00:00
William Lachance 7a07fdf4f9 Bug 1142648 - Zlib compress new job_artifact, performance_artifact blobs
Old uncompressed blobs will continue to work transparently
2015-03-20 13:01:31 -04:00
James Lal ecc808eed2 Bug 1144558 - Include build system type in job list / job output r=edmorley 2015-03-19 03:42:47 -07:00
William Lachance bb72eae791 Bug 1108832 - Fixes for summary series support
* Use a text column instead of varchar for storing series property (since the
subtest signatures can be quite long). Also stop indexing it.
* Update query for getting series signatures to not use a coallation (which
also has a size limit by default)
2015-03-16 13:27:05 -04:00
Jonathan Griffin 28f9895b60 Merge pull request #422 from mozilla/b2g_mochi_chrome
Bug 1142315 - Add support for B2G emulator mochitest-chrome
2015-03-11 17:09:25 -07:00
Jonathan Griffin a61409e0e7 Bug 1142315 - Add support for B2G emulator mochitest-chrome 2015-03-11 16:06:53 -07:00
Cameron Dawson 2bc1f0a017 Bug 1113873 - Test for structured log parser 2015-03-11 08:49:10 -07:00
Cameron Dawson ca84e4f373 Bug 1113873 - Change name of ``Structured Log`` artifact to ``text_log_summary``
This is to remove confusion between the REAL structured log and the generated
summary artifact for the textual logs.
2015-03-11 08:49:10 -07:00
William Lachance 5594b9a242 Bug 1108832 - Fix unit tests after disabling series summary 2015-03-09 11:09:11 -04: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 8d156fd9b4 Bug 1137162 - Allow spaces in TinderboxPrint link titles
Currently if a TinderboxPrint line contains a space in the link title,
eg in 'hazard results' here:
TinderboxPrint: hazard results: https://ftp-ssl.mozilla.org/...
...then we ingest it as content_type 'raw_html' rather than 'link'.
2015-03-03 18:14:40 +00:00
Ed Morley 5e0f36ae91 Bug 1133482 - Always ensure files are closed after being open()ed 2015-03-03 17:13:34 +00:00
Ryan VanderMeulen 4cd29c1f0a Bug 1136264 - Add support for parsing Android 4.3 jobs. r=edmorley 2015-03-03 11:46:21 -05:00
William Lachance b6eccbb4be Bug 1108832 - Calculate and store "summary series" in perfherder 2015-03-03 11:16:39 -05:00
Ed Morley 9b97fbd85e Bug 1059811 - Fix pyflakes unused variable warnings
test_resultset_api.py:294:5: F841 local variable 'email' is assigned to but never used
test_resultset_api.py:305:5: F841 local variable 'resp' is assigned to but never used
2015-03-03 02:34:44 +00:00
Ed Morley 05b3cebfa4 Bug 1059814 - Fix pep8/pyflakes E712, E713, E731, W503
Fixes:
tests/model/derived/test_jobs_model.py:343:23: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
treeherder/__init__.py:11:1: E731 do not assign a lambda expression, use a def
treeherder/etl/buildapi.py:107:16: E713 test for membership should be 'not in'
treeherder/log_parser/utils.py:183:33: W503 line break before binary operator
treeherder/model/derived/base.py:73:12: E713 test for membership should be 'not in'
treeherder/model/derived/base.py:82:12: E713 test for membership should be 'not in'
treeherder/model/derived/jobs.py:1998:26: W503 line break before binary operator
2015-03-03 02:34:40 +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
Steve Fink ff687fc65c Bug 1136309 - Document the new spidermonkey builds 2015-03-02 12:38:27 -08:00
Ben Hearsum e17782df53 Address review comment about regex ordering; try to add test. 2015-02-25 12:53:08 -05:00
Ed Morley 6fca7fe4ac Bug 1134916 - Fix tests that depend on jobs API response order
Tests that are not aimed at the jobs API should not be dependant on the
order of jobs returned by get_job_list().

* test_tbpl.py does not even need to use get_job_list() since the only
  accessed property is the job_id, which we are better off hard-coding.
* test_note_apy.py should use the job_id found earlier in the test,
  rather than hard-coding a wrong value.
* In test_bug_job_map_api.py, there is no ORDER BY clause for the stored
  get_bug_job_map_list query. The current test only happens to pass
  since the bug_job_map table currently uses the InnoDB engine, which
  default to the order of the primary key. Were our test environment and
  production bug_job_map tables to use different engines, the behaviour
  would silently change, so it seems wrong for the test to give the
  illusion of a guaranteed order. If in the future we wanted to give
  such a guarantee, we should add an ORDER BY to the
  get_bug_job_map_list query & update the test accordingly.
2015-02-23 13:38:38 +00:00
Ed Morley d6400a4115 Bug 1134916 - Make jobs API return jobs sorted by push_timestamp again
Bug 1097090 combined get_job_list and get_job_list_full, but the two
queries were actually subtly different. The former had an ORDER BY
push_timestamp, which was lost when they were combined. This means jobs
displayed in the similar jobs panel are from the past, and not the most
recent jobs of the same type.

The get_job_list query also sorted on platform, however I don't believe
this is necessary, so I've not added it back in here.
2015-02-20 18:56:14 +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
Mauro Doglio 813119fd2a Merge pull request #373 from mozilla/fix-fetch-all-param
Bug 1097090 - use config.fetch_all to activate job pagination
2015-02-19 16:03:29 +00:00
mdoglio 2c12c00d12 Bug 1097090 - add tests for ThJobModel.get_list 2015-02-19 15:55:20 +00:00
mdoglio 91df94cc80 Bug 1097090 - update tests to use the new job flat structure 2015-02-19 15:52:00 +00:00
Ed Morley 81037e85dc Bug 1060312 - The sample config is optional, so don't use it for tests
The sample config now points at the production service API to make
the first-run experience for new contributors easier. However the tests
use the sample config as part of the test run, so this breaks them.
However since the sample config is now optional, we can just not use it
at all during the tests to fix the failures.
2015-02-18 18:46:23 +00:00
Ryan VanderMeulen e324be19d1 Bug 1133836 - Add support for parsing Android 4.4 jobs. r=edmorley 2015-02-17 20:11:01 -05:00
Ed Morley 9ce4733946 Bug 1078415 - Log parser: Only record the first 100 error lines per step
To avoid logs with excessive number of lines that match the error regex
from taking up too much space in the DB & also making the API response
and thus UI unwieldy, we cap the number of error lines at 100 per step
of the job. The 'errors_truncated' property can be used by the UI to
indicate that the error lines are only a subset of the total failures.
2015-02-16 21:10:57 +00: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
Ed Morley 4e4ef16df5 Bug 1114785 - Limit the total length of comments submitted to Bugzilla
Bugzilla comments can be no more than 65535 characters in length. To
both avoid hitting this limit (and the comment being rejected) and to
reduce the spam left on bugs, truncate the comment body at 40000
characters.
2015-02-13 23:06:54 +00:00
Cameron Dawson 698fd05519 Bug 1119479 - Upgrade to Django 1.7 2015-02-10 11:34:07 -08:00
Mauro Doglio 88fc50e267 Merge pull request #369 from mozilla/add-ref-data-name-to-jobs-endpoints
Bug 1097090 - Re-add ref_data_name to jobs endpoints
2015-02-09 11:17:59 +00:00
Cameron Dawson 38ccdb9c31 Bug 1097090 - Re-add ref_data_name to jobs endpoints
This field is required to filter in the ui by buildername.
2015-02-06 13:27:52 -08:00
mdoglio fbb52f1dc8 Bug 1097090 - fix jobs pagination
This is to cover those cases where we have more than 2000 jobs either on
a single push or on a periodic update; it also sync the number of jobs
requested to the limit imposed by the service (again, 2000)
2015-02-05 16:32:16 +00:00
Ed Morley e61738b5a9 Bug 1127940 - Remove the now unused get_bug_job_map_detail()
BugzillaBugRequest was the only consumer, so we can now remove it.
2015-02-05 01:48:54 +00:00
Ed Morley 4437066892 Bug 1127940 - Pass 'who' directly to BugzillaBugRequest to avoid DB race
We did not previously pass the username of the person who made a failure
classification to BugzillaBugRequest. As a result, BugzillaBugRequest
has to fetch the bug mapping again to find it out. After the fix for our
master-read DB setup, this fetch of the bug mapping was being performed
against the read host, which occasionally did not yet have the requested
mapping (due to replication delay) causing an ObjectNotFoundException.

The 'get_bug_job_map_detail' query could have been switched to use the
master host to avoid the race, however the more efficient fix is just to
pass the username to BugzillaBugRequest directly, like we already do for
OrangeFactorBugRequest, avoiding the query entirely.
2015-02-05 01:48:53 +00:00
mdoglio 808de144d7 Bug 1097090 - jobs endpoint refactoring 2015-01-30 11:30:34 +00:00
mdoglio 119407ad8e Bug 1097090 - jobs endpoint refactoring
Main changes:
- removed the full parameter on the jobs endpoint, since in both cases the data returned had similar shape/size but slightly different set of attributes.
- removed the exclusion_state parameter in favour of exclusion_profile. The latter allows to specify which profile to apply to the jobs; by default it will use the default profile and can be disabled using exclusion_profile=false
- the data is now returned as a flat list instead of a triple nested structure. As a result the jobs endpoint is now much faster to return data and it allows to easily do basic operations like filtering, sorting, and pagination. Also, it will allow to implement attribute selection with a minimal effort.
- removed the debug parameter in favour of a more explicit return_type (dict|list) that allows a consumer to specify the type of structure expected for the results (dict by default)
- the resultset endpoint doesn't return jobs anymore but only resultsets.
2015-01-30 11:27:05 +00:00
Ed Morley 20dbcf8545 Merge pull request #353 from Seinlin/bug-1126137
Bug 1126137 - Add dolphin-512 to treeherder-service.
2015-01-28 02:40:08 +00:00
Kai-Zhen Li a4e4c78991 Bug 1126137 - Add dolphin-512 to treeherder-service. 2015-01-28 09:54:57 +08:00
Ed Morley de6a0557bc Bug 1059811 - Fix remaining pyflakes warnings 2015-01-27 15:21:07 +00:00
Ed Morley c8b1c70f30 Bug 1125464 - Set host_type for test_bugscache correctly 2015-01-24 21:38:37 +00:00
Ed Morley c96f3af904 Bug 1125464 - Fix key name for specifying master vs read-only DB host
The 'host' property is unrecognised (and ignored) by Datasource, causing
it to silently fall back to the default of 'master_host'. The property
we needed to have set is in fact called 'host_type'.

As a result, we never use the read-only host!

An issue has been filed against Datasource for making this less silent:
https://github.com/jeads/datasource/issues/20
2015-01-24 19:30:18 +00: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 539a5ef807 Bug 1124737 - Add support for 10.6-specific Talos other 2015-01-22 21:36:07 +00:00
Ed Morley 452af2e45a Bug 1121670 - Use search() instead of match() for search term leak regex
Since we were missing leak failure messages that were prefixed with the
process name, eg:
"... | leakcheck | tab process: 42114 bytes leaked (...)"

Using .search() is quicker than using .match() with '.*' prefixed to the
regex - see https://bugzilla.mozilla.org/show_bug.cgi?id=1076770#c1
2015-01-22 13:18:40 +00:00
Cameron Dawson da4d0361a7 Bug 1124270 - fix parsing step dates without decimal
sometimes the dates in the buildbot steps are not quite the format we
expect.  Massage them to match so we don’t fail log parsing.
2015-01-21 10:57:57 -08:00
Ed Morley 9350fc3368 Bug 1086663 - Make the TinderboxPrint regex less strict about whitespace
So that we don't miss "Built from revision X" and other TinderboxPrints.
2015-01-16 20:00:15 +00:00
Ed Morley 33475f12d3 Bug 1085100 - Use start_time instead of classification time in bug comments
Previously classifying failures with a bug number would add a comment to
the bug that listed the datetime of classification. However this is
redundant, since it's virtually the same as the datetime of the bug
comment itself. Instead, it's more useful to list the job start time.

Only classifications for completed jobs are submitted to Bugzilla, so we
do not need to add handling for pending jobs, that do not have a start
time.
2015-01-16 12:38:26 +00:00
Ed Morley 6bf711fb4a Bug 1059811 - pyflakes: Remove unused variables 2015-01-16 12:33:32 +00:00
Ed Morley b0d1c0c168 Bug 1059811 - pyflakes: Remove unused imports 2015-01-16 12:33:32 +00:00
Ed Morley debe98d0da Bug 1121003 - Add support for 10.6-specific Talos tests 2015-01-16 00:23:13 +00:00
Chris Manchester 9a15853f73 Bug 1121125 - Add marionette e10s tests to treeherder. 2015-01-13 16:00:08 -05:00
Kim Moir 1a7ef01e45 Bug 1119412 - Add support for OS X 10.10 2015-01-12 17:29:48 +00:00
Ed Morley 912d4f3fb0 Bug 1069502 - Submit OrangeFactor data to ES directly
Mappings of bug IDs to failures are currently mirrored to ElasticSearch
for use by OrangeFactor, until OrangeFactor is rewritten to use
Treeherder's DB directly. This patch makes Treeherder submit these
mappings directly to the ElasticSearch instance, rather than doing so
via TBPL's starcomment.php - so that TBPL can be switched off. For
TBPL's implementation, see:
https://hg.mozilla.org/webtools/tbpl/file/eb654a2734c3/php/starcomment.php
2015-01-07 18:23:58 +00:00
Ed Morley bc8be62ef5 Bug 1118266 - Remove '/ui' from logviewer URLs in TBPLbot comments
Leftover from bug 1063411.
2015-01-07 12:33:21 +00:00
Mauro Doglio cfaae9f724 Merge pull request #312 from mozilla/bug-1117807-requests-throttling
Bug 1117807 - Setup requests throttling
2015-01-07 12:21:58 +00:00
mdoglio f5aa1d3a9f Bug 1101040 - filter jobs by last_modified 2015-01-06 15:39:24 +00:00
Ed Morley 7240662a05 Bug 1096765 - Prevent 32bit talos other_nol64 being categorised as 64bit 2015-01-06 09:24:58 +00:00
mdoglio 34b627847c Bug 1117807 - Setup requests throttling 2015-01-05 18:34:59 +00:00
Ed Morley 839091632e Bug 1069560 - Submit comments directly to Bugzilla rather than via TBPL 2015-01-05 16:03:41 +00:00
mdoglio 18bf5bf5fd Bug 1112554 - set thServiceDomain to current host 2014-12-17 16:41:40 +00:00
Ed Morley 84a9f8c1a7 Merge pull request #297 from ahal/code_coverage_platform_name
Bug 1056236 - Add a new code coverage build type
2014-12-10 22:21:39 +00:00
Andrew Halberstadt b8d9084b61 Bug 1056236 - Add a new code coverage build type 2014-12-10 16:59:24 -05:00
Jordan Lund c7a7ad50ed Bug 1078265 - Add support for split Android APK - splits off api-11 now 2014-12-10 12:20:57 -08:00
William Lachance b0fa2c063e Bug 1108831 - Make sure we ingest all talos data
We were ignoring all but the first suite before
2014-12-09 18:11:25 -05:00
mdoglio 06f62d21f6 Bug 1102228 - Improve the data cycling routine
Added several parameters to the cycle_data shell command: cycle-interval (in days),
chunk-size (in number of result sets), sleep-time (in seconds).
I made the cycle_data task a very thin wrapper around the shell command,
there is no more logic in it.
All the queries for data cycling are executed with the retry logic to
handle db deadlocks
2014-11-26 16:38:18 +00:00
mdoglio 0e19a402ca Bug 1102257 - Store the data cycle interval in the settings file 2014-11-21 15:38:32 +00:00
Ed Morley 5f0c9f7e05 Bug 1095624 - Support mochitest-gl-N 2014-11-13 01:29:11 +00:00
William Lachance 063310ee11 Bug 1090484 - Provide max perf artifact id in project api endpoint 2014-11-11 18:12:11 -05:00
Ed Morley 05cf876d4a Bug 1078239 - Fix bug suggestions for recently modified, resolved bugs
We divide bug suggestions for a search term into 'open_recent' and
'all_others'. The former is supposed to be group #1 below, and the
latter groups 2-4, with the summation of the two groups corresponding
to every bug whose summary matches the search term.

1) Open + recently modified
2) Open + not recently modified
3) Resolved + recently modified
4) Resolved + not recently modified

However prior to this patch group #3 was not being returned at all, when
it should have been included in all_others.
2014-11-10 15:51:06 +00:00
mdoglio 0611b880ff Bug 1090284 - Add a test to verify that the last push is cached 2014-11-10 14:50:25 +00:00
Mauro Doglio 0d5b02daf5 Merge pull request #279 from tojonmz/add-headers
Bug 1090689 - Add MPL2.0 headers to the repo
2014-11-10 14:46:25 +00:00
Ed Morley 0d586fd2f1 Bug 1072377 - Add another test for truncated test name bug searches 2014-11-10 13:50:02 +00:00
Ed Morley 93e0c98999 Bug 1091643 - Add tests for SQL LIKE escaping of search_term
Test that we are treating the search term literally in the LIKE
statement, and so have correctly escaped any underscores, percent signs
or escape symbols.
2014-11-10 13:50:02 +00:00
Ed Morley b2ffa4d61f Bug 1091643 - Add test for truncated test name bug searches 2014-11-10 13:50:01 +00:00
William Lachance fed30e6e62 Merge pull request #277 from wlach/1092232
Add minimal unit test for talos perf artifact ingestion
2014-11-07 15:05:10 -05:00
Jonathan French dbb4d11e09 Bug 1090689 - Add MPL2.0 headers to the repo 2014-11-03 13:06:03 -05:00
William Lachance 8fae856593 Bug 1092317 - Minor performance log parsing fixes (with tests) 2014-10-31 15:59:05 -04:00
Jonathan French c93f507e81 Bug 1090689 - Add MPL2.0 headers to the repo 2014-10-31 14:31:25 -04:00
William Lachance bec5d48486 Bug 1092232 - Add minimal unit test for talos perf artifact ingestion 2014-10-31 13:55:40 -04:00
Mauro Doglio 23ee49570d Merge pull request #268 from mozilla/mysql-retry
Mysql retry
2014-10-30 15:07:33 +00:00
Ed Morley d7f9350560 Bug 1091579 - Rename SEARCH_TERMS to BUG_SEARCHES 2014-10-30 13:07:07 +00:00
Ed Morley 0c8318eb51 Bug 1091579 - Remove the now redundant test_get_all_other_bugs_wrong_term() 2014-10-30 13:07:06 +00:00
Ed Morley 33e6ca8906 Bug 1091579 - test_get_all_other_bugs() should check the bug IDs
...rather than just whether the count of bugs is greater than zero.
2014-10-30 13:07:05 +00:00
Ed Morley 513d3d0c55 Bug 1091579 - Parametrize test_get_all_other_bugs() 2014-10-30 13:07:05 +00:00
Ed Morley 6cb45262e7 Bug 1091579 - Combine the tests for correct and incorrect search terms 2014-10-30 13:07:04 +00:00
Ed Morley 8b803b10f3 Bug 1091579 - test_get_open_recent_bug_right_term() should check the bug IDs found
...rather than just whether the count of bugs is greater than zero.
2014-10-30 13:07:04 +00:00
Ed Morley 110c5fe619 Bug 1091579 - Parametrize test_get_open_recent_bug_right_term() 2014-10-30 13:07:03 +00:00
Ed Morley c1faeda8a7 Bug 1091579 - Correct & reformat comments in test_refdata.py 2014-10-30 13:07:02 +00:00
Ed Morley e33a76081a Bug 1059686 - Add test for truncating test name style search terms 2014-10-29 22:08:39 +00:00
Ed Morley 0d32390b97 Bug 1059686 - Add tests for the search term full error line fall-back
Test that the full error line is used as a fall-back search term if no
test name was found, or the name found was in the blacklist.
2014-10-29 21:57:04 +00:00
Ed Morley bfd26e60be Bug 1059686 - Add tests for the search term blacklist 2014-10-29 21:57:03 +00:00
Ed Morley 817263d30b Bug 1059686 - Add search term tests for pipe-delimited log error lines 2014-10-29 21:57:03 +00:00
Ed Morley e1308fec8b Bug 1059686 - Correct the name of the leak error search term test
The current test is checking the extraction of the search term for the
leak case, not the standard test error case.
2014-10-29 21:57:02 +00:00
Ed Morley 233764c02b Bug 1059686 - Remove excess newlines in test_utils.py 2014-10-29 21:57:02 +00:00
camd 19c7ad81d1 Merge pull request #270 from wlach/max-job-id
Bug 1090484 - Add support for getting maximum job id for a project
2014-10-29 13:56:45 -07:00
William Lachance a04bd564ab Bug 1090484 - Add support for getting maximum job id for a project 2014-10-29 15:08:54 -04:00
Ed Morley 74e9f9b669 Fix comment typo in test_tasks.py 2014-10-29 17:15:27 +00:00
Cameron Dawson 9d098e8ade bug 1089782 - fix retry limit and add test 2014-10-28 14:54:26 -07:00
camd f4e979a248 Merge pull request #261 from mozilla/bug-1076769-parse-log-on-demand
Bug 1076769 parse log on demand
2014-10-27 10:41:56 -07:00
Ed Morley 8b995f931a Bug 1075527 - Add support for Mochitest content sandbox tests 2014-10-27 14:07:40 +00:00
Ed Morley 194fc73492 Bug 1080250 - Add support for Windows 8 x64
Treeherder equivalent of:
https://hg.mozilla.org/webtools/tbpl/rev/547a7de112ac
plus the followup bug 1085549.
2014-10-22 14:26:02 +01:00
Ed Morley 816989f56f Bug 1078265 - Add support for split Android APK jobs
Treeherder equivalent of:
https://hg.mozilla.org/webtools/tbpl/rev/c60baf450cde
2014-10-22 14:24:01 +01:00
Cameron Dawson 5dcc50b6de Bug 1085531 - fix typo in tests 2014-10-20 12:36:44 -07:00
Cameron Dawson d70efd4e7f Bug 1085531 - fix test for builds4h missing. 2014-10-20 12:31:44 -07:00
Cameron Dawson 87ed7eac86 Bug 1085531 - Fix case of missing branch param on builds4hr, with test 2014-10-20 11:46:17 -07:00
camd b1adcd4a55 Merge pull request #246 from mozilla/queue-missing-resultsets2
Bug 1077136 - Queue missing resultsets2
2014-10-20 08:48:19 -07:00
camd d4bbb0475d Merge pull request #253 from mozilla/bug-1081600-investgate-job-group-update
Bug 1081600 - add a test to confirm the behaviour of job type/job group ...
2014-10-20 08:36:11 -07:00
Cameron Dawson 205e1f03fd Bug 1084608 - removed unused js libraries from karma.conf.js 2014-10-17 17:22:48 -07:00
Cameron Dawson 57a6fb8486 Bug 1084608 - fixed karma tests by removing angular-scenario 2014-10-17 17:19:05 -07:00
Cameron Dawson 9e414b8a61 bug 1077136 - added test and fixed when RS didn't get set to 'onhold' 2014-10-17 14:02:30 -07: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 70c85484cd Bug 1081600 - add a test to confirm the behaviour of job type/job group associations 2014-10-16 12:16:15 +01:00
Cameron Dawson bb84435786 Merge branch 'master' into queue-missing-resultsets2 2014-10-15 11:29:29 -07:00
jeads 8177591cfe Merge pull request #248 from mozilla/bug-1080219-consolidate-load-job-artifacts
Bug 1080219 - Refactor job artifact ingestion and fix performance data i...
2014-10-14 13:19:18 -07:00
Jonathan Eads 2ab901bb97 Bug 1080219 - Added performance data log parsing tests 2014-10-13 16:45:10 -07:00
Cameron Dawson 914ef7c7f1 Bug 1077136 - fix resultset with missing revisions on ingestion
also fix broken tests
2014-10-13 16:38:38 -07:00
Jonathan Eads ab1bd6a3c0 Bug 1080219 - Fix broken tests, add comments 2014-10-13 13:38:29 -07:00
Mauro Doglio ec6f20d588 Merge pull request #239 from mozilla/bug-1016117-vendor-updates
Bug 1016117 - Added/updated vendor libs to support publishing to pulse
2014-10-13 11:51:14 +01:00
Ed Morley bd3a7f85e5 Merge pull request #245 from mozilla/bug-1076752
Bug 1076752 - Add test for pushlog ingestion
2014-10-13 11:46:35 +01:00
Jonathan Eads 94bbbfb183 Bug 1016117 - Added/updated vendor libs to support publishing to pulse 2014-10-10 18:08:45 +01:00
Cameron Dawson 89639f96ae Bug 1077136 - fix builds4hr tests and improve tasks per feedback 2014-10-08 12:32:38 -07:00
Cameron Dawson 9cf09d8372 bug 1077136 - test passing for ingestion 2014-10-08 12:26:08 -07:00
Cameron Dawson 3a1ae7df29 Bug 1077136 - fix urlencode params for changesets 2014-10-08 12:26:08 -07:00
Cameron Dawson 4cad93d0a7 Bug 1077136 - test for new missing resultset task 2014-10-08 12:26:08 -07:00
mdoglio 926df47e62 Bug 1076752 -add test for pushlog ingestion 2014-10-08 18:54:36 +01:00
Ed Morley c370f477e2 Bug 1078670 - Add support for Win32 Mulet builds
The regex for the windows jobs was pre-emptively added by bug 1016448,
but the job names changed slightly since then. Also adds missing tests
for Mulet platforms.
2014-10-07 14:44:16 +01:00
KWierso 68acafed7e Bug 1067482 - Add support for Android Instrumentation tests 2014-09-29 11:15:18 -07:00