Change-Id: If50586fa815c658c6578795f7a5516d36ded3190
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337915
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Change-Id: I83f239615f13ce8166b5aaa26295f993a88a4586
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337904
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Change-Id: Iffc641090e25eb1aefa9e3351bb804c361d69244
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335507
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Change-Id: Ie8b0e0cb6730abd60e89836b7777261608c4ff1c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335848
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Change-Id: I2b9217b48828b2b4434554aab1b15ef5bd1fddbe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333456
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Change-Id: I07345cb76a8fc87b8c726e2b1555e0fc4e4883f5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333462
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Change-Id: I4735e9625d7118d8ac6244e8a83d1292864c0a56
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333455
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Change-Id: Id5f6dc47d0a42ab31a98d25ada621858b12c2189
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/331117
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Change-Id: If2eafbfb030736865ab2b54c5e107eedff1c06e8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/331115
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Change-Id: I8ef1f67cda81f62017307081163f8a7bd4a80d06
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/331118
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
to specify the (singular) key you will operate on, so address
a specific node when it's a distributed redis client
Change-Id: I9c4c0ab7114ea491439b42e4f4310f81470422a7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/331131
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
closes AE-494
[skip-stages=Flakey]
[skip-crystalball]
several things going on here. in general, many of our monkeypatches
have been implemented in upstream, but in a vastly different way, so
we need to enable/configure those things
* `servers` is no longer accepted as a backwards compatible
configuration option; use `url`
* `database` is no longer accepted as a backwards compatible
configuration option; you _can_ use `db`, but preferable to
just use `url`
* no longer merge together redis.yml and cache_store.yml; if one
references the other, simply use the config from the other
* `nil_store` is no longer accepted as a backwards compatible
configuration option; use `null_store` (almost no one should
be explicitly using this anyway, so nbd)
* automatically not-even-trying when redis has previously failed
is now handled by redis-client's circuit breaker. be sure to
configure it in redis.yml/cache_store.yml/dynamic settings
* ignoring redis failures completely is already done by
RedisCacheStore; just rely on that, except for the few cases
where we use redis directly. some of these now take advantage
of a new `failsafe` kwarg (and often in combination with
pipelining), and some just handle it directly
* move logging to a RedisClient middleware
* move Twemproxy disallowed commands to a RedisClient middleware
* simplify Canvas.lookup_cache_store to have far less special casing
(in particular, patching is done automatically now)
* add ability to use Redis::Cluster (configure with `nodes` instead
of `url`)
* still override Redis::Distributed's HashRing, so that we don't
change our ring layout with the new MD5 hashing for servers. but
we got to vastly simplify the new class, due to upstream
refactorings allowing us to simply override a single method rather
than having to re-implement the entire class
* statsd reporting of redis errors is now simply passed as a callback
to RedisCacheStore, breaking CanvasCache's dependency on InstStatsd
Change-Id: I787672677a21994d40ae304dbac0fbf3a960a779
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325641
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
also, don't set BUNDLER_VERSION env var in Docker, so that
bundler's auto-install-and-restart-with-the-correct-version
feature can work
Change-Id: I8e3722197fb3598b5c40679d997f19b3b3957ea8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326580
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
[skip-stages=Flakey]
Change-Id: I6abefdfa9fed6dd4525c8786e93efa548b3710f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319603
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
This will move the URI out of the event message and into a tag, where it
is easier to analyze.
refs AE-140
flag=none
Change-Id: I01394fcbcddf0a1bda881cc0be1ab96d82034df2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319693
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
When CanvasHttp connects to a host with an invalid peer certificate, log a
warning to Sentry so we can address it.
Note: This still does not fail requests for invalid certificates -- once
we've fixed any offenders, we can allow connections to fail.
closes AE-140
flag=none
test plan:
- in the console, call `CanvasHttp.get "https://expired.badssl.com"`
- expect to see an appropriate message logged to Sentry
- in the console, call `CanvasHttp.get "https://wrong.host.badssl.com"`
- expect to see an appropriate message logged to Sentry
- in the console, call `CanvasHttp.get "https://google.com"`
- expect to see no message logged to Sentry
- expect all connections above to succeed
- if the above expectations fail because badssl.com has valid certs and
google.com has an invalid cert, pinch yourself -- you may be in an
alternate timeline
Change-Id: I3b9a27384b4a6002800d14a6d311470ee8194b3b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318552
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
Actually use Bundler to write them out. this ensure that all
constraints are checked with the gem's Gemfile. Had to resolve
several issues with gems along the way.
also removed RedCloth from canvas_stringex, because it's never
used
Change-Id: I614be19e147bdfd3e351e7f032fd6f9b0c1926be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317781
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
still need to ensure gem dependencies are consistent, but this should
prevent unexpected breakage during tests
Change-Id: I39420479fd3fe4f7e49a12a418eca033fcdc7564
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314979
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
many can be converted to heredocs, and most the rest can be simply
re-arranged to chained method calls without line continuations
[skip-stages=Flakey]
Change-Id: Ib96722c0d8108ed2783129fb909bff7a18617ffd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315684
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
closes LS-3818
flag=none
test plan
passes Jenkins
Change-Id: Ic00df2a15a2a54983896cdc6e5fb6659accab9fb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/311752
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Change-Id: Ibf04a5556a17af0fb03e73aff16ac1c8a03487c7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306905
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
means we can remove a whole bunch of specific cop configurations that
now inherit the proper settings. cops that still have violations need
to be explicitly named to make them not error. this means that the
list of remaining cops is explicitly in our config now. also combined
the don't-auto-correct lists with the not-yet-fixed lists, so that
it's only a "permanent" section and a "todo" section
the final computed configuration is unchanged by this commit, with one
exception - Bundler/OrderedGems was moved to the Gemfile.d/.rubocop.yml
override, and some of the internal gems violated that so their
gemfiles have been autocorrected
Change-Id: I100884a96dbe9eb9d4bfc0692663c271daa9de16
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279413
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>