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

832 Коммитов

Автор SHA1 Сообщение Дата
Ed Morley 82bf0378fb Bug 1181572 - No longer return pending_eta from the jobs endpoint
The UI does not use pending_eta as of bug 1096605, so there's no need
for it to be returned by the /jobs API endpoint.
2015-08-21 10:05:52 +01:00
Chris Manchester 7d4e37cf1e Bug 1196464 - Change symbol for split of Cpp and GTest jobs. 2015-08-20 18:49:17 +01:00
Mauro Doglio 1ab14030ce Bug 1181879 - upgrade django to 1.8.4 2015-08-19 19:53:55 +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 3d21e5bbb2 Bug 1188444 - Add tests for parsing steps/errors from Taskcluster logs
This test checks that:
* log content that falls in-between two step markers is captured in a
  dummy unnamed step.
* if the final step is missing the "step finish" marker, we still save/
  update the step and append any step errors to all_errors.
2015-08-18 17:21:10 +01:00
Ed Morley 095fc79e62 Bug 1188444 - Remove support for multiple parsers per ArtifactBuilder
Since we only have one parser per ArtifactBuilder currently, and are not
likely to ever have any more.
2015-08-18 17:21:02 +01:00
Ed Morley 79e7a4eced Bug 1188444 - Remove check_errors parser option since it's always true
Bug 1060339 made check_errors always be true, since we want to parse all
logs, not just those for failing jobs. As such, we have no use for
check_errors.
2015-08-18 17:21:01 +01:00
Ed Morley 118550c3bf Bug 1062995 - Fix test creation in test_log_view_artifact_builder.py
Previously the tests were created after act["logurl"] was deleted, so
the resultant expected output .json file was missing the "logurl" key.
The json import was also missing - people now just have to uncomment the
test creation block, and not also add the missing import each time.
2015-08-15 11:15:10 +01:00
Ed Morley cc52bf7f35 Bug 1194722 - Deleted uncompressed logs in sample_data
Since they are duplicates of the compressed versions, and unused.
This will also avoid them appearing in grep results.
2015-08-14 15:40:08 +01:00
Ed Morley 475f427860 Remove duplicate imports in conftest.py 2015-08-12 09:31:26 +01:00
Ed Morley e22853f090 Bug 1060765 - Add tests for the log parser error line regex 2015-08-11 17:04:48 +01:00
Ed Morley 27c024d22b Bug 1060765 - Move the error summary tests to tests/model/
Since the code they are testing was moved to the models directory, as
part of bug 1163182.
2015-08-11 17:04:47 +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
Justin Wood 5ae5c4909d Bug 1191481 - Add windows 10 support 2015-08-08 12:23:35 +01:00
William Lachance e5b97151e1 Bug 1184966 - Incorporate optional "value" parameter for subtests 2015-08-07 13:24:46 -04:00
Joel Maher 61a4291292 Bug 1184966 - perfherder should let harness do summarization 2015-08-07 13:17:56 -04:00
Vaibhav Agrawal e3b276268c Bug 1121998 - Add the ability to retrigger all pinned jobs 2015-08-06 07:29:01 -07:00
William Lachance 3227bafee9 Bug 1188132 - Further fixes to make (talos) log parsing more robust
* Simplify logic in talos parser (there was an optimization which didn't
  save anything and just caused confusion before)
* Make it so if log parsing fails for a non-http reason, we don't try
  again
2015-08-05 10:41:32 -04:00
Mauro Doglio e73ce6b3fd Bug 1185520 - wrap the legacy oauth verification in drf authentication and permission classes 2015-08-05 15:13:56 +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 cbba97221a Bug 1188832 - Fix intermittent Travis test failure in test_note_api
The sample notes added for the test normally have the same timestamp for
several notes, but not always. With the previous `ORDER BY`, this meant
the list of notes retrieved could vary in order depending on if the
timestamps were identical. We now additionally sort by id (descending,
to match the timestamp sort), so the returned list is deterministic.
2015-07-30 16:55:25 +01:00
Ed Morley a49c98b180 Bug 1186357 - Remove the deprecated objectstore endpoint
Since bug 1140349, the objectstore endpoint has been deprecated, and
performs the same function as the jobs endpoint. Now that there are no
remaining submitters to it, let's remove it.
2015-07-30 13:19:30 +01:00
William Lachance 4a6d9ca5a6 Bug 1188132 - Don't retry log parsing for invalid TALOSDATA log lines
Since if it failed the first time, it's always going to fail.
2015-07-28 14:55:32 +01:00
Ed Morley 60294d05fd Revert "Bug 1185520 - wrap the legacy oauth verification in drf authentication and permission classes"
This reverts commit e5484eed06.
2015-07-24 21:24:18 +01:00
Joel Maher 83fb41b132 Bug 1168360 - fix osx talos tp/tp-e10s 2015-07-24 10:03:54 -04:00
Mauro Doglio e5484eed06 Bug 1185520 - wrap the legacy oauth verification in drf authentication and permission classes 2015-07-24 13:41:35 +02:00
Joel Maher 0be9fc2a6b Merge pull request #802 from jmaher/osxe10s
Bug 1168360 - add symbols for osx e10s jobs to treeherder, remove old…
2015-07-23 14:14:02 -04:00
Joel Maher f6d14287f9 Bug 1168360 - add symbols for osx e10s jobs to treeherder, remove old test definitions 2015-07-23 09:30:10 -04:00
Mauro Doglio e3d4c3162d Bug 1145720 - Setup api versioning 2015-07-23 15:27:21 +02: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
Ed Morley befa35b1e9 Bug 1178240 - Cache previously seen builds-{pending,running,4hr} jobs
To avoid continually attempting to re-ingest them, thereby reducing
task runtime and database load.

In order to make this behaviour easier to test, the
pending/running/build4hr jobs process run() method now returns True if
new jobs were loaded, and False otherwise. This method was used instead
of calling the transformer mixins from the test directly, since the test
would then have had to reimplement much of the run() method anyway.
2015-07-22 16:55:26 +01:00
Ed Morley 3f93689e0c Bug 1178240 - Whitespace cleanup in test_buildapi.py 2015-07-22 16:55:24 +01:00
Ed Morley 9c2b5cc55b Bug 1178240 - Clean up buildapi imports 2015-07-22 16:55:24 +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
camd 1d934685c1 Merge pull request #757 from chmanchester/tsan-builds
Bug 1181255 - Make treeherder aware of a tsan build type.
2015-07-16 16:31:22 -07:00
Ed Morley 1af312e0cc 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.

The deployment script also had to be updated, so that we set the
prod/stage-specific environment variables before using manage.py, since
dj-database-url cannot rely on what's in the stage/prod local.py config
(which isn't a bad thing, since we're deprecating that file).
2015-07-15 14:58:46 +01:00
Mauro Doglio 3f34e5da13 Bug 1145712 - upgrade django-rest-framework from 2.4.5 to 3.1.3
This patch upgrades the version stored in the requirements file and fixes some issues introduced by breaking changes in the new version of the library:
 - Writable nested fields are not available anymore, you need an explicit create method on the serializer to write a nested field.
 - ModelViewSet now requires serializer_class and queryset attributes.
 - @action and @link decorators are now replaced by either @detail_route or @list_route.
 - any attempt to create a ModelSerializer instance with an attribute which type is either dict or list will raise an exception.
2015-07-15 10:34:46 +01:00
Chris Manchester 287738dd8b Bug 1181255 - Make treeherder aware of a tsan build type. 2015-07-14 14:02:50 -07:00
Cameron Dawson ad4f87b131 Bug 1140349 - Skip and drain the objectstore
Since we use Celery for queueing job ingestion, the objectstore is
now irrelevant.  This code is the first step.  This will bypass
the Objectstore and ingest jobs directly to our ``jobs`` database.

Phase 2 is to remove all the Objectstore code (in a later commit)

Phase 3 is to delete the Objectstore databases and related fields in
other tables.
2015-07-14 11:03:11 -07:00
William Lachance 61904aaffa Bug 1182282 - Handle submissions of duplicate performance data
It appears that on occasion we parse a log more than once, which
resulted in duplicate performance series going into the database.
Let's be resilient about this by not inserting duplicate jobs into the
database (we always attach a unique job id to every datapoint, so there's
no chance of accidentally removing entries which happen to have the same
performance numbers)
2015-07-13 13:32:26 -04: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 a295fcb0f7 Bug 1182372 - Pass the database SSL options to MySQLdb.connect()
Since otherwise we get access denied errors using run_sql on Heroku.
All other calls use datasource, so have already been set up to pass the
SSL options.
2015-07-10 21:57:14 +01:00
camd f4acb8777b Merge pull request #704 from chmanchester/cpp_gtest
Bug 1179958 - Add Cpp + GTest symbol to treeherder for combined Cpp a…
2015-07-09 17:32:10 -07: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 c4c660f277 Bug 1182201 - Compress blobs in the performance_series table
Since they can be up to 800+ KB in size and whilst there are not many
rows in the table, if they are not compressed it bloats the binlogs.
2015-07-09 22:40:55 +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
Chris Manchester 3431e61614 Bug 1179958 - Add Cpp + GTest symbol to treeherder for combined Cpp and Gtest job. r=camd 2015-07-08 16:36:35 -07:00
William Lachance 06a746c706 Bug 1170301 - Improve display of information in compare performance
* Put # of runs directly beside average/geomeans in UI, and put a dotted
  line underneath to make it easier to pull up tooltip
* Use a bootstrap tooltip for displaying run information (clearer)
* Use a bootstrap abbreviation to make it more clear what low/med/high
  confidence actually means
2015-07-08 14:12:36 -04:00
Ed Morley 0f3d1b2bcf Bug 1179214 - Stop storing the list of files changed in a revision
Since we're not currently using it, and the schema we need will likely
be different if we were to start using it in the future.
2015-07-08 10:52:15 +01:00
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