By default Django doesn't perform any connection pooling, so closes the
DB connection after each request:
https://docs.djangoproject.com/en/1.10/ref/settings/#conn-max-age
Reconnecting takes 20-40ms on production (due to use of TLS), which is
avoided with this change.
Previously if someone set `DATABASE_URL` in their Vagrant environment
to a remote RDS instance, TLS wouldn't have been used. Now, using TLS
depends not on the `IS_HEROKU` environment variable (which we should
stop using anyway, since it goes against the 12-factor methodology), but
the DB hostname itself.
The CA bundle path has been made relative, to allow it to work inside
Vagrant as well as on Heroku.
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
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.
The menus in the app header navbar get a subtle grey background on hover.
For some reason, the same is not applying to the retrigger/backfill menu.
This patch just forces the same style change to occur for this menu.
For whatever reasons, xperf failures are logged as "TEST-UNEXPECTED-FAIL :
xperf :" instead of "TEST-UNEXPECTED-FAIL | xperf |", which caused issues
with the bugfiler trying to split the failure line on |s. This patches
over the problem by not letting the summary array be reduced if there's
only one item left in the array.
Adds a keyboard shortcut to make ctrl+a (or command+a) select all items
in reactlist components like the exclusion lists in the admin view. This
is default behavior in chrome/ium, but not FF or IE.
Was calling retry manually, but that was causing repeated
retries that were blowing up the celery queue. This just
uses our normal retryable_task for retries and adds some
extra logging in new relic to help identify the product
of a pulse job that failed.
There are still other API error cases that aren't yet using
`ThModelErrors`, however these two cases are the most important for now,
since otherwise the Heroku migration maintenance messages won't be
displayed in the UI.
Previously if the server response wasn't valid json with a `detail`
attribute, only the generic message from the `ThModelErrors.format()`
call (eg "Unable to cancel job") would be displayed.
Now, `format()` will fall back to including the HTTP status code (and
corresponding text description of that code) too.
We intentionally don't display the server response if it's not valid
json, since in this case it's likely several hundreds lines of HTML from
the load balancer. (And users can always inspect the response manually.)
* 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.
* Bug 1305585 - Adjust values in thPlatformMap
This patch gives a bit more space for each section of platforms, so we
don't have to adjust the entire stack of platform values for every new
platform we add.
Desktop platforms get 0 - 39.
Android/b2gdroid gets 40 - 79.
B2g/Mulet gets 80 - 99.
Graphene/horizon gets 100 - 119.
Gecko-decision and others gets 120 and up.
* Bug 1305585 - Add Windows 10 x64 VM to thPlatform map
This also reverts the previous behaviour where we'd cancel a single job
if one was selected. This new approach hopefully makes it harder to
accidentally delete all jobs when only intending to cancel one, while
still being intuitive if that's really what you want to do.