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

169 Коммитов

Автор SHA1 Сообщение Дата
Ed Morley 1b52b07728
Bug 1445325 - Stop mirroring classifications to OrangeFactor (#3677)
Now that consumers of OrangeFactor have been switched to the new
intermittent failures view UI/API, we can stop submitting failure
classifications to OrangeFactor's Elasticsearch instance.
2018-08-03 00:16:35 +02:00
Ed Morley ae0f12f5ba
Bug 1478344 - Travis: Switch from Ubuntu 14.04 to 16.04 (#3826)
* Adds a `rabbitmq-server` install step, since it's no longer
  installed in the image by default.
* Removes the MySQL 5.7 install step, since Ubuntu 16.04's default
  MySQL is now 5.7 rather than 5.6.
* Adjusts which services are manually started to account for changes
  in which are enabled by default in the new image.
2018-07-26 14:26:32 +02:00
Sarah Clements 5386f7ed40
Bug 1453760 - bug commentor (#3571)
* Bug 1453760 - bug commentor
replacement for Orange Factor bug commentor
2018-07-20 16:36:40 -07:00
Ed Morley 5439ddcb6a
Bug 1471182 - Update geckodriver to 0.21.0 (#3717)
https://github.com/mozilla/geckodriver/releases/tag/v0.21.0
2018-06-26 13:05:28 +01:00
Ed Morley 7c48aa1664
Bug 1459148 - Update geckodriver to 0.20.1 (#3520)
https://github.com/mozilla/geckodriver/releases/tag/v0.20.1
2018-05-08 08:22:22 +01:00
George Hickman d5b6cd3e53 Bug 1427598 - Bump Elasticsearch to 6.2.4 2018-04-25 08:37:07 +01:00
Ed Morley 023d31885a
Bug 1453850 - Enable Python 2's `-3` mode on Travis (#3444)
This enables `DeprecationWarnings` for things that Python 2 knows
are not compatible with Python 3. The `error` entry in the pytest
`filterwarnings` setting ensures these will be surfaced as Exceptions
and so result in test failures.

See:
https://docs.python.org/2/using/cmdline.html#cmdoption-3

The removal of `sorted()` from `test_bug_job_map_api.py` is to fix:
`DeprecationWarning: dict inequality comparisons not supported in 3.x`
2018-04-13 23:14:36 +01:00
Ed Morley 5a1b3d60ac
Bug 1445469 - Update to geckodriver v0.20.0 (#3339)
https://github.com/mozilla/geckodriver/releases/tag/v0.20.0
2018-03-13 23:23:33 +00:00
Ed Morley deb1fc86b7 Bug 1384518 - Switch from Memcached to Redis
Since:
* Redis has additional features we need (eg for bug 1409679)
* the Redis server, python client and Django backend are more
  actively maintained (so have persistent connections/pooling that
  actually works, which gives a big perf win)
* we can use Heroku's own Redis addon rather than relying on a
  third-party's (to hopefully prevent a repeat of the certificate
  expiration downtime)

This commit:
* Switches pylibmc/django-pylibmc to redis-py/django-redis, and
  configures the new backend according to:
  http://niwinz.github.io/django-redis/latest/
  https://github.com/andymccurdy/redis-py
* Uses redis-py's native support for TLS to connect to the Heroku
  Redis server's stunnel port directly, avoiding the complexity of
  using a buildpack to create an stunnel between the dyno and server:
  https://devcenter.heroku.com/articles/securing-heroku-redis#connecting-directly-to-stunnel
* Uses explicit `REDIS_URL` values on Travis/Vagrant rather than
  relying on the django-environ `default` value (for parity with
  how we configure `DATABASE_URL` and others).
* Removes the pylibmc connection-closing workaround from `wsgi.py`.

Note: Whilst the Heroku docs suggest using `django-redis-cache`, it's
not as actively maintained, so we're using `django-redis` instead:
https://devcenter.heroku.com/articles/heroku-redis
https://github.com/niwinz/django-redis
https://github.com/sebleier/django-redis-cache

Before this is merged, Heroku Redis instances will need to be created
for stage/production (prototype done) - likely on plan `premium-3`:
https://elements.heroku.com/addons/heroku-redis

We'll also need to pick an eviction policy:
https://devcenter.heroku.com/articles/heroku-redis#maxmemory-policy

Once deployed, the `memcachier-tls-buildpack` buildpack will no longer
be required and can be removed from prototype/stage/prod, along with
the `TREEHERDER_MEMCACHED` environment variable and Memcachier addon.
2018-01-21 14:41:35 +00:00
Ed Morley d9909d5fa2 Bug 1384518 - Add a Redis server instance to Vagrant/Travis
In preparation for later commits, this installs `redis-server` in
the Vagrant environment, and starts the pre-installed (but stopped
by default) `redis-server` on Travis:
https://docs.travis-ci.com/user/database-setup/#Redis

Production/stage/prototype will use Heroku's own Redis add-on:
https://elements.heroku.com/addons/heroku-redis
2018-01-21 14:41:35 +00:00
Ed Morley bc0ca97102
Bug 1419965 - Remove the estimated job time remaining backend (#2990)
The UI has already been removed. This cleans up the data ingestion
and removes the `JobDuration` model, however leaves the `running_eta`
field on the `Job` model for the next time that table is touched (since
the table is large, so altering the schema would likely require
downtime).
2017-12-04 22:09:38 +00:00
Ed Morley e55e58c834 Bug 1420891 - Docs: Test building the docs on Travis 2017-11-28 16:56:45 +00:00
Ed Morley e969648592 Bug 1389572 - Travis: Skip Elasticsearch install if version matches
Since after my update to the Travis images, the pre-installed version
of Elasticsearch matches the one we're looking for, meaning the
download/install can be skipped, saving time.
2017-11-27 16:39:02 +00:00
Ed Morley 4b4a7341c3 Bug 1389572 - Travis: Don't install custom yarn
Since I've adjusted the Travis images to always use the latest yarn
at the time the images are created, so it's not worth installing the
latest version at every runtime:
https://github.com/travis-ci/travis-cookbooks/pull/935
2017-11-27 16:39:02 +00:00
Ed Morley 3f5ef6b352 Bug 1418956 - Set yarn's no-bin-links option via .yarnrc
To save having to pass it each time when using `yarn {install,add}`.
2017-11-20 18:59:26 +00:00
Ed Morley be843a8837 Bug 1414255 - Fix shellcheck warnings about sourced files
```
SC1090: Can't follow non-constant source. Use a directive to specify location.
SC1091: Not following: /etc/profile.d/treeherder.sh was not specified as input (see shellcheck -x).
```

See:
https://github.com/koalaman/shellcheck/wiki/SC1090
https://github.com/koalaman/shellcheck/wiki/SC1091
2017-11-05 20:53:29 +00:00
Ed Morley 37b2c9855e Bug 1414255 - Fix shellcheck warnings about missing quotes
`SC2086: Double quote to prevent globbing and word splitting`

See:
https://github.com/koalaman/shellcheck/wiki/SC2086
2017-11-05 20:53:29 +00:00
Ed Morley 934c6a2ab9 Bug 1414255 - Enable bash 'strict mode' in all shell scripts
This makes some of the error checking in `runtest.sh` redundant.
The shebangs have also been made more consistent.

See:
http://redsymbol.net/articles/unofficial-bash-strict-mode/
2017-11-05 20:53:29 +00:00
Ed Morley 9b3b216b86
Bug 1414667 - Travis: Test using Firefox beta instead of stable (#2916)
Since it reduces the intermittent failure rate in bug 1401048 and is
also likely more representative of what people are using to access
Treeherder in production (whilst still being more stable than Nightly).
2017-11-05 20:48:48 +00:00
Ed Morley 2ad4b2e0ab
Bug 1414247 - Travis: Use Firefox headless mode instead of xvfb (#2907)
Now that Firefox supports being run in headless mode, we no longer
need to use the xvfb workaround on Travis.
2017-11-03 16:10:48 +00:00
Ed Morley 624d2f43a9 Bug 1414094 - Travis: Move setup steps to a reusable script
This:
* reduces duplication
* opens the door to sharing functionality with `vagrant/setup.sh`
* will make it easier to visualise the Travis bootstrap process
  when moving both Travis and Vagrant to a unified Docker environment.
2017-11-03 12:01:26 +00:00
Ed Morley 08430370bd Bug 1176412 - Heroku: Remove New Relic host display name workaround (#2844)
Previously New Relic displayed the hostname for each dyno as
"Dynamic Hostname", due to the randomly generated Heroku hostnames.
As such, we had to set a manual display name to identify the dyno
type reported for each transaction. This was only partly useful, since
New Relic doesn't use it in all places of their UI.

However the New Relic Python agent 2.96.0.80 release has now added
official support for Heroku dyno names, making this workaround
unnecessary:
https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-252040
d2c4aa097e (diff-a57cabe85e94b1050fb4ff1749effcf5R335)
2017-10-17 18:43:15 +02:00
Ed Morley bbbaf01c6c Bug 1394128 - Heroku: Fail gracefully if revision.txt inaccessible (#2754)
This allows deploys to succeed even if the live version of revision.txt
is not currently accessible, such as when maintenance mode is enabled.
2017-09-06 15:50:15 +01:00
Alisha Aneja e842ae7701 Bug 1330773 - Use the term 'runnablejobs' rather than 'allthethings' (#2743) 2017-09-03 22:10:56 +01:00
Ed Morley da1f9ebbf8 Bug 1394593 - Heroku: Use .profile instead of set-env
set-env was renamed in the buildpack to set_env, breaking this script.
Rather than just renaming our usage, it makes more sense to stop using
what is really an internal buildpack API and instead use `.profile`:
https://devcenter.heroku.com/articles/dynos#the-profile-file
2017-09-01 18:56:40 +01:00
Ed Morley 1fbf5dff99 Bug 1394593 - Heroku: Use 'DYNO' to check if running on Heroku
On Heroku, the environment variable `DYNO` is always set in the
environment. As such, we can just use that to determine whether
code is being run on Heroku, rather than having to add our own
environment variable.
2017-09-01 18:56:40 +01:00
Ed Morley 33fa97ec84 Bug 1387487 - Reduce gunicorn maximum request time to 20 seconds
To ensure that:
* the Heroku router's 30 second timeout doesn't beat gunicorn to it,
  given that routing time is included in Heroku's timing
* the app is more likely to remain responsive, when receiving many
  badly filtered API calls
2017-08-04 18:49:35 +02: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
Ed Morley 2ae5c57959 Bug 1365567 - Remove unused libmysqlclient vendoring support
All environments are now using the native MySQL 5.7 libmysqlclient
library, so the custom vendoring script is unused. The tests checking
that the library isn't vulnerable aren't needed any more, since
heroku-16 doesn't even have that package installed (it's not available
on Xenial).
2017-08-03 11:53:16 +01:00
Ed Morley beb4d6740e Bug 1365567 - Heroku: Don't vendor libmysqlclient on Heroku-16
Since the OS package present in the Heroku-16 image is now new enough
(v5.7.x) that it's not affected by the MITM issue. See:
https://devcenter.heroku.com/articles/stack-packages
2017-07-18 11:27:08 +01:00
Ed Morley 5de04f5940 Bug 1381242 - Heroku: Remove workaround for buildpack caching bug
Since the Python buildpack now restores the cache prior to the
`bin/pre_compile` script being run, which makes the workaround
unnecessary and in fact breaks clean installs.
2017-07-15 17:17:34 +01:00
William Lachance 5cb5046e41 `yarn run foo` -> `yarn foo` (#2597)
The run is redundant.
2017-06-29 11:32:54 -07:00
Ed Morley de7b3973c3 Bug 1363444 - Vagrant: Update to Ubuntu 16.04
At some point soon we'll want to switch Heroku stage/production to
their new Heroku-16 (Ubuntu 16.04) stack, so it makes sense to trial
it locally first. Their Heroku-16 docker image will make switching
to docker simpler too.

Notable changes to the provision steps:
* We're using the Bento boxes rather than the 'official' Canonical
  ones, at the recommendation of Vagrant:
  https://www.vagrantup.com/docs/boxes.html#official-boxes
* openjdk-8-jre-headless is now available from the ubuntu.com
  repository, so doesn't require a PPA.
* There isn't an official mysql-server-5.6 package (only 5.7+), so
  we have to start using a PPA.
* Services must now be managed using systemd rather than SysV init.
* The `eth0` network interface has changed name:
  https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
* The `vendor-libmysqlclient.sh` script will still be run on Ubuntu
  14.04 on Travis/Heroku for now, so has to be compatible with both.
* The previous temporary cleanup steps can be removed since the
  vagrant destroy means a clean slate.
2017-05-10 19:52:18 +01:00
Ed Morley f9d1f89a9b Bug 1363333 - Vagrant: Set PATH instead of activating virtualenv
Adds the virtualenv directory to `PATH` in `env.sh`, to save having
to activate the virtualenv (which is about to be removed) or set
`PATH` in each of the wrapper bin scripts.
2017-05-09 12:44:19 +01:00
Ed Morley f6e320aa92 Bug 1340132 - Reduce usage of --maxtasksperchild with celery
Now we're no longer using datasource, the memory leaks previously
seen have gone. As such there is no need to make the celery worker
processes restart so frequently (they will now only be restarted at
the daily Heroku dyno restart), which will improve performance.

In addition, this will reduce the number of transactions that don't get
reported to New Relic (when the maxtasksperchild threshold is
reached, the worker is forcibly killed before it can submit the
New Relic payload).

The log parser tasks have been left unchanged for now, since they
appear to still be leaking.
2017-05-06 17:30:57 +01:00
Ed Morley 884fffefea Bug 1357595 - Update libmysqlclient from 5.7.14 to 5.7.18
Also switches to the official URLs (that 302 redirect) rather than
direct-linking, since the official URLs are now HTTPS. Avoids potential
breakage in the future as the CDN internal URLs change.

Changelog (most of the changes only affect mysql-server):
https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-15.html
https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-16.html
https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-17.html
https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-18.html
2017-04-19 00:47:55 +01:00
Ed Morley 42f240dbf8 Bug 1349405 - Delete .heroku/yarn/ during post_compile
Since it avoids including 4500 unused files (28MB) in the slug, now that
we're using the yarn support added to newer versions of the nodejs
buildpack.
2017-03-28 13:55:50 +01:00
Ed Morley 51c386ee21 Bug 1343928 - Switch from npm to yarn
Since it's faster, deterministic and doesn't given obscure errors when
using `--no-bin-links` (which is required for both npm and yarn on
Windows hosts), and as such unblocks the work in bug 1343624.

Many of the commands are the same as with npm. See:
https://yarnpkg.com/en/docs/usage
2017-03-13 15:27:46 +00:00
Ed Morley 21abe6ed75 Bug 1343624 - Add `npm run build` as an alias of `grunt build`
Routing commands via npm/yarn is preferred, since it avoids
having to do global installs of grunt-cli, which simplifies contributor
setup, and means less effort when we switch to Yarn (since it requires
manual PATH setup for globally installed packages).
2017-03-13 15:27:46 +00:00
Ed Morley 6502ec24b1 Bug 1340123 - Stop using --max-requests with gunicorn
Since hopefully now we're no longer using datasource, the leaks should
have gone. The gunicorn processes will now only be restarted at the
daily Heroku dyno restart, rather than multiple times per minute,
improving performance.
2017-02-16 17:38:01 +00:00
jgraham 10677eda26 Bug 1339510 - Remove unused detect intermittents code. (#2169) 2017-02-15 22:27:35 +00:00
Ed Morley f397b9819b Bug 1326207 - Replace Django system check hack with --fail-level
Django 1.10 added a new `--fail-level` option that allows overriding the
default of only exiting 1 for ERROR and above, avoiding the need to rely
on awk hacks:
https://docs.djangoproject.com/en/1.10/ref/django-admin/#check
2017-01-10 20:39:37 +00:00
William Lachance 012df34580 Bug 1329002 - Remove last pieces of and references to datasource 2017-01-06 15:01:19 -05:00
Armen Zambrano G ed8e39221d Bug 1306709 - Add SETA to Treeherder 2017-01-05 14:33:55 -05:00
Ed Morley 4df19bddd2 Bug 1318021 - Vagrant: Stop using log files for gunicorn/celery output
Outputting to the console rather than a log file:
* is more user-friendly during development
* is more consistent with Heroku
* means the Vagrant-specific Django LOGGING config is now closer to the
one in settings.py, and so more easily combined with it

Both gunicorn and celery default to outputting to stdout/stderr, so the
`logfile` options can be omitted entirely.
2016-11-23 11:47:04 +00:00
Ed Morley 08f16b31eb Bug 1310727 - Switch to new download URLs for libmysqlclient
The packages have been moved under the archives path, since there are
newer releases now available. The official download link has remained
unchanged, however it's a 302 redirect to a non-HTTPS version of these
links, so we intentionally deep-link, even if it means the URLs will
occasionally need updating.

Fixes the 404 whilst Vagrant provisioning, and failures that would occur
with a clean cache on Heroku/Travis.
2016-10-18 01:14:24 +01:00
William Lachance 61d89cd1a1 Bug 1308528 - Serialize ingestion of job data (#1906) 2016-10-11 17:13:42 -04:00
William Lachance 0300fb69ba Bug 1303055 - Increase the number of log processing workers (#1857)
This should increase throughput, especially in cases where we are backlogged
due to network latency.
2016-09-15 11:51:34 -04:00
Cameron Dawson 9c508817fd Bug 1302529 - Add store_pulse_resultsets to bin script 2016-09-13 13:15:17 -07: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