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

832 Коммитов

Автор SHA1 Сообщение Дата
William Lachance f47197ddd9 Bug 1228158 - Add ability to set alert status and bug # (server side) 2015-12-21 14:58:07 -05:00
Ed Morley 17b514d32e Bug 1212937 - Remove support for passing `auth` to the Python client
The `auth` parameter was intended to receive either a `TreeherderAuth`
instance (for OAuth credentials), or a `HawkAuth` instance. The former
no longer exists since OAuth support has been removed, and the latter is
not necessary, since the client now supports simply passing `client_id`
and `secret` to the `TreeherderClient` constructor, as a simpler way of
specifying the Hawk credentials. As such, the `auth` parameter is
superfluous and can be removed.
2015-12-16 18:17:58 +00:00
Ed Morley 527a8f9947 Bug 1212937 - Remove Python client support for OAuth credentials
Since they are deprecated and no longer supported by the API.
The Python client version will be bumped in a later commit.
2015-12-16 18:12:42 +00:00
Ed Morley 61d596267a Bug 1212937 - Remove API support for OAuth credentials
Since they are deprecated and all submitters have switched over to using
Hawk credentials instead.

The automatically created migrations file was edited to remove the
unused `models` import, since otherwise flake8 complains. We could
alternatively exclude the migrations directory from flake8, however we
would then miss linter errors in any hand-written migrations files.

In addition, Django have fixed the issue in 1.9:
a7bc00e17b
2015-12-16 18:12:41 +00:00
Ed Morley ca53f80f81 Bug 1232654 - Update requests-hawk from v0.2.0 to v1.0.0
v1.0.0 has a simplified API for passing the id and key, see:
https://github.com/mozilla-services/requests-hawk#great-how-can-i-use-it

https://github.com/mozilla-services/requests-hawk/blob/master/CHANGES.txt
https://github.com/mozilla-services/requests-hawk/compare/0.2.0...1.0.0
2015-12-16 14:45:36 +00:00
Ed Morley d3a5c2e9c3 Bug 1230610 - Rename TREEHERDER_REQUESTS_TIMEOUT to REQUESTS_TIMEOUT 2015-12-11 10:45:29 -05:00
Ed Morley 429feea9f7 Bug 1230610 - Rename get_remote_content to fetch_json
Since it's returning json specifically, and in the future we'll have
another function in that file for fetching text content too.
2015-12-11 10:45:25 -05:00
William Lachance b6908b2140 Bug 1228156 - Backend work for updating performance alerts
Specifically, this update creates an API endpoint that allows updating a
"revised" summary id property off each alert. This is intended for the case
where a performance alert was generated against the wrong summary (usually
because of a downstream merge between branches). For now, the API requires the
user to be staff (i.e. a sheriff), otherwise it will generate a 403 denied.
2015-12-09 10:20:51 -05:00
William Lachance 8fc1179765 Bug 1230188 - Only generate alerts for recent performance data
Generating data for old alerts is pointless in a production environment is
pointless and resource intensive.
2015-12-04 12:01:55 -05:00
William Lachance f1c6392ac1 Bug 1229826 - Use "" instead of "fill me" for unspec'd fields 2015-12-02 13:21:25 -05:00
William Lachance a8e663d61d Bug 1228154 - Generate new performance alerts as data is ingested 2015-12-02 13:20:17 -05:00
William Lachance 45caf5de80 Bug 1228154 - Use fixtures for performance ingestion unit tests
It's easier to reuse code and reason about it this way
2015-12-02 13:20:17 -05:00
Ed Morley 8384eefc60 Bug 1196764 - Add a test for calculating and using average job durations
This test checks that the `calculate_duration` command correctly
populates the `job_duration` table both on an initial run and when new
jobs cause an existing average duration to change.

It also checks that once the task has been run, any subsequent ingestion
of jobs with matching signatures cause those jobs to have the correct
`running_eta` value when inserted into the `job` table.
2015-11-30 11:36:21 +00:00
Ed Morley c89fc00502 Bug 1196764 - Add the test_repository fixture to tests that store jobs
At the moment tests that store jobs can get away with not having the
test project listed in the repository table. However with later commits,
the new job_duration table will have a foreign key on the repository
table, which will break those tests unless they use the test_repository
fixture, which creates the repository record for them.
2015-11-30 11:36:19 +00:00
Tiramisu 1993 dae9395468 Bug 1193419 - No longer expire resultset and revision 2015-11-26 11:29:10 +00:00
Ed Morley dd53914771 Bug 1228013 - Add a test for missing Django migrations
This test checks that `./manage.py makemigrations` was run, and the
resultant migrations file committed to the repo, since the last time the
Django models were updated.

Django 1.8 only supports an `exit_code` option, which unhelpfully makes
the command `sys.exit(1)` if there are *no* missing migrations, when
we're more interested in the opposite. As such, we have to confirm that
it does exit 1 (which causes a `SystemExit` exception).

On Django master they've replaced `exit_code` with `check_changes` that
inverts the check, which we should switch to once we're using a version
of Django that includes that fix.
2015-11-25 22:40:15 +00:00
Ed Morley 04dbd2b98b Bug 1160561 - Handle the Django DB password being missing or None
Whilst Django itself handles the password property being set to `None`,
we use the Django DB configs in several places outside of Django (either
directly with MySQLdb, or via datasource which uses MySQLdb too).

MySQLdb will handle the password being the empty string, but raises
if `None` is passed, which can occur if using django-environ, due to:
https://github.com/joke2k/django-environ/issues/56

This change both works around that issue, and is also likely the right
thing to do regardless, since we shouldn't assume that the password is
even set in settings.py at all. (Django defaults the password to the
empty string, so it's perfectly acceptable to omit the password
property in the DATABASES dict entirely.)
2015-11-25 21:48:14 +00:00
William Lachance 2497d6f702 Bug 1227740 - Detect and handle case where we alert inside a retrigger
Previously we would make the previous result set id the same as the current
one, which meant we couldn't resolve the treeherder changeset.
2015-11-25 14:06:24 -05:00
William Lachance 1821c545b7 Bug 1227740 - Modify performance alerts code to be simpler + more robust
* Make sorting more deterministic in cases where we have multiple
  entries with the same push timestamp
* Internal PerfDatum clas renamed to just Datum
* Remove buildid parameter from Datum (not used for anything)
* Remove testrun_timestamp paramater from Datum (it's not really useful,
  better to use push_timestamp
* Consolidate debug printing into one function that shows
  everything
2015-11-25 14:06:24 -05:00
William Lachance 86628a3350 Bug 1227740 - Use fixtures for performance alert unit test 2015-11-25 14:06:24 -05:00
William Lachance 3bfa8b7415 Bug 1201154 - Basic read-only UI for performance alerts 2015-11-23 13:26:34 -05:00
Ed Morley d90775a227 Bug 1226565 - Test that update-parse-status 404s for a non-existent id
We're about to change the implementation of update_parse_status; this
test will ensure trying to update the status for a non-existent
job_log_url record will still result in a 404 response.
2015-11-20 13:04:15 +00:00
Mauro Doglio af9932c877 Bug 1224551 - resultset status shouldn't include classified failures 2015-11-13 15:18:58 +00:00
William Lachance 3c2cbb0e61 Bug 1223126 - Don't require use of PerfDatum class from perf alerting code
This tends to lead to namespacing conflicts when you have other stuff that uses
the same or similar name. It's also additional complexity.
2015-11-11 14:38:52 -05:00
William Lachance f63152b87e Bug 1223126 - Remove code for "machine" alerts from perfherder
It was unused and added complexity. We may want to add support for machine
alerts at some point, but it needs a complete rethink.
2015-11-11 14:38:52 -05:00
William Lachance d7e152947f Bug 1223126 - Rename TalosAnalyzer to just Analyzer in alerting code 2015-11-11 14:38:52 -05:00
William Lachance 16c14a580f Bug 1222588 - Logparser shouldn't truncate lines with PERFHERDER_DATA in them
I changed the magic string from PERFORMANCE_DATA to PERFHERDER_DATA before
landing bug 1149164, but forgot to fix this particular part.

Updated unit test so this hopefully won't happen again
2015-11-11 13:58:09 -05:00
William Lachance 81a7d5148f Bug 1158233 - Store and use "lower is better" metadata for perf tests 2015-11-06 16:03:13 -05:00
William Lachance d0ac6d4fb9 Bug 1222540 - Remove cleanup at beginning of perfherder tests
Now that bug 1193836 is fixed, this is no longer necessary.
2015-11-06 14:58:00 -05:00
William Lachance 06fbcd9b09 Bug 1162522 - Don't summarize talos tests with only one subtest 2015-11-05 16:03:17 -05:00
Cameron Dawson 5bdc6ab6a8 Bug 1221095 - Adds autoclassification options (bugs) to failure lines endpoint 2015-11-04 16:12:29 +00:00
Mauro Doglio 9701ea433b Bug 1221064 - improve job list performance
The job list endpoint was joining the job table and the resultset table
with the only purpose of sorting the results by push_timestamp.Also we
don't really need any sorting on that endpoint, so let's remove it.
2015-11-04 13:53:02 +00:00
Mauro Doglio caa8cb0f82 Bug 1221064 - add new similar jobs endpoint
This endpoint will be used by the similar jobs panel in the ui.
It returns a list of jobs shaped in the same way as the job list
endpoint but ordered by resultset_id DESC. In order to achieve decent
performance the returned list is filtered by the same job type as the
one selected.
2015-11-04 13:53:02 +00:00
Jonathan Griffin 969ecf6eea Bug 1221495 - Add symbol for mochitest-gl-e10s jobs 2015-11-04 03:45:31 -08:00
Ed Morley bc43f09637 Revert "Add integration between autoclassification and manual starring."
This reverts commit 67b335f4c5.
2015-11-02 09:50:25 +00:00
Mauro Doglio 8f167ba49f Bug 1219922 - Stop using the refdata test fixture
I haven't found the exact reason why the tests were failing but it must
be a test isolation problem because they were passing individually.
I debugged this issue disabling the tests backwards starting from the
first failure and I found out that test_bz_api_process was the offender.
The test itself is not doing anything wrong but the refdata fixture
used to setup the test seems to be the root cause..
I replaced the two method calls with their orm counterpart and the
problem disappeared.
2015-10-30 13:49:24 +00:00
William Lachance ce4b22341d Bug 1149164 - Support ingestion of arbitrary perf data from logs
You can now specify performance data to be ingested from any job just
by adding a line containing PERFHERDER_DATA in it.
2015-10-28 14:34:01 -04:00
Mauro Doglio 5930b4f4c1 Bug 1193836 - Use pytest-django to run tests
pytest-django doesn't setup a test database for every single test, but
only for those tests that actually require a db. Tests that require a db
need to either be marked with `@pytest.mark.django_db` or use a fixture
that has a dependency on `db` or `transactional_db`.
Using a non transactional db would make tests execution much faster, but
unfortunately it doesn't play well with the treeherder datasource
creation so I used a transactional_db.

pytest-django also allows you to specify a settings file to use for
tests in a pytest.ini file, which is nicer than monkeypatch the original
settings file in the pytest session start function 😃.
2015-10-27 11:19:13 +00:00
Mauro Doglio 95dbd99410 Bug 1193836 - Stop using init_master_db for tests setup 2015-10-27 11:18:29 +00:00
Mauro Doglio d5f847e559 Bug 1193836 - Decouple the jobs and reference databases for test
We were previously using the same database (test_treeherder) for both the
jobs and reference data model. I centralized the new db name in the test
settings file. All the test requiring the jobs db or its repository counterpart
can now access it using the `test_project` fixture, while utility functions use
directly the metioned setting. Where the project name is hardcoded in a static
file, I just replaced it with the new name `test_treeherder_jobs`
2015-10-27 11:18:29 +00:00
Mauro Doglio 6134f26b6d Bug 1193836 - Delete jobs test databases using fixture finalizer
This guarantees that jobs databases is dropped at the end of each
test. It also makes the jobs database life cycle easier to understand.

In general to keep the tests as fast as possible we shouldn't have much
code in the setup and tear down of each test.
2015-10-27 11:18:29 +00:00
Mauro Doglio 247cc3de64 Bug 1193836 - Use a dedicated settings file for testing 2015-10-27 11:18:19 +00:00
William Lachance 508fc8199c Bug 1218487 - Remove B2G performance data from tests 2015-10-26 14:35:03 -04:00
Ed Morley afcb9d04ee Bug 1210475 - Add support for SpiderMonkey ARM64 Simulator Build 2015-10-24 00:01:14 +01:00
James Graham 67b335f4c5 Add integration between autoclassification and manual starring.
This adds a new FailureClassification for autoclassified
intermittent. When a job is completely classified by the
autoclassifer, and it has the same number of structured and
unstructured error lines, it is marked as an autoclassified
intermittent.

Conversely, when there is exactly one structured and one unstructured
error line, the autoclassifier did not match the job, but has a
detector that could match the job, and the job is marked as
intermittent by a human, add a new autoclassification target
corresponding to the error line.
2015-10-22 15:43:53 +01:00
Cameron Dawson 53bc948f94 Bug 1079796 - store long and short revisions
We store both long and short, but only utilize the short (as before).  We
need to populate all the short and long revision records before we can
start using them.  So after this commit, we will begin backfilling the
old records that don't yet have those values populated.  Once they all
are, we can move to using the long_revision primarily in Bug 1199364.
2015-10-21 13:02:01 -07:00
Cameron Dawson c080e5aa64 Bug 1215450 - single resultset view stuck when using long revision
Some repos have been storing 40 char revisions, though most only store
12.
But a recent change to search by only 12 chars, even if 40 passed in
broke
the ability to search when the stored length was 40.  This change will
search for both length revisions, if the 40 char is passed in.
2015-10-19 09:52:05 -07:00
William Lachance 50a879fbfd Bug 1207648 - Speed up getting performance signatures
We used to determine which performance signatures were in a repository by
looking at that repository's performance datums. Unfortunately, that method
was rather slow as the query had to work over millions of data points. So
instead, store repository and last modified information in the signature
table itself so it can be looked up quickly.
2015-10-15 14:39:14 -04:00
William Lachance 818c955bbe Bug 1207648 - Test timestamp of perf datums after adaptation
We were checking that the value was correct, but not the timestamp.
2015-10-15 14:03:13 -04:00
Ed Morley 52b6b8bc45 Merge pull request #1060 from MikeLing/bugfix-1205674
Bug 1205674 - Remove decompress_if_needed()
2015-10-14 18:32:31 +01:00