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

818 Коммитов

Автор SHA1 Сообщение Дата
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
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