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

25 Коммитов

Автор SHA1 Сообщение Дата
Armen Zambrano deaf8c850c Bug 1169263 - Switch from Vagrant to docker-compose (#4901)
* Change permissions for docker/entrypoint.sh
* Allow using Django in localhost
* Documentation changes
Allow running shellcheck tests
Use docker-compose for the Selenium tests
Install docs updates
Switch to yarn cache instead of npm
Install UI dependencies
* Add ability to override DATABASE_URL and use a .env file
2019-05-16 14:56:02 -07:00
Sarah Clements 36dbb7b4a8 disable specific lint rules 2019-05-10 10:24:06 -07:00
Sarah Clements b131d268af make changes based on feedback 2019-05-10 10:24:06 -07:00
Sarah Clements 71dd55a873 migration changes 2019-05-08 18:18:10 -07:00
Ed Morley 6945c4c471
Bug 1165259 - Add infrastructure documentation (#4766)
- Adds a new "infrastructure" section to the docs, which describes
  architecture, administration and troubleshooting (fixes bug 1165259).
- Adds code comments to any deployment-related files in the repository.
- Adds documentation for the various ways in which users can access
  Treeherder data (fixes bug 1335172).
- Reorganises the structure of some of the existing non-infrastructure
  docs, to make the documentation easier to navigate.
2019-03-11 21:39:34 +00:00
Sarah Clements 700b77bb73 increase entrypoint size temporarily 2019-03-07 12:48:32 -08:00
Ed Morley 40dccf6a49
Increase maxEntrypointSize to avoid failures from duplicate deps (#4651)
The current perfherder entrypoint size is right on the threshold, which
causes failures when something marginally increases the bundle size
(such as the duplicate deps that occur after a React update PR prior to
the lockfile maintenance PR cleaning them up).
2019-02-16 11:10:44 +00:00
Cameron Dawson deb71d65e0 Bug 1364045 - Convert all unit tests to Jest (#4603)
Also remove all Karma support and update the docs to only mention ``Jest``.

One of the test files was testing some AngularJS filters. I converted these
tests to test the equivalent helper functions.
2019-02-12 07:49:50 +00:00
Cameron Dawson 9498ac526a Bug 1364045 - Convert the groups unit tests to Jest 2019-02-07 17:08:16 -08:00
Cameron Dawson ce19281a14
Fix deprecation warning in jest setup (#4511) 2019-01-28 11:00:38 -08:00
Cameron Dawson 646e716a6a
Bug 1364045 - Convert the revisions unit tests to Jest (#4495) 2019-01-28 09:41:59 -08:00
Cameron Dawson d2e83bdb90
Bug 1521157 - Create a prototype for the Push Health View (#4475) 2019-01-24 08:15:46 -08:00
renovate[bot] fb7cd39649 Update dependency bootstrap to v4.2.1 (#4397) 2019-01-03 09:39:50 -08:00
KWierso a1a64d6ed5 Bug 1514661 - Set a favicon for IFV (#4379) 2018-12-17 12:06:38 -08:00
Ed Morley 5c2602fd62
Bug 1364045 - Don't load '@neutrinojs/jest' in production (#4381)
Since it's in `devDependencies` so is not installed during deploys.

Fixes:

`Error: Cannot find module '@neutrinojs/jest'`
https://dashboard.heroku.com/apps/treeherder-stage/activity/builds/8228fa8d-0209-43d3-8699-4e6c124b248f
2018-12-17 12:23:53 +00:00
Cameron Dawson 5e8377a3ff
Bug 1364045 - Introduce Jest unit tests (#4369) 2018-12-13 08:24:52 -08:00
Sarah Clements a0482c50e7
Bug 1506671 - Convert perf compareChooser view to react (#4297)
Remove compareChooser angular partial and controller and create react components
2018-11-29 13:44:12 -08:00
Ed Morley a4be2c54e5
Update Neutrino to 9.0.0-rc.0 (#4314)
* React prop-types are now stripped from the bundle in production
  (since they are only used by React in development), reducing
  bundle size.
* react-hot-loader's Babel plugin is now enabled in production too,
  which is the first piece for fixing bug 1507906.
* `@neutrinojs/eslint` now configures `emitWarning` itself, so our
  customising is no longer required.
* `@neutrinojs/devServer` now enabled `overlay` itself, so we do not
  need to do so manually.

Full changelog:
1c082ac...e9c21b8
2018-11-27 17:43:32 +00:00
Ed Morley 3decefed0b
Clean up the location of generated output directories (#4289)
So that their purposes are clearer and it's easier to differentiate
between generated content and files committed to the repository.

* Neutrino build: `build/` -> `.build/`
* Sphinx build: `_build/` -> `.build-docs/`
* Django collectstatic: `treeherder/static/` -> `.django-static/`
2018-11-16 19:18:18 +00:00
Ed Morley 65b7f4ab45
Bug 1507172 - Use Prettier for formatting JS/JSX (#4276)
Since it's more reliable (and strict) at code formatting than ESLint.
We use it via an ESLint plugin, and so disable the style-related AirBnB
preset rules, leaving the AirBnB guide to handle only correctness and
best practices rules.

It's highly encouraged to use an IDE integration or Git commit hook
to run Prettier (or `yarn lint --fix`) automatically. See:
* https://prettier.io/docs/en/editors.html
* https://prettier.io/docs/en/precommit.html

We may consider enabling a git commit hook out of the box (using eg
Husky) in the future, however they have previously been known to
interfere with partial-staging workflows, so would need to test the
fixes they have made for them thoroughly first.

In future PRs we may also want to start formatting JSON/CSS/Markdown
using Prettier too.
2018-11-16 08:28:34 +00:00
Cameron Dawson 0ec2c6cc41 Bump asset threshold to 1.3MiB 2018-11-14 12:21:05 -08:00
Ed Morley 8010cd4435
Bug 1505417 - Stop setting a viewport meta tag (#4262)
Previously all pages were using the following meta tag:

```
<meta name="viewport" content="width=device-width,initial-scale=1">
```

On mobile devices this causes the viewport to be set at the device
screen width, which is likely to be very small. Most of Treeherder's
pages do not function well under 800-900 pixels, so this meant mobile
users had to enable the "Request desktop site" feature for them to
be usable.

With this change we now don't set a viewport meta tag at all, which
causes Firefox for Android to use a default viewport of 980 pixels
(and similar other mobile browsers). This will mean they see scroll
bars, however the UI will at least be usable.

See:
https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag
2018-11-14 07:36:04 +00:00
Sarah Clements c6502e5bff Bug 1465589 - Convert Perfherder services to functions (#4243) 2018-11-09 16:02:07 +00:00
Cameron Dawson 3ad320d958 Bug 1450045 - Convert Logviewer to ReactJS (#4223)
And switch to using react-lazylog instead of unified-logviewer.
2018-11-09 09:15:00 +00:00
Ed Morley 565ae4c13e
Bug 1364894 - Upgrade from Neutrino 4 to 9 (#4216)
Neutrino controls our frontend linting, transpilation, source-maps,
testing, dev-server and optimisation of production builds.

Highlights of the upgrade are:

* Major version updates to the individual tools within (such as webpack,
  Babel and ESLint), significantly improving performance, fixing
  transpilation/minification correctness bugs, adding support for newer
  ECMAScript features, and increasing linter coverage.
* Hot reloading in the dev server now works for all entry-points and not
  just the jobs view, shortening the feedback cycle.
* Reduced bundle size due to webpack 4's tree shaking, scope hoisting,
  automatic shared/vendor code chunk splitting (no need for the manually
  maintained 'vendor' list).
* CSS is now extracted out of JS, which improves performance, reduces
  bundle size and prevents the initial white flash of un-styled content.
* Support for dynamic imports/code splitting (needed for bug 1502192).
* Support for Jest via a new Jest preset (unblocks bug 1364045).
* Support for public class field declarations (unblocks bug 1480166).
* Improved source-maps (increases the quality of production exception
  trace-backs and fixes several debugger breakpoint bugs).
* Reduced amount of custom configuration required for our fairly complex
  frontend needs, reducing maintenance burden and allowing for easier
  future Neutrino upgrades.

In addition this PR:

* Fixes the WhiteNoise `immutable_file_test()` regex, so that it now
  correctly enables browser caching of images, fonts and source maps.
* Enables webpack-dev-server's overlay feature, which displays any
  compilation errors in the browser, saving having to switch back
  to the console (this can be enabled for warnings too if desired).
* Enables webpack-dev-server's automatic browser-opening feature,
  which saves having to manually navigate to `localhost:5000` after
  running `yarn start`.
* Switches Karma tests to run Firefox in headless mode, reducing the
  workflow disruption when running `yarn test`.
* Uses the new webpack `performance` option to enable maximum asset
  file size thresholds, to help prevent bundle-size regressions.
* Rewrites the `package.json` script commands so that they now work
  correctly on Windows, even when setting environment variables.

Performance comparison:

* Local `yarn build`:
  - Cached: 2m34s -> 23s
  - Uncached: 2m34s -> 58s
* Local `yarn start`:
  - Cached: 34.5s -> 13.6s
  - Uncached: 34.5s -> 31.3s
* Local `yarn test`
  - Cached: 61.5s -> 19.8s
  - Uncached: 61.5s -> 22.0s
* Local `yarn lint`
  - Cached: 3.8s -> 1.8s
  - Uncached: 13.7s -> 13.4s
* Travis end-to-end time:
  9 minutes -> 6 minutes
* Heroku deploy end-to-end time:
  14 minutes -> 9 minutes
2018-11-02 18:48:28 +00:00