Commit Graph

365 Commits

Author SHA1 Message Date
Frank Hamand 8dd27fb82c Fix all workers running beats
This caused inaccurate timings and some duplicate jobs running. There
should only ever be a single beat service, whereas we were using a dev
feature to run a beat service on all 16 workers
2017-02-09 12:19:40 +00:00
Jean-Fred Berthelot bd877b827d Update wsgi.py config after Django upgrade
Post Django 1.6, one needs to initialize the WSGI app
using `get_wsgi_application`.

Otherwise, `AppRegistryNotReady` gets thrown.
2017-02-07 15:00:39 +00:00
Jean-Fred Berthelot 39081845cd Add Compress operation to Travis-CI
We want to check that `python manage.py compress` works.
2017-02-07 10:31:38 +00:00
Jean-Fred Berthelot 9ac617fcd0 Bump django-compressor to 1.5
django-compressor 1.4 does not support well Django 1.8,
and the `manage.py compress` was failing with
`ImportError: cannot import name template_source_loaders`

We cannot go above 1.5, as starting with 1.6, the unit test
`test_query` in `test_urlprefix.URLPrefixTestCase` fails with
'''
UncompressableFileError: '/test/static/bootstrap/css/bootstrap.css'
isn't accessible via COMPRESS_URL ('/static/') and can't be compressed
'''
2017-02-07 10:31:38 +00:00
Jean-Fred Berthelot bfd9117118 Fix typo in test_urlprefix.URLPrefixTestCase
`test_query` checks the responses from two API calls,
but the second test had a typo, resulting in checking
the first response again.
2017-02-07 10:31:38 +00:00
Frank Hamand 2b9bef8edc 0.8.0 2017-02-06 12:56:42 +00:00
Frank Hamand 8b73dc638e Merge pull request #412 from arachnys/django-1.8
Update to Django 1.8
2017-02-06 12:55:40 +00:00
Frank Hamand fe354bb140 Upgrade to Django 1.8 2017-02-06 12:47:37 +00:00
Frank Hamand 5afd50fcf0 Update old django settings
Use the new test runner Discover Runner and no longer specify autocommit
as it's on by default now
2017-02-06 12:46:59 +00:00
Frank Hamand 9a4c723ea0 0.7.0 2017-02-06 12:45:20 +00:00
Frank Hamand eebb3764fd Merge pull request #411 from frankh/django-1.7-frank
Update to Django 1.7
2017-02-06 12:43:13 +00:00
Frank Hamand f3a30ea961 Fix problem where database was required during code initialization
alert.update_alert_plugins() is executed when the module is loaded.
During tests the module is loaded before the test database is created
causing problems. I've changed it to the intented affect of refreshing
on View initialisation
2017-02-06 12:40:16 +00:00
Frank Hamand a2bf8c9a82 Update to Django 1.7
Main changes are to migrations. I started them again from scratch and
then renamed check to status_check (as check is now reserved by django).
The plugins also needed updating to be django 1.7 compatible. (they have
to defined their own migrations if they depend on an app with migrations
now)
2017-02-06 12:40:16 +00:00
Frank Hamand 9db94bd891 Merge pull request #414 from arachnys/start-versioning
Start versioning with 0.6.0
2017-02-06 12:36:43 +00:00
Frank Hamand 512c3ff5e3 Start versioning with 0.6.0
We decided to start versioning at 0.6 to match the django version.
There isn't much reason for this beyond that the next 2 changes will
be django upgrades which will bump the version to 0.7 and 0.8
2017-02-06 12:31:33 +00:00
Frank Hamand 34ba63df7a Update build status image in README
Use travis-ci link instead of shields.io as shields.io is down right now
2017-02-01 16:12:58 +00:00
Jean-Fred Berthelot d6fda8f8b8 Add License badge to ReadMe
This badge pulls this information from GitHub itself.
2017-01-03 12:09:11 +00:00
Jean-Fred Berthelot 24a9c0f1f0 Add CodeCov coverage badge to ReadMe
With a68c2f6 we added support for code coverage,
including reporting with CodeCov.io.
2017-01-03 12:07:56 +00:00
Jean-Frédéric a46a4bc755 Merge pull request #404 from tjphopkins/add_provision_reqs
Add libffi-dev and libssl-dev to provision packages in order to overcome
version incompatibilities preventing 'vagrant up' from completing successfully
2017-01-03 12:02:16 +00:00
tjphopkins 0fc0214059 Add libffi-dev and libssl-dev to provision packages 2017-01-01 19:49:44 +00:00
Jean-Fred Berthelot a68c2f6b5d Add test coverage support
- Split out requirements in two files
  (testing and main)

- Add Bash script running test with coverage

- Add .coveragerc configuration file,
  including Django coverage plugin

- Add post-build to Travis script running CodeCov
2016-12-22 11:09:43 +00:00
Jean-Fred Berthelot f337b79643 Add Flake8 linting using tox
- Add tox file for linting of:
  - bash config files
  - flake8

- Mute all flake8 violations currently not passing
- Install and run tox as part of Travis build
  (inside one run because build matrix is hard)
2016-12-08 12:31:28 +00:00
Jean-Fred Berthelot 1424f753bb Merge pull request #396 from FutureProofGames/master
Support for recurring gcal rotas.
2016-12-01 10:38:02 +00:00
Gregory Avery-Weir 2d0dbe15ec Add tests for recurring calendar rotas 2016-12-01 10:35:50 +00:00
Gregory Avery-Weir fa14f48f3d Support recurring gcal rotas with code from @ipmb 2016-12-01 10:35:50 +00:00
Jean-Frédéric cd73f0d6d5 Merge pull request #388 from arachnys/add-urlvalidator-import
Add missing URLValidator in cabotapp/views.py

URLValidator is used by `clean_runbook_link()` in the ServiceForm view.
2016-10-13 15:54:20 +01:00
David Buxton bf1ad6ce09 Add missing import 2016-10-13 10:43:31 -04:00
Matthew Brown 689449f866 Merge pull request #384 from arachnys/var-handling-for-AUTH_LDAP
Use booleans for AUTH_LDAP setting
2016-10-06 16:16:28 +01:00
Jean-Fred Berthelot 1da7d5f2cb Use booleans for AUTH_LDAP setting 2016-10-06 15:29:09 +01:00
Jean-Frédéric 16828aed7d Merge pull request #385 from m-brown/fix_api_test_fragility
fixed API test fragility
2016-10-06 15:28:47 +01:00
Matthew Brown fc194fc356 fixed API test fragility
The base test class `LocalTestCase` will setup base objects for all tests to use but because this is called for each test the IDs of the objects will change between tests. One of the child test classes `TestAPI` has a some static data used to check the response of API calls, however these IDs were hard coded meaning that if the order of the tests changed for any reason the test would fail. To fix this the IDs of the static data have been replaced with the object ID meaning they will always be correct.
2016-10-06 15:19:37 +01:00
Matthew Brown a6caf63431 Merge pull request #333 from imnotjames/configurable-base-url
Configurable URL prefix
2016-10-05 16:34:31 +01:00
Charles McLaughlin 02f52bc284 Automatically create UserProfiles
Copying changes from pull-request #329

Fixes issues mentionned in #326
2016-10-05 12:17:43 +01:00
Charles McLaughlin 6caecfac2b Adding form validation for runbook_link 2016-10-05 12:14:03 +01:00
Charles McLaughlin 93bfc86654 Allow non-embed links for recovery instructions
Adding a new field for linkable recovery instructions, i.e. a link to a
runbook on the company's wiki.

A few notes/things to point out in this change:

* I expanded form field widths on the service and instance pages...
  I had to add a new field and it was really small by default, so I made
  all the widths match because I think it looks better.

* The InstanceForm class had hackpad_id defined as a field, but not as a
  widget, so it wasn't visiable.  I think that was a mistake, so I
  cleaned it up. For most users I don't think it make sense to have
  documentation for particular instances, so removing it seems like the
  right thing to do.

Closes #273
2016-10-05 12:11:59 +01:00
Jérôme Renard 4d7f9b07ef Miscaellenous fixes with dependencies (#383)
* Force amqp lib under 2.0. Fixes #378
* Fix SSL InsecurePlatform errors with Requests
2016-09-29 19:01:46 +01:00
David Buxton c0ad65f095 Merge pull request #379 from m-brown/fix_last_result_lookup_slowness
added index to allow quicker lookup of `last_result`
2016-09-27 06:43:46 -07:00
Matthew Brown 2ec38c9c1c added index to allow quicker lookup of `last_result`
We experienced problems on certain StatusChecks that had a moderate number of StatusCheckResults that had problems looking up the latest check when updating. This lead to high load on the database and the app not being able to update checks correctly. Having an index on the exact lookup of `last_result` removes this problem.
2016-09-27 12:49:49 +01:00
Jean-Fred Berthelot ebb3d22eba Merge pull-request #314 from branch 'docker-compose'
Squash-merged.
2016-09-20 10:38:14 +01:00
Jean-Fred Berthelot 2acbf0291c Add build script running the necessary Django commands
Also useful to be run inside Docker.
2016-09-20 10:36:00 +01:00
David Buxton 27f65a2eba Docker-compose setup
- Externalise requirements to pip format
- Add entry-point script
- Update Travis-CI configuration
- Fix test data
2016-09-20 10:33:22 +01:00
David Buxton b72864ea82 Pad check time 2016-09-02 09:49:11 +01:00
David Buxton f034205fb7 Update PR to take into account potential issues with check scheduling 2016-08-24 17:25:19 +02:00
David Buxton 317e1e3300 Remove inaccurate documentation 2016-08-24 17:12:53 +02:00
David Buxton 27a353aa0f Actually request last x minutes from graphite
Plagiarises #127
2016-07-20 12:52:51 +01:00
David Buxton 57bbcd32b2 Use graphite timestamps to select datapoints used in checking
* Potentially addresses #352
* Potentially addresses #129
2016-07-20 12:40:27 +01:00
David Buxton 2580e71973 Merge pull request #365 from arachnys/test-duty-rota
Add test for ical parsing
2016-07-20 11:55:04 +01:00
David Buxton e69ad96712 Add test for ical parsing
Addresses #364
2016-07-20 11:48:16 +01:00
David Buxton 5819473c31 Merge branch 'mattvonrocketstein-master' 2016-07-17 17:09:30 +01:00
David Buxton 474f29295e Merge branch 'master' of https://github.com/mattvonrocketstein/cabot into mattvonrocketstein-master 2016-07-17 17:09:15 +01:00