Commit Graph

15 Commits

Author SHA1 Message Date
Cody Cutrer c65d57737a RuboCop: Layout lib
Change-Id: I0655d9a9d750f2debd6378b03d8ddc1403ebc31b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274158
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-09-22 20:01:52 +00:00
Cody Cutrer 548a2a1732 update all invocations of send_later and friends to new syntax
Change-Id: I7f40ed058b50882121da69f0cb05966854b8e920
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250924
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2020-10-30 19:13:54 +00:00
Cody Cutrer 06763dd519 add # frozen_string_literal: true for lib
Change-Id: I59b751cac52367a89e03f572477f0cf1d607b405
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251155
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-27 20:49:50 +00:00
Cody Cutrer dfc0fe5f6a ruby 2.7/rails 6: several deprecation warning and spec fixes
Change-Id: I6314b3f304e8befc18ee2f832993a0740690d786
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249956
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-14 16:13:04 +00:00
Cody Cutrer f428313cac tweak the priority of generate_stream_items jobs
Change-Id: I8faa3c4c9d39d42e2191445fec9d885ba66c10db
Reviewed-on: https://gerrit.instructure.com/164146
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2018-09-12 16:04:41 +00:00
Landon Wilkins e26843ff95 da licença part 34
add consistent license headers to all source files
(ruby, coffeescript, javascript)

except for vendor files

Change-Id: Ic6b3be7861a2c91d76889c1740f964e401638e04
Reviewed-on: https://gerrit.instructure.com/110061
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-27 22:00:30 +00:00
Ethan Vizitei 1004e66540 get sentry into canvas
closes CNVS-6016

No more error reports!  (soon)

this commit builds up sentry integration through the new
Canvas::Errors module, along with other things that need
to happen on every exception.  ErrorReports
should now get pushed towards just being used for representing
a complaint a user filed via the get help form.

I fixed about half the things that got linted as well
while I was in here, but because this touches to much
I fear divergence from tackling too many (I think we
can safely say it's "better than we found it")

I left a lot of the infrastructure for error reports in place
until other commits for plugins can be merged

TEST PLAN:
 1) setup your raven.yml config file with the dsn for our
  sentry install
 2) force an error to happen in a request response cycle.
 3) see the error in sentry
 4) force an error to happen in a job
 5) see the error in sentry
 6) statsd increments shoudl still fire
 7) for the moment, an error report should still get created.

Change-Id: I5a9dc7214598f8d5083451fd15f0423f8f939034
Reviewed-on: https://gerrit.instructure.com/51621
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-04-13 22:26:15 +00:00
James Williams 81558f728c remove rails 2 support
closes #CNVS-14261

Change-Id: I1b0e8a4438ab659ecd1ac8462bc3559d810989b3
Reviewed-on: https://gerrit.instructure.com/38744
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-08-06 18:16:19 +00:00
Jacob Fugal a7f4549500 class_inheritable_accessor -> class_attribute
refs CNVS-9166

Change-Id: Ie116881aaeae201222a658de1eb5fc608cec7d01
test-plan: N/A
Reviewed-on: https://gerrit.instructure.com/25726
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2013-10-29 17:53:35 +00:00
Brian Palmer 77ca8ac013 remove deprecated rails constant usage
basically convert RAILS_ROOT -> Rails.root , RAILS_ENV -> Rails.env ,
RAILS_DEFAULT_LOGGER -> Rails.logger

This is necessary for rails 3

Change-Id: I138e1aa217fa8fb186d23ac09b04031c1e2b665e
Reviewed-on: https://gerrit.instructure.com/18412
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
2013-03-11 12:14:08 -06:00
Cody Cutrer bdbeeb992d cross shard dashboards
two major pieces:
 * use context_type/context_id instead of context_code for
   three relations so that sharding extensions will
   automatically work
 * deserialize stream item data as actual AR objects instead
   of OpenObject (for similar reasons)

test plan:
 * run the predeploy migration, but not the postdeploy one
 * view your dashboard on a shard other than your home shard;
   it should be identical to your home shard
 * view courses that you are enrolled in with the same id but on
   different shards. the activity stream should have the correct
   data for the course in that shard, for both courses (i.e.
   no mixing of data from the two shards)
 * do actions that generate new stream items, and verify the new
   items appear correctly for the above two steps
 * run the postdeploy migration, wait for the job to finish, then
   repeat the test plan

Change-Id: I8d5fcadb8d971acf7388a12e9151a3e927751f44
Reviewed-on: https://gerrit.instructure.com/15462
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-11-29 17:36:24 -07:00
Brian Palmer a193f8c4d9 batch up delayed jobs in some controller actions
fixes #10889

Also some new functionality in Delayed::Batch -- you can now give it a
priority, and it'll create all jobs in one batch at that priority rather than a
separate batch for each priority seen. Also, if the batch only contains
one job, it'll just enqueue that job.

test plan: No user-visible changes. The following actions
where changed and should be checked for breakage:
 - changing a grade in gradebook1/speedgrader
 - changing a grade in gradebook2
 - starting a quiz
 - submitting a quiz
 - sending a conversation message

Change-Id: I2f68eec7de1b1c4fc1ec417b8e89d69ec1c0e8ae
Reviewed-on: https://gerrit.instructure.com/13930
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-09-26 12:42:50 -06:00
Brian Palmer b657f4e959 generate an error report for all errors, not just some of them
refs #4487

This consolidates our ErrorReport class with our ErrorLogging mechanism,
it's all in ErrorReport now and you call ErrorReport.log_error or
ErrorReport.log_exception to both create an ErrorReport object, and call
the hooks similar to what ErrorLogging did so that plugins for other
error handling mechanisms can be injected.

ErrorReport has a category field now, similar to how ErrorLogging used
to take a type. the /error_reports UI can filter by category.

The plugin interface was designed with Hoptoad integration in mind, but
it should be pretty general.

Change-Id: I59f7a0d44cf4b6215ad13ff92d30e1d1af607b74
Reviewed-on: https://gerrit.instructure.com/3577
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-05-11 10:36:56 -06:00
Bracken Mosbacker 2f9e0088fc don't create stream items for deleted objects
There was a race condition where the delayed job
for creating stream items hadn't run yet and an
object (like an announcement) was deleted, this
would create a stream item pointing to a deleted
object

closes #3699

Change-Id: I59cd5ac80b752e689098bbecb74243b6913de1a4
Reviewed-on: https://gerrit.instructure.com/2379
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-22 13:06:12 -07:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00