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

273 Коммитов

Автор SHA1 Сообщение Дата
camd 5cb083ee13 Bug 1215587 - Follow-up to transition over to new job.job_group (#2607) 2017-08-28 11:25:38 -07:00
Alisha Aneja 5cdc2170cc Bug 1223883 - Fix pytest warnings for test collection (#2717)
pytest treats objects starting with the string "Test" as tests, so an
underscore prefix has been added to prevent warnings of form:

```
WC1 .../test_detect_intermittents.py cannot collect test class 'TestFailureDetector' because it has a __init__ constructor
```
2017-08-22 15:10:58 +01:00
Max Chehab c6e0c26bc8 Bug 1336272 - Refactor changing wording from resultset to push (#2644)
Change of new environment variable `PULSE_PUSH_SOURCES`.

Keep old `publish-resultset-runnable-job-action` task name by creating a 
method that points to `publish_push_runnable_job_action`.
2017-08-04 09:38:57 -07:00
KWierso 3e9e7443cb Bug 1375341 - Add support for leaksanitizer errors (#2587) r=emorley 2017-06-29 17:05:26 -07:00
KWierso 37cf7fa970 Bug 1286195 - Add 'mozalloc_abort' to the bug suggestions blacklist (#2483) r=emorley 2017-05-16 15:01:51 -07:00
Ed Morley 9dad6fec61 Bug 1340554 - Switch away from deprecated Elasticsearch count API
The count search type was deprecated in Elasticsearch 2.0.0 and has been
removed entirely in version 5+:
https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_50_search_changes.html

This switches to the `.count()` API instead:
https://elasticsearch-dsl.readthedocs.io/en/latest/api.html#elasticsearch_dsl.Search.count

This can be landed prior to the ES 5.x upgrade, since it's supported by
the ES 2.x API too.
2017-04-19 14:06:34 +01:00
Ed Morley 04945524a2 Update test_search.py for changes in elasticsearch-dsl 2.2.0
Since missing strings fields now return `None` not the empty string:
https://github.com/elastic/elasticsearch-dsl-py/blob/2.x/Changelog.rst#220-2016-11-04
19649863ea
2017-04-19 13:48:32 +01:00
James Graham ac04d5ab8c Bug 1349617 - Handle process output lines in the log parser.
Process output lines start with a prefix like GECKO(1234) or PID 1234
and then a pipe. This is an extra pipe symbol compared to other lines,
so our code that splits on | and assumes specific data in specific
positions is broken. Try to detect the process output case and discard
the first token so that we have the same fields as other
pipe-delimited data.
2017-03-23 14:39:10 +00:00
Ed Morley 4c66f383ef Bug 1348375 - Remove unused imports
Fixes:

tests/autoclassify/test_classify_failures.py:7:1: F401 'treeherder.model.models.TextLogErrorMetadata' imported but unused
tests/etl/test_job_loader.py:7:1: F401 'treeherder.model.models.Repository' imported but unused
tests/model/test_classified_failure.py:6:1: F401 'treeherder.model.models.FailureLine' imported but unused
tests/seta/conftest.py:2:1: F401 'django.utils.timezone' imported but unused
tests/seta/test_job_priorities.py:8:1: F401 'treeherder.seta.settings.SETA_LOW_VALUE_PRIORITY' imported but unused
tests/webapp/api/test_text_log_summary_lines.py:4:1: F401 'treeherder.model.models.TextLogError' imported but unused
treeherder/auth/backends.py:13:5: F401 'django.utils.encoding.smart_str as smart_bytes' imported but unused
treeherder/autoclassify/tasks.py:4:1: F401 'django.conf.settings' imported but unused
treeherder/autoclassify/tasks.py:6:1: F401 'treeherder.celery_app' imported but unused
treeherder/perfalert/__init__.py:1:1: F401 '.perfalert.*' imported but unused
treeherder/seta/analyze_failures.py:7:1: F401 'treeherder.etl.seta.valid_platform' imported but unused
treeherder/seta/job_priorities.py:10:1: F401 'treeherder.model.models.Repository' imported but unused
treeherder/seta/models.py:7:1: F401 'treeherder.model.models.Repository' imported but unused

The seta migrations file change is due to the seta models no longer
depending on `model` (since the unnecessary `Repository` import has
been removed).
2017-03-20 13:18:14 +00:00
William Lachance 73670ac626 Bug 1329742 - Expire performance data (with option to override) (#2084)
In most cases, but not all, we want to expire performance datum on the
same cadence as job data. Add some code to do this, with an optional
override to keep it around indefinitely for some cases.
2017-03-10 15:35:25 -05:00
William Lachance 1a19c1601a Bug 1328453 - Only use completed jobs for calculating average job duration
Completed jobs = those with an end time > start_time
2017-03-06 11:36:00 -05:00
William Lachance fe5742a236 Bug 1328453 - Re-add accidentally deleted unit test for calculating durations 2017-03-06 11:36:00 -05:00
jgraham 3c03bb9fba Bug 1321787 - Autoclassify through the TextLogError rather than through the FailureLine (#2179) 2017-03-04 20:58:31 +00:00
Ed Morley 390cf3afc7 Bug 1333092 - Fix flake8 E305: expected 2 blank lines after definition
tests/client/test_treeherder_client.py:514:1: E305 expected 2 blank lines after class or function definition, found 1
tests/model/test_error_summary.py:66:1: E305 expected 2 blank lines after class or function definition, found 1
tests/model/test_error_summary.py:94:1: E305 expected 2 blank lines after class or function definition, found 1
tests/model/test_error_summary.py:112:1: E305 expected 2 blank lines after class or function definition, found 1
tests/model/test_error_summary.py:148:1: E305 expected 2 blank lines after class or function definition, found 1
tests/model/test_error_summary.py:166:1: E305 expected 2 blank lines after class or function definition, found 1
tests/perfalert/test_analyze.py:94:1: E305 expected 2 blank lines after class or function definition, found 1
tests/webapp/api/test_auth.py:23:1: E305 expected 2 blank lines after class or function definition, found 1
tests/webapp/api/test_version.py:12:1: E305 expected 2 blank lines after class or function definition, found 1
treeherder/config/settings.py:21:1: E305 expected 2 blank lines after class or function definition, found 1
treeherder/credentials/admin.py:10:1: E305 expected 2 blank lines after class or function definition, found 0
treeherder/etl/schema.py:16:1: E305 expected 2 blank lines after class or function definition, found 1
treeherder/model/search.py:56:1: E305 expected 2 blank lines after class or function definition, found 1
treeherder/model/tasks.py:42:1: E305 expected 2 blank lines after class or function definition, found 1
2017-01-23 16:30:24 +00:00
William Lachance 012df34580 Bug 1329002 - Remove last pieces of and references to datasource 2017-01-06 15:01:19 -05:00
William Lachance ae0be9d81c Bug 1329002 - Remove jobs model 2017-01-06 15:01:19 -05:00
William Lachance f6407b7493 Bug 1318474 - Stop writing to datasource altogether for jobs data
The last thing we were using it for were cycling data and giving an
id numbering for jobs, and we can easily replace those with calls to
the ORM.
2017-01-05 16:09:51 -05:00
William Lachance 901f6288a5 Bug 1318474 - Rewrite unit tests to only look for ORM representation 2017-01-05 16:09:51 -05:00
William Lachance 78f66bc7c5 Bug 1328451 - Add a mock log parser fixture to cycle data test
Prevents an intermittent from popping up
2017-01-04 12:32:21 -05:00
William Lachance 32cfd2b659 Bug 1318474 - Make web api's use ORM ids as input and output 2016-12-28 15:42:12 -05:00
William Lachance 608afa4ebd Bug 1325540 - Fix setting expected job duration during ingestion (#2042) 2016-12-28 11:13:50 -05:00
William Lachance ddd9b13eef Bug 1265503 - Add a reference to the main db job objects from performance datum 2016-12-20 17:37:35 -05:00
William Lachance 931865befe Bug 1265503 - Move data cycling tests into their own file 2016-12-20 17:37:35 -05:00
William Lachance 0f10dff26a Bug 1301477 - Convert artifact model into a set of etl methods (#2013) 2016-12-20 13:10:57 -05:00
Ed Morley da7902aa75 Bug 1320356 - Remove the custom DB-based Celery taskset implementation
Since it's unused as of bug 1310974.
2016-12-02 16:25:24 +00:00
William Lachance 3721af6550 Bug 1318474 - Fix job note deletion (#2008)
We were always resetting the failure classification to an invalid value
when the last job note was deleted for a job, but we didn't notice it
before because we didn't have foreign key validation.
2016-12-02 10:49:06 -05:00
William Lachance 9f604fa323 Bug 1318474 - Switch API's and some internal consumers to use Django ORM for job data
Still *ingesting* into datasource for now
2016-11-25 12:54:53 -05:00
William Lachance 9d557622f7 Bug 1318474 - Add job metadata to ORM schema and start ingesting it (#1998) 2016-11-24 12:56:50 -05:00
William Lachance 1c0c32cec0 Bug 1311185 - Turn off remaining result set ingestion and use 2016-11-11 15:40:02 -05:00
William Lachance 8ccc91ee95 Bug 1311185 - Make API's return push id's, not result set id's
For now the resultset and job API endpoints still return result_set_id,
for backwards compatibility.
2016-11-09 13:51:00 -05:00
William Lachance 129adcfab3 Bug 1301477 - Disable external facing artifact endpoints and API's (#1965)
* Can no longer store raw artifacts (anything treeherder doesn't understand
  is ignored)
* Attempting to retrieve an artifact now returns a 405 (not allowed)
2016-11-08 09:49:21 -05:00
William Lachance d757fb6bad Bug 1311185 - Start ingesting ORM pushes / commits
But don't use them for anything yet
2016-11-07 10:27:03 -05:00
William Lachance f9178c24c0 Bug 1308773 - Memoize calls to get per-project exclusion profiles (#1913) 2016-10-18 11:32:38 -04:00
William Lachance 7789d98c2f Bug 1310262 - Process text log artifacts in an atomic transaction (#1926) 2016-10-17 11:47:42 -04:00
William Lachance 61d89cd1a1 Bug 1308528 - Serialize ingestion of job data (#1906) 2016-10-11 17:13:42 -04:00
jgraham 32029361c8 Bug 1283859 - Fix quoting of MATCH ... AGAINST in bugscache search (#1914)
It appears that the intent of this code is to to a phrase match of the
search string against the bug summary for relevance matching. However
the code incorrectly tried to quote the string and as a result failed
to handle special characters in the AGAINST clause (e.g. + - ~ >
etc.). This change simply removes any existing quote characters from
the string and places the entire thing in quotes. Per the MySQL
documentations:

 > A phrase that is enclosed within double quote (") characters
   matches only rows that contain the phrase literally, as it was
   typed
2016-10-11 18:27:56 +01:00
William Lachance 8fc9754f4e Bug 1281820 - Stop using bug suggestions artifacts
Instead, generate the data when required. We will store the return value
of this in memcache for a day to ensure things are responsive for the sheriffs
when classifying recent failures.
2016-10-07 10:51:41 -04:00
William Lachance 9b9d37e690 Bug 1281820 - Move autoclassify methods into Django ORM class 2016-10-07 10:51:41 -04:00
William Lachance 69bdc2ed15 Bug 1281820 - Clean up autoclassification unit tests
* Remove unused fixtures
* Add test_job, test_job_2 fixtures for testing job data, instead of
  ingesting 11 jobs
* Remove various uses of datasource
2016-10-07 10:51:41 -04:00
camd 40d84ee95d Bug 1286578 - Retry job task if resultset doesn't exist (#1872)
* Bug 1286578 - Retry job task if resultset doesn't exist

This removes the logic which creates `skeleton resultsets`
when a job is ingested that we don't have a resultset for yet.
The new approach is to fail and wait for the task to retry.

The buildbot job ingestion already skips and retries later if
it encounters a job for which it has no resultset.

This adds a similar check to the Pulse Job ingestion.  If
a job comes in with a revision that doesn't have a resultset
yet, then this will raise a ValueError.  That will invoke the
retryable_task actions which will wait a bit, then retry.  Each
time it will wait a little longer to retry.  After 9 retries it
waits something like 3900 seconds which should be plenty of time
for the resultset ingestion to complete.
2016-09-29 10:13:26 -07:00
William Lachance 28cae8c360 Bug 1302844 - Remove redundant information from text log artifacts (#1854)
Now that they are only an intermediary format, we can remove data
that isn't required to interpret them.
2016-09-21 10:54:53 -04:00
William Lachance f0105d47f5 Bug 1258861 - Move text log steps and errors into main database (#1696)
This changes ingestion, the API endpoints, and the frontend to match
the new structure. For now we continue to store text_log_summary artifacts,
though they don't do anything anymore.
2016-09-12 12:30:36 -04:00
Ed Morley 527efdccf5 Bug 1294096 - Fix test that times out due to external HTTP requests
Previously test_new_job_in_exclusion_profile was attempting to download
logs from ftp.mozilla.org, due to the log parser not being mocked, which
caused intermittent test timeouts on Travis.
2016-08-10 19:20:46 +01:00
camd 0f2fd75019 Bug 1278711 - Lower field lengths in job_detail table (#1666)
This is required in order to create a unique index on title,
value and job_id to prevent duplicates.  The index will be
created in a later PR.

This also uses update_or_create instead of get_or_create as
this will be the mechanism going forward to prevent duplicates.
2016-08-05 15:15:18 -07:00
jgraham be1ca5872b Bug 1292338 - Remove reftest references from error summary search terms. (#1761) 2016-08-05 14:45:49 +01:00
William Lachance ef6833891f Bug 1289574 - Handle various edge cases when importing bugs
* UTF-8 characters in summary
* Summary exceeds 255 characters
2016-07-27 16:00:23 -04:00
Kalpesh Krishna 2dac5add3b Bug 1277993 - Improve mechanism for excluding jobs and setting tiers (#1661) 2016-07-21 11:19:52 -04:00
jgraham df61b3a2af Bug 1283253 - Don't require a subtest name in elasticsearch. (#1700) 2016-07-21 13:22:02 +01:00
camd 959540913d Bug 1287501 - Fix /jobs/ endpoint to preserve `last_modified` param (#1704)
A prior commit removed the ability to use "-Infinity" for the last_modified
query param.  However, the fix accidentally stripped the param entirely.
This change ensures that the value is a valid date string.  The range is
not limited.

This also adds some new tests to ensure the param of `last_modified` is
working correctly when included.
2016-07-20 18:24:23 -07:00
ka7 bfc5076e5a minor spelling fixes (#1686) rs=emorley 2016-07-13 21:29:58 +01:00