Go to file
Jacob Fugal 954e77d645 rework error handling in event stream
fixes CNVS-15153

 * don't raise if the configured cassandra database can't be connected
   to; instead, return nil (uncached, so it can be retried next time)
   and treat it as connected but unavailable
 * allow configuring whether an error is re-raised (configured true for
   test only in canvas), rather than peeking into rails directly from
   event stream.
 * allow registering callbacks to run on insert/update error via
   on_error
 * on insert/update error, before (maybe) reraising the error, call any
   registered callbacks
 * configure canvas to log to Rails.logger and statsd (removed from
   EventStream::Failure) on insert/update error

EventStream::Failure is now unused, but not yet removed from the code.
it should be considered deprecated and remain unused; it will be removed
in the near future.

test-plan:
 - start canvas in non-test mode (e.g. development mode) with cassandra
   and statsd configured and running
 - turn off cassandra, so even stream inserts should fail
 - change a grade (to trigger a GradeChange event)
 - with cassandra off, event insert should fail, but should *not*
   impede the remainder of the grade change action
 - EventStream::Failure record should *not* be created in the database
 - an error line should appear in the Rails log for the failed insert
 - the appropriate 'event_stream_failure.*' statsd counters should be
   incremented

Change-Id: I5c6d29c2a08276ccc06ebc8c1a59e0d33ce2cc4e
Reviewed-on: https://gerrit.instructure.com/40088
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2014-08-28 21:19:24 +00:00
Gemfile.d bump switchman 2014-08-27 23:12:54 +00:00
app rework error handling in event stream 2014-08-28 21:19:24 +00:00
bin add springified binstubs 2014-07-21 15:45:13 +00:00
client_apps CQS - Expand/collapse question answers 2014-08-28 16:42:48 +00:00
config begin rails 4 2014-08-27 23:09:17 +00:00
db/migrate Make sure no one has the new styles feature enabled 2014-08-25 16:01:34 +00:00
doc Initial new_styles styleguide 2014-08-27 17:43:50 +00:00
gems rework error handling in event stream 2014-08-28 21:19:24 +00:00
guard replace compass with node-sass 2014-08-04 15:28:29 +00:00
lib rework error handling in event stream 2014-08-28 21:19:24 +00:00
loom introduced bower to manage js dependencies 2013-12-13 17:45:57 +00:00
public Adds move to option for module items 2014-08-27 18:52:45 +00:00
script make sure compile-sass exists with non-zero exit code on fail 2014-08-15 18:27:40 +00:00
spec fix sharding issues for lti variable substitions 2014-08-28 21:00:10 +00:00
vendor/plugins add the canvas version to delayed_jobs_pool proc name 2014-08-28 18:25:49 +00:00
.bowerrc introduced bower to manage js dependencies 2013-12-13 17:45:57 +00:00
.fontcustom-manifest.json Select icon in conversations dropdown 2014-08-13 18:49:58 +00:00
.gitignore begin rails 4 2014-08-27 23:09:17 +00:00
.jshintrc make jslint settings more sane 2012-08-17 11:04:40 -06:00
.travis.yml more travis builds 2014-02-10 16:23:19 +00:00
CONTRIBUTING.md add a contributing doc for github coolness 2012-09-19 10:16:04 -06:00
COPYRIGHT Initial commit. 2011-01-31 18:57:29 -07:00
Gemfile begin rails 4 2014-08-27 23:09:17 +00:00
Guardfile a way for accounts to opt-in to new styles and users to high-contrast 2014-04-17 19:47:05 +00:00
LICENSE Initial commit. 2011-01-31 18:57:29 -07:00
README.md remove travis.ci badge until we are re-enabled 2014-07-01 23:08:00 +00:00
Rakefile remove rails 2 support 2014-08-06 18:16:19 +00:00
bower.json bump react-router to 0.5.2 2014-08-08 20:20:28 +00:00
config.ru start adding rails 3.0 support 2013-03-22 19:08:40 +00:00
karma.conf.js new avatars upload image function 2014-03-07 18:52:28 +00:00
package.json replace compass with node-sass 2014-08-04 15:28:29 +00:00

README.md

Canvas LMS

Canvas is a new, open-source LMS by Instructure Inc. It is released under the AGPLv3 license for use by anyone interested in learning more about or using learning management systems.

Please see our main wiki page for more information

Installation

Detailed instructions for installation and configuration of Canvas are provided on our wiki.