fixes AE-377
* use a basic timeout of 1 second in canvas_rails_switcher.rb
* fix configuration of timeouts in dynamic settings (it's just a
single timeout, not a separate read and write timeout)
* avoid a circular boot problem when consul fails at boot before
Canvas::Errors is loaded
* actually avoid trying to contact Consul at all when the circuit
breaker has tripped
* reposition consul fail safes - so that they'll trip the circuit
breaker if they have to be used
Change-Id: I971beaf0a9982f3f18390b558e71b4b3bc230b16
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324688
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>
either used at boot, or on every request (recaptcha)
refs AE-380
Change-Id: I3e75b6063591c4704a01fda807273ca36a93cb44
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322308
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-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>
During test execution a sequence of tests fail with:
"Only Redis glob strings are supported: /^dynamic_settings\//"
This is because Redis does not support regular expressions
as parameters for "cache.delete_matched(...)"
The accepted format is glob
(see https://redis.io/commands/keys/)
fixes DE-1463
flag=none
test plan:
- existing tests pass and the above error is not found in the flaky failures
Change-Id: I411faef90bb4b0f7b7e3e3ff948453cac23e5a19
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305400
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
This reverts commit b9d45dbc1d.
Reason for revert: breaks prod database.yml because of the to_prepare
Change-Id: I3db4c5cbad77168ede014f9924049f458f05cb3f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284097
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
opts (to use the global datacenter) should be used
refs INTEROP-7008
flag=none
Test plan:
- I'm using the updated function to fix up all the regions now, on test,
beta, and soon prod. (Just getting the keys from iad, pushing global,
and for each region resetting the cache.)
Change-Id: I08a0de5d541dc7fc9824fbfc2de4e49a7467dd24
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274905
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
It takes string, rather than symbol, keys. This was breaking key
rotation (Lti::KeyStorage and Canvas::Oauth::KeyStorage).
Fixes INTEROP-7008
flag=none
Test plan:
- I copied and pasted the new method definition into beta & prod consoles
and ran rotate_keys (those were scheduled to be done and just failed
running today anyway)
Change-Id: I619406d06d4593b49abd80e0cf9a7dee1a52a442
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/272640
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
just load settings from consul.yml to avoid circular references at boot
Change-Id: I405e8541cc46e58f2447d33c87d99d6906da5ca9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271102
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>
so that everyone gets the benefits, not just instfs
also include a new circuit breaker so that if consul is unresponsive for more than the
retry interval, we just let failures through quickly for a while
Change-Id: I9ba757c8529c1011ca771612f592f289c6a844b6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270789
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>
so that we're not re-implementing it at multiple callsites
also remove unused error classes
Change-Id: I938d705729f2208532b4522eddbc8edfa4f2031f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269561
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>
Change-Id: I5c1a9f260afc56887881f98cdab08ad3a25c45f3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263980
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Since we cache by full key anyway, there is no good reason
to convert it into a recursive hash only to convert it right back
Change-Id: Ifb356e38a2ac5e6e0477ebc5913e0d9128622489
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263932
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Some parts of the app depend on parsing
STDOUT, which can result in surprises
if we put things in STDOUT because of
an unexpected initialization order.
Change-Id: Iab12602861d7e32fa5aea5c1a71dd05d0005b89b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259943
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
refs FOO-1615
flag=none
first step of verifying modularization path for
chunks of behavior inside canvas.
take a dependency on config_file to minimize
unnecessary injection
move initialization of dynamic_settings to one place.
leave pointer in previous initializer file.
TEST PLAN:
1) nothing changes at runtime
2) dynamic settings specs can be run
quickly on their own
Change-Id: I1bfbd5b8dfedb9835953d9fc663259c17b76ce7f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258762
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>