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

832 Коммитов

Автор SHA1 Сообщение Дата
Ed Morley 9f84698e47 Bug 1213857 - Update tests still using TreeherderAuth to use client_id
TreeherderAuth is deprecated, so this switches these tests to use
the new hawk client_id and secret parameters instead.
2015-10-14 12:47:48 +01:00
Ed Morley 892a6d9751 Bug 1213857 - Allow passing Hawk client_id/secret directly to the client
So people don't have to deal with HawkAuth themselves. The existing
`auth` is deprecated and will be removed in the future.
2015-10-14 12:47:47 +01:00
Tiramisu 1993 dbbc101cd0 Bug 1205674 - Remove decompress_if_needed() 2015-10-14 14:24:55 +08:00
Cameron Dawson e363a40c56 Merge branch 'api-handle-40-char-revisions' 2015-10-13 11:02:13 -07:00
Cameron Dawson f21498c8cc Bug 1214039 - Handle either 12 or 40 char revision hashes in resultset API 2015-10-12 17:06:54 -07:00
Ed Morley 900ee1a1e4 Bug 1211905 - Add support for mochitest-ally
And add a test for chunked mochitest-chrome.
2015-10-12 23:18:03 +01:00
Ed Morley 5bd8132ee2 Bug 1213847 - Deprecate passing the auth object to the client's methods
Since with the new per-user Hawk credentials, the same auth object can
be used for the whole session, so should just be passed when
instantiating TreeherderClient.
2015-10-12 16:11:19 +01:00
Ed Morley 83730509b9 Bug 1213847 - Remove superfluous newlines in the client/client tests 2015-10-12 16:11:19 +01:00
Dustin J. Mitchell 9379fedaf0 Bug 1181153: use the new treestatus in RelengAPI 2015-10-12 16:03:37 +01:00
Ed Morley 4196822599 Bug 1211715 - Remove the device table 2015-10-10 23:04:15 +01:00
William Lachance d3bd244b65 Bug 1175295 - Add support for submitting generic performance artifacts 2015-10-08 16:23:20 -04:00
William Lachance 77558b2e86 Bug 1175295 - Reorganize performance data adapters
The "performance adapter class" never stored any persistent state, so
let's just refactor it into a bunch of standalone methods. Easier to
understand and reason about.
2015-10-08 15:41:15 -04:00
William Lachance 26c6cf0972 Bug 1175295 - Clean up performance data adapters
* Put talos-specific stuff in the talos data adapter
* Put generic stuff in the generic adapter, in preparation for creating
  a generic perfherder data ingestion path
* Add some explanatory comments
* Use better casing for static defines
* Remove some now-unused code related to json float encoding
2015-10-08 15:39:21 -04: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 a170d6c047 Bug 1212447 - Allow setting the data retention time via an env variable
By storing the duration as an int rather than a timedelta, we can set it
via the environment, rather than having to rely on local.py.

The variable has also been renamed to ease the transition and also make
its purpose clearer. Prod/Heroku use the default duration, and stage has
already had DATA_CYCLE_DAYS set to 45 in its environment, for parity
with the old stage local.py DATA_CYCLE_INTERVAL setting.
2015-10-08 12:13:19 +01:00
Ed Morley 97b64ea845 Bug 1209200 - Update test to take into account changes from bug 1211253
The PR's test run was green but yet failed once merged to master,
because Travis had run the merge tests prior to bug 1211253 landing.
2015-10-07 19:39:35 +01:00
Ed Morley 9bfd311ee8 Merge pull request #1011 from mjzffr/mediatests
Bug 1209200 - Add Treeherder b-m, b-y job symbols and VP group symbols
2015-10-07 16:24:36 +01:00
Ed Morley 364f635917 Bug 1198536 - Remove job.build_url since it's unused 2015-10-05 20:41:34 +01:00
Ed Morley 027abb7057 Bug 1211253 - Remove the concept of a platform's VM status
It's calculated during ingestion, but not used and in fact not actually
stored anywhere.
2015-10-05 18:49:25 +01:00
Ed Morley 571c57af71 Bug 1192957 - Mass-update python import style using isort
To fix pre-existing deviations from the style that will be enforced on
Travis in the next commit.
2015-10-02 17:55:29 +01:00
Cameron Dawson 35fb130951 Bug 1169320 - Tests against the JobLoader 2015-10-01 15:50:12 -07: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
Mauro Doglio a5aed772a2 Bug 1160111 - Add throttling for hawk clients
The new throtlling class is based on the hawk client id.
I added some tests to cover both the new throttling class and the one
based on oauth.
2015-09-29 21:22:22 +02:00
Mauro Doglio 8b669ee9cd Bug 1160111 - Add hawk authentication scheme
The hawk credentials lookup function is the glue between hawk and
the `application` django app. I wrote tests to verify its logic,
everything else is mostly configuration code.
2015-09-29 21:22:22 +02:00
Jonathan French ca700dce6f Bug 1141569 - Display onscreen keyboard shortcuts 2015-09-28 16:33:49 -04:00
Maja Frydrychowicz 08615bd1c4 Bug 1209200 - Add Treeherder b-m, b-y job symbols and VP group symbol for buildbot media tests 2015-09-28 15:15:46 -04:00
James Graham 7911d23e6a Bug 1207126 - Implement an API endpoint for autoclassify data.
This provides an endpoint /api/failure_line?job_guid={something}
2015-09-25 17:04:28 +01:00
William Lachance 701bcf047c Bug 1206796 - Add talos performance data ingestion test 2015-09-23 14:48:24 -04:00
William Lachance b80eba8524 Merge pull request #996 from wlach/1207301
Bug 1207301 - Move performance controllers to ui/js/controllers/perf
2015-09-23 14:25:45 -04:00
William Lachance c850a8c7a4 Bug 1207301 - Move performance controllers to ui/js/controllers/perf 2015-09-23 11:20:45 -04:00
Ed Morley ba39c25fa2 Bug 1202626 - Stop storing each revision's commit_timestamp
It's unused in the UI and doesn't add any value, since we're
normally much more interested in the push_timestamp.

This can land without causing errors, since the field is DEFAULT NULL,
so can be dropped at our leisure later.
2015-09-23 10:43:10 +01:00
Ed Morley 440e929916 Bug 1206670 - Update karma to v0.13.10 and karma-jasmine to v0.3.6
As of karma-jasmine 0.3.0, the jasmine library is not bundled with
karma-jasmine, and so jasmine-core has to be installed separately.

jasmine-jquery also has to be updated, since the old version was not
compatible. A duplicate jasmine-jquery file that was outside of the
tests vendor directory has also been removed.
2015-09-22 19:09:16 +01:00
Ed Morley cd82273d8d Bug 1206697 - Remove unused JS files in tests/ui/vendor/
These files are not referenced in karma.conf.js and so are unused.
2015-09-22 19:05:26 +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
goma de90b45827 Bug 1129574 - Project endpoint should be merged with repository 2015-09-15 02:34:25 +01:00
William Lachance 655ee07448 Bug 1192976 - Fix unit tests for reals 2015-09-14 12:53:32 -04:00
William Lachance f7aa033085 Bug 1192976 - Fix unit tests after adding fixture 2015-09-14 12:35:27 -04:00
William Lachance 066f437ca5 Bug 1192976 - Refactor performance data + store in master db 2015-09-14 10:16:25 -04:00
William Lachance 0b79d549d6 Bug 1220716 - Simplify storage of talos data in perfherder
* Stop storing mean/median/max/min for subtests as they're not always on the
  same scale as the summary value
* Always use "filtered" value provided by Talos for subtest summary values
* Store value for tests as a "value" property for the series data
2015-09-14 10:16:25 -04:00
Jonathan Griffin 801596504f Bug 1203236 - Add Mt symbol for buildbot media-tests 2015-09-09 16:21:37 -07:00
Mauro Doglio a5548c7bfe Bug 1182464 - Keep track of failure lines truncation
The truncation point is indicated by a special line with action='truncated'.
2015-09-08 13:36:16 +01:00
James Graham 26d17830e2 Bug 1201913 - Add groups and symbols for web-platform-tests-e10s jobs 2015-09-04 17:56:49 +01:00
Mauro Doglio 5a796eb969 Bug 1182464 - Add store_error_summary django command 2015-09-03 10:50:12 +02:00
Kim Moir 9263d84326 Bug 1199745 - Allow treeherder to recognize add-on-devel builds 2015-09-02 12:05:21 -04:00
William Lachance 7440089508 Bug 1198786 - Stop storing performance artifacts
They were never used for anything and take up a lot of space. They
also don't fit into the new performance model we're working on. We
can always bring back the useful bits later.
2015-08-28 10:49:50 -04:00
Greg Arndt ddd2163379 Bug 1198284 - Add error regex to better match taskcluster errors 2015-08-25 17:57:26 +01:00
Tiramisu 1993 6af23d4356 Bug 1177531 - Add tests for various get functions in treeherder-client 2015-08-25 10:13:49 +08:00
Cameron Dawson 899ccf48b4 Bug 1076826 - Use version 2 of the json-pushes API 2015-08-24 17:12:44 -07:00
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