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

7797 Коммитов

Автор SHA1 Сообщение Дата
Ed Morley b521523113
Bug 1402992 - Remove all usages of coalesced_to_guid (#3219)
Since after bug 1400069 it is no longer used by the UI.

This removes everything but the Job model field (since the table is
large enough that migrations need to be carefully coordinated, and we
can batch up that change with others).
2018-02-13 18:15:50 +00:00
Ed Morley b98094d4f2
Bug 1257602 - Remove revision_hash from the push table (#3218)
The last of the usages were removed a while ago, so we're safe to
drop the column. The auto-generated migration caused an exception
until it was manually re-ordered, due to a Django bug:
https://code.djangoproject.com/ticket/29124

The `push` table on production is only 300K rows and 100MB, so the
migration should be fairly fast.

The output from `sqlmigrate` is:

```
BEGIN;
--
-- Alter field revision on push
--
ALTER TABLE `push` MODIFY `revision` varchar(40) NOT NULL;
--
-- Alter unique_together for push (1 constraint(s))
--
CREATE INDEX `push_repository_id_e7501345` ON `push` (`repository_id`);
ALTER TABLE `push` DROP INDEX `push_repository_id_revision_hash_3cd3c5e3_uniq`;
--
-- Remove field revision_hash from push
--
ALTER TABLE `push` DROP COLUMN `revision_hash`;
COMMIT;
```
2018-02-13 17:50:33 +00:00
Ed Morley 28b920ae8b
Bug 1437317 - Don't skip test_jobs_api.py's test_job_error_lines (#3213)
Since bug 1177519 has long since landed. The test needed one small
tweak to take into account bug 1233164.
2018-02-13 17:45:55 +00:00
Jonathan French 7247ea20b7 Bug 1429988 - Minor updates for local pulse ingestion 2018-02-13 09:23:19 -08:00
Ed Morley 58e6690e64 Bug 1412797 - Switch to Django's new middleware API
The old API (`MIDDLEWARE_CLASSES`) has been deprecated in favour of
the `MIDDLEWARE` pref. The new API is faster (since it short-circuits)
and has more sensible error handling characteristics.

See:
https://github.com/django/deps/blob/master/final/0005-improved-middleware.rst
https://docs.djangoproject.com/en/1.11/topics/http/middleware/#upgrading-middleware

Since the new API short-circuits (that is, doesn't run later middleware
if an earlier one returns a response), `XFrameOptionsMiddleware` and
`CorsMiddleware` must be moved to before the WhiteNoise middleware,
to ensure the headers are still set like before - even when WhiteNoise
returns early for static content. (Whilst most static content doesn't
need CORS headers, `revision.txt` and `contribute.json` do.)
2018-02-12 17:32:45 +00:00
Ed Morley 292a2777b8 Bug 1412797 - Adapt HawkResponseMiddleware for the new middleware API
Makes the middleware compatible with the new-style Django middleware
API, which hasn't yet happened upstream:
https://github.com/kumar303/hawkrest/issues/38
2018-02-12 17:32:45 +00:00
Ed Morley d256834a2a Bug 1412797 - Adapt NewRelicMiddleware for the new middleware API
Makes the middleware compatible with the new-style Django middleware
API, ready for switching to it in a later commit. See:
https://docs.djangoproject.com/en/1.11/topics/http/middleware/#upgrading-middleware
2018-02-12 17:32:45 +00:00
Jonathan French 92a60fb6a4 Bug 1371843 - Expose Clear all when the pinboard is dirty 2018-02-12 09:27:20 -08:00
Jonathan French a8e7a12954 Bug 1434456 - Remove scrollbar from shortcut table in userguide 2018-02-12 09:11:31 -08:00
Ed Morley 4e8b7e39a9 Bug 1436598 - Remove unnecessary empty static files directory
Django creates this directory when collectstatic is run, so no need
to pre-create it via a `.gitkeep` file.
2018-02-12 17:03:53 +00:00
Ed Morley 610c824c94 Bug 1436598 - Removed unused Django media configuration
Since we don't allow user uploads.
2018-02-12 17:03:53 +00:00
Ed Morley 6083b36c83 Bug 1436598 - Remove unnecessary Django HTTP 404 template
Since it's virtually identical to the built-in template:
2018-02-12 17:03:53 +00:00
Ed Morley 0397e82f0e
Bug 1435998 - Fix/enable eslint 'strict' (#3198)
With ES6, the `'use strict'` directives are unnecessary:
https://eslint.org/docs/rules/strict

The directives have been left in the Neutrino configs, since they
are used by node directly, which doesn't yet support ES6 modules.
2018-02-12 16:51:36 +00:00
Ed Morley cfe3a82466
Bug 1436053 - Unvendor jasmine-jquery (#3200)
It has also been updated from v2.0.7 to v2.1.1:
https://github.com/velesin/jasmine-jquery/blob/master/HISTORY.md#211--2015-09-24
https://github.com/velesin/jasmine-jquery/compare/2.0.7...2.1.1
2018-02-12 16:50:41 +00:00
Ed Morley b7ec45cd3e
Bug 1428919 - Vagrant: Update to latest Bento image (#3202)
To pick up the newer kernel/security updates. Only takes effect when
people destroy/recreate their VM, so also adds a `dist-upgrade` to
upgrade existing boxes. (The older Bento box had a broken kernel
config so `dist-upgrade` can't upgrade the kernel, but it's better
than nothing.)

Also switches the Hyper-V provider to the Bento images for parity,
since Bento now create Hyper-V variants too.

The `box` name cannot be factored out of the provider blocks due to:
https://github.com/hashicorp/vagrant/issues/9452
2018-02-12 16:50:17 +00:00
pyup.io bot 9c9a82a56e Update isort from 4.2.15 to 4.3.4 (#3217) 2018-02-12 15:45:42 +00:00
pyup.io bot df9ee8100f Update sphinx from 1.6.7 to 1.7.0 (#3216) 2018-02-12 12:32:28 +00:00
renovate[bot] 73506a32a2 Update lock file (#3215) 2018-02-12 11:03:06 +00:00
renovate[bot] d2a555a782 Update dependency auth0-js to v9.2.2 (#3208) 2018-02-10 22:16:57 +00:00
Hassan Ali a74003f41b
Bug 1436943 - Login fails with "Unrecognized identity" when using Google authentication (#3210)
* Allow Google login

Presently, when you login with google you are prompted with a screen
that tells you to login using another provider. However, if you try to
login with google using an LDAP email "@mozilla.com", then there is a
blank page saying Unrecognized identity.

* Add test cases
2018-02-09 09:48:34 -05:00
pyup.io bot d1b93dde3a Update pytz from 2017.3 to 2018.3 (#3207) 2018-02-09 12:32:11 +00:00
renovate[bot] e61f356d2d Update dependency jasmine-core to v3.0.0 (#3204) 2018-02-07 22:31:47 +00:00
renovate[bot] 8cacb27897 Update dependency jasmine-core to v2.99.0 (#3203) 2018-02-07 19:32:59 +00:00
Hassan Ali e1b0168127
Bug 1395356 - Use auth0 instead of login.taskcluster.net for SSO (#3144)
## Rough summary of the changes

### Front end
The auth callback is written in React and lives under the /login.html endpoint. It communicates with Treeherder using the localStorage.

### Credential expiration
The Django user session expiration is set to expire when the client access token or the id token expires (whichever one expires first). These values are controlled by the IAM team. Presently, the access token expires after 1 day and the id token expires after a week. That being said, the session will therefore expire after 1 day. If you want this value change, we simply need to send a request to the IAM team.

### Credential renewal
Renewals are set to happen every 15 minutes or so. The renewal is skewed slightly so that different open tabs don't renew at the same time. Once renewal happens, both tokens are renewed and the Django session is updated.

### Migration
If the userSession localStorage key is not set, then the user will be logged out including logging out from the Django session. In other words, all users will be automatically logged out when the merge to production happens.
2018-02-07 12:59:30 -05:00
renovate[bot] 94dbe406d0 Update dependency metrics-graphics to v2.13.0 (#3201) 2018-02-07 02:24:44 +01:00
Ed Morley 1aa4403d10
Update lock file (#3199) 2018-02-06 13:16:14 +01:00
pyup.io bot d7c109d0d6 Update newrelic from 2.100.0.84 to 2.102.0.85 (#3195)
https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-2102085
https://github.com/edmorley/newrelic-python-agent/compare/v2.100.0.84...v2.102.0.85
2018-02-06 00:46:27 +01:00
William Lachance 156bbd6c1b Bug 1429809 - Disable import_perf_data because it's broken (#3126) 2018-02-06 00:45:23 +01:00
renovate[bot] e12f387b0b Update dependency lodash to v4.17.5 (#3191) 2018-02-06 00:15:33 +01:00
pyup.io bot 26f6bf4a20 Update sphinx from 1.6.6 to 1.6.7 (#3192) 2018-02-05 23:55:28 +01:00
renovate[bot] e08ef95ba6 Update angular monorepo packages to v1.6.9 (#3190)
https://github.com/angular/angular.js/blob/master/CHANGELOG.md#169-fiery-basilisk-2018-02-02
2018-02-05 23:53:15 +01:00
pyup.io bot b75ea972ed Update selenium from 3.8.1 to 3.9.0 (#3196) 2018-02-05 23:44:49 +01:00
Ed Morley 8e4c7db6c5
Revert "Bug 1401518 - Make Add new jobs menu require a decision task" (#3186)
This reverts commit d41c318173.
2018-02-01 20:50:46 +00:00
pyup.io bot a4b48832d3 Update django from 1.11.9 to 1.11.10 (#3185) 2018-02-01 16:04:10 +00:00
renovate[bot] 49577ca251 Update dependency ajv to v6.1.1 (#3181) 2018-01-31 21:43:09 +00:00
Stephen Donner ae8517fb3b Jenkins: Update pytest-* to latest (#3180) 2018-01-31 10:59:42 +00:00
pyup.io bot 95141689e8 Update pytest to 3.4.0 (#3179)
And update pytest cache .gitignore entry for pytest v3.4.0,
since the directory name has been changed:
cd0b2ace67
2018-01-31 01:22:32 +00:00
Ed Morley dcb2a3efb3
Bug 1065784 - Remove Django admin (#3170)
Since the only things we used it for were:
* editing users - but that doesn't work any more (bug 1346740) so
  requires a manual DB edit as is it, and we won't need to edit users
  at all once LDAP groups are used for permissions (bug 1273092)
* marking pending Hawk credentials as approved - however we're not
  accepting any new requests for Hawk credentials (bug 1433011)
* resetting the secret key for Hawk credentials - however we've not
  used this feature once in the entire time we've used Hawk - and its
  trivial via MySQLWorkbench.

As as added bonus removing Django admin:
* reduces the work required to add a CSP header
* speeds up `collectstatic` (which is run during deploy) by 30%
* reduces the risk of giving `is_staff` permissions (which have to be
  given to sheriffs, but also allowed admin access)
* reduces attack surface in general

In addition to the Django admin app, `django.contrib.messages` app
and the auth/messages context processors have been removed, since
after bug 1433011, admin was the only remaining consumer of them:
https://docs.djangoproject.com/en/1.11/ref/contrib/admin/
2018-01-30 23:49:58 +00:00
Ed Morley 9ef378f043
Bug 1433011 - Remove UI for requesting/managing Hawk credentials (#3166)
Since REST API data submission is deprecated in favour of Pulse.
The credentials app now only contains the model and migration.
2018-01-30 23:37:42 +00:00
Ed Morley 20c0fc9c4a
Bug 1433104 - Remove the embeddable push-status page (#3168)
Since it's no longer used & the push status API is likely more
appropriate for most use-cases anyway.
2018-01-30 23:00:03 +00:00
Jonathan French d41c318173 Bug 1401518 - Make Add new jobs menu require a decision task 2018-01-30 14:30:08 -08:00
Balaji.G 94a52eb286 Bug 1427375 - Consistently use 'detail' for API error messages (#3178) 2018-01-30 21:05:02 +00:00
Ed Morley f74e37f7a9 Bug 1434307 - Docs: Fix `REQUIRE SSL` SQL deprecation warnings
Now that we're using MySQL 5.7, we can specify `REQUIRE SSL` on the
`CREATE USER` statement, rather than having to do so on the individual
GRANTs. Compare:
https://dev.mysql.com/doc/refman/5.6/en/create-user.html
https://dev.mysql.com/doc/refman/5.7/en/create-user.html

Prevents:
```
1 warning(s): 1287 Using GRANT statement to modify existing user's
properties other than privileges is deprecated and will be removed
in future release. Use ALTER USER statement for this operation.
```
2018-01-30 16:49:14 +00:00
Ed Morley 925ea48229 Bug 1434307 - Docs: Update read-only replica GRANTs
Generated using the approach documented at the end of the page:
https://treeherder.readthedocs.io/admin.html#direct-database-access

The changes are required since bug 1373008 added the `group` and
`group_failure_lines` tables and #2532 removed `text_log_summary`
and `text_log_summary_line`.
2018-01-30 16:49:14 +00:00
ionutgoldan 2eef134966 Bug 1428792 - Remove unused dashboards from Perfherder (#3167) 2018-01-30 09:54:12 -05:00
Ed Morley d0bfec4c9e
Bug 1413156 - Fix inverted conditional in renderGroupJobsAndCounts (#3175)
Prior to #3154 the conditional used:
`_.includes(failResults, resultStatus)`

...so should now be using `!== -1` rather than `=== 1`.
2018-01-30 14:29:32 +00:00
Stephen Donner feb6a71207 Update Selenium tests running in Jenkins to Firefox 58 (#3174) 2018-01-30 10:06:09 +00:00
renovate[bot] c4b6ddc53d Update lock file (#3173) 2018-01-29 11:58:39 +00:00
renovate[bot] d686c5810f Update dependency ajv to v6.1.0 (#3171) 2018-01-27 19:28:39 +00:00
Ed Morley 3327985173 Bug 1432840 - Fix/enable eslint 'array-bracket-spacing'
https://eslint.org/docs/rules/array-bracket-spacing
2018-01-25 19:15:57 +00:00