make sure that switchman's extension is still active
Change-Id: I8d9d06103f1eb4b09f529b634fba758c72da371a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339249
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>
to avoid a concurrency issue where another of the same query selects
the row, and then it's gone before it can delete it, causing an error
Change-Id: I1155044c007988c4c7244352fae87de84c34894b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/338921
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>
Add new state to assignment state machine to support cloning
alignments after the course copy process finishes.
closes OUT-6050
closes OUT-6051
flag=course_copy_alignments
test plan:
- unit test pass
Change-Id: Ib720edfae055aa109b11666d85f5928333633b54
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336640
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Dave Wenzlick <david.wenzlick@instructure.com>
QA-Review: Dave Wenzlick <david.wenzlick@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
because the transaction causes more trouble than the shorter
statement timeout solves
leave the transaction/timeout in place for mutations, since
tests depend on the atomicity it provides
test plan:
- specs pass
flag=none
closes FOO-4149
Change-Id: I6c23934e8d000e08a400eb9049da058495f9ab55
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/338038
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
closes VICE-3943
flag=discussion_checkpoints
Test Plan:
- specs pass
- Create an assignment, old quiz, new quiz and graded discussion
assigned to multiple students and ensure each can be submitted
to by the assigned students.
- Sanity check that the submissions can be viewed and graded
within Speedgrader
Change-Id: I058a4093ee8bd00d8d7186fb6ada2dd5ba37d016
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334399
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
[skip-stages=Flakey]
[skip-crystalball]
99% of fixes are Performance/StringIdentifierArgument, but one or
two instances of each of Performance/Count, Performance/MapCompact,
Rails/Pluck in safe navigation chains
Change-Id: Ibd2292fb9e7c1e9162068021073c3c0f4b0d65df
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335489
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@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>
flag=discussion_checkpoints
closes VICE-3941
test plan:
- Specs pass.
- Cursory testing of everything related to assignments
across Canvas LMS.
- Create an assignment, old quiz, new quiz and graded discussion
assigned to multiple students and ensure each can be submitted
to by the assigned students.
- Sanity check that the submissions can be viewed and graded
within Speedgrader.
Change-Id: Ib31b8e604040b094381571b854ea3429ac10622a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334305
Tested-by: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Reviewed-by: Aaron Suggs <aaron.suggs@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
flag=none
Previously, the method would only return a hash with indifferent access
when include_root was false. When include_root was true, it would return
a plain-old hash. This change makes the return value type consistent, so
that it always returns a hash with indifferent access.
Test Plan:
- specs pass
Change-Id: I8fbc23523f1476a45a592cd02884d84d7c5a85e3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334369
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
closes VICE-3963
flag=none
test plan:
- Specs pass.
- Using the rails console, query an association that
is polymorphic. For example: Assignment.take.versions.to_sql
- Make sure this part shows in the query:
"versionable_type" IN ('Assignment', 'AbstractAssignment')
qa risk: low
Change-Id: I86dd3f41489f885484ceff19bc185eb0b900b808
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333147
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
We added this instrumentation to try and figure out what was happening
in LS-3147, but this has been in place for 1.5 years and we haven't
received any related reports since.
This reverts commit 7624569b39.
Change-Id: I4c99333204f14c3a77b0350c246d2928cae861be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330695
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
region helpers have been hoisted into switchman proper, so
remove them locally
Change-Id: I1eda64fd64eda61b7647b15ec2ba62db986d19bd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/329655
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>
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>
It's the new default debugger in ruby 3.1. Rails switched to it in 7.0,
avoids issues with Zeitwerk, has a more modern interface based on
current IRB, supports Unix Domain Sockets for remote debugging,
promises even better future maintenance due to being part of Ruby,
etc.
Change-Id: Ieaa7872f1c0308b16ae180fdb16df5dd6caa87a8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328241
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>
This does add an additional query every time we insert a versioned record, but it
is a very lightweight query that shouldn't hit the disk and record insertions are
orders of magnitude more expensive, so it should have an insignficant performance
impact.
fixes AE-445
Change-Id: I9ae43121a221442fc1db9f1c1486778b58803917
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326670
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
we only used it for one thing, and honestly with all of the dynamic
method dispatch it's not clear what it's even doing, so just do the
math ourselves
Change-Id: I17b601732d7b6e5e2236eb01e9ef368fc9d1fa89
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326665
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>
the version we use now properly calls super in inherited
Change-Id: I1da36c07877712c8362d7cb31090a271b0f37c51
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326475
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>
fixes CANVAS-KWHP
the only job we have that uses it has a permanent_failure_callback anyway
Change-Id: Ie8034969943d958ed6ef59ee815bc5153283820a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324601
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
why: we want to reduce Sentry "noise" and not sending 400s
errors from `lti_api_controller#check_outcome` will help
closes INTEROP-8159
test plan:
deploy to beta and make sure it's working as expected
Change-Id: I8c672dd5e40c7d13f085343c650b6007bec380c3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323986
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Steve Mcgee <steve.mcgee@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
makes it much easier to do a failsafe local cache on it
refs AE-380
Change-Id: Ia4bda742e3ee3f80749f3f074e2411b68476b49c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322309
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>
Build-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>
refs AE-380
a lot of these are APM style settings that would be okay to just turn
off while Consul is down. others are things that should just silently
not have any data, instead of failing the request
Change-Id: I34c553b089197f85b2d46029e5079851227090b6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322239
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>
This job will run once daily to make two test connections against each
LDAP authentication provider, and log a warning to Sentry if their TLS
certificate is not valid.
flag=none
closes AE-349
test plan:
- create an LDAP auth provider with a bad TLS cert
- run AuthenticationProvider::LDAP.ensure_tls_cert_validity
- ensure you get a warning in Sentry
- create an LDAP auth provider with a valid TLS cert
- run AuthenticationProvider::LDAP.ensure_tls_cert_validity
- ensure you get no warning in Sentry
Change-Id: Idd1157068f34a610f3f0e2fb1de89557cb585575
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321403
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
add new columns 'points_based' (boolean) and 'scaling_factor'
(decimal) to grading_standards table. Add support for
GET, PUT, CREATE of these new attribures to the json
based grading_schemes rails controller.
flag = points_based_grading_schemes
Test Plan
- tests pass
closes EVAL-3256
closes EVAL-3257
closes EVAL-3258
Change-Id: I0851d5d3b11b4e29098d810bbd96397c61f872ce
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320659
Migration-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
manually done. the big one was the explicit locale assignment
in set_locale_with_localizer needs undone in a controller callback
then using with_locale everywhere, specs no longer need to be concerned
about being in an uncertain locale
Change-Id: I5a1d2c907a6f52ee4d8c2307b8c789a1f1ea436e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320112
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>
I'm not sure why rubocop didn't find these; I found them manually
Change-Id: Id2654b6d2a4a2827d56dfd0baef7a7d668591144
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320149
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@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>
Change-Id: Ib787e8cf4fdb6b3a79ddb82c5566db0467018854
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318199
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@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>
Change-Id: I42e8dbe319551a7ccb19ad20dde60fd38046dc49
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318170
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@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>
so that switchman can tranpose the sub-queries
refs AE-164
Change-Id: I0bb0be10cd7c47126767d94e0bdb83cd0b3d16bf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316973
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: I8a4b84177cfcb89ad148c18a7a06149a7117d285
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316758
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
closes AE-239
flag=none
test plan:
- migrations run successfully on Jenkins
- tests pass
Change-Id: Ic89e000b89bb35f2ae20ea98b950b45e4fbe3089
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316549
Reviewed-by: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
closes AE-81
test plan:
* the people page for an account or course should load properly,
and still sort properly (enforced by specs)
Change-Id: Id8f252af44b2fa4a31786c5c4b7fef9d2aad0946
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314759
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes CANVAS-K0Y4
Change-Id: I8d715b404a5eecc375f909110c2abbfbf9ed572d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315642
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
This is part of the FIPS compliance project
Changing the hashing algorithm for cache keys should not affect site operation
Test plan:
- specs pass
Change-Id: I253821ec5a34fe69496a5690d11d735eeb001ae5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266082
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
at some point Postgres started putting the locale in a separate column
for ICU collations. so just rely on the collation name
Change-Id: I135fbe11c56c1fe4d32c1f2709c0e08f64dd7c07
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314745
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>
closes AE-99
re-work LazyPresumptiousI18nBackend:
- most of the functionality is now in upstream as Backend::LazyLoadable
- the locales.yml and community.csv containing data for all locales is now
in a new Backend::MetaLazyLoadable
- CSV parsing got put into its own module
test plan:
- Canvas should load in English, including the list of other languages
- changing language should still work
- community translations are still available
- (testable in console) I18n.backend.initialized? should not return true
after setting I18n.locale until after a translation has been requested
while that locale is active
Change-Id: I060763de4d7f889efae234109fde801867192c43
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314616
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Detection is disabled by default, but can be enabled by setting the
N_PLUS_ONE_DETECTION environment variable to 'true'. For more information,
see doc/detect_n_plus_one_queries.md
closes EVAL-2973
flag=none
Test Plan:
1. Start rails
2. Create a coures with multiple assignments and go to
/courses/:id/assignments
3. Notice there are no N+1 query warnings shown in log/development.log
and that log/prosopite.log does not exist.
4. Run the `spec/models/grading_period_spec.rb` spec file and notice that
no N+1 query warnings are shown in log/test.log
5. Set `N_PLUS_ONE_DETECTION: 'true'` in docker-compose.override.yml
under web: :environment.
6. Stop/start rails
7. Go to /courses/:id/assignments
8. Notice there are N+1 query warnings shown in log/development.log
and that log/prosopite.log exists and also has warnings in it.
9. Run the `spec/models/grading_period_spec.rb` spec file and notice that
N+1 query warnings are shown in log/test.log (but not in
log/prosopite.log)
Change-Id: I33f43e65df10e2161f1a0687eee3e0b7826bfe3d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313592
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
refs AE-51
flag=none
test plan:
- specify `linked_in_creds` in `vault_contents.yml`
- confirm they're loaded correctly when calling
`LinkedIn::Connection.config`
Change-Id: I98e391466abfe3137bec30110c201a7bf2973295
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314227
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
And make the errors from guard_excessive_updates likely group
better for sentry's purposes
refs AE-149
Change-Id: Iea04ebdbb96653b82e1eed7026697fe8419f6879
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313635
Reviewed-by: Isaac Moore <isaac.moore@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>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
This reverts commit d2f0962da9.
Fixed now to not break jenkins
[build-registry-path=jenkins/canvas-lms/jburroughs-test]
[change-merged]
Change-Id: I9e55a234000043dce4e296952279e275bbb281a3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312747
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
For now warn so we can measure and make necesssary changes; will
allow opting in to hard fialures per database server
fixes AE-149
Change-Id: I4588ccbda726ea0b9fdf4eb9fe15246388ac0478
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/311729
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Hubert Lubaczewski <hlubaczewski@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Aaron Ogata <aogata@instructure.com>
Change-Id: I25be73991a0542755579de897b98561ded3cd0c2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310452
Reviewed-by: Isaac Moore <isaac.moore@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>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
refs AE-124
When running pre-deploy migrations that add a new column, if an application server loads the schema on a shard where the migration has already run, and tries to run queries on a shard where the migration has not already run, it can lead to errors. Fix this by allowing ignored_columns to append to its value dynamically through Consul.
Change-Id: I3b13e0fd2ac066e1439d3d314d71f2ebd8938e0c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310561
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
This re-adds a require_dependency to keep the change small; we should
do a followon change to remove the require_dependency.
(fixes issue introduced in 618a6e702e)
Change-Id: Ib77c904d432cc7b6abaa230dc1b0ea7cfcc3982e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/309211
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Ethan Fox <ethan.fox@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
refs AE-31
flag=none
test plan:
- verify Canvas boots in CD
- verify no influx of new errors in CD
Change-Id: Ifcb0fdd95ad77f7d4934442de8f63385841ba2ac
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/308420
Reviewed-by: Aaron Ogata <aogata@instructure.com>
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>
refs AE-31
flag=none
test plan:
- verify Canvas boots in CD
- verify no influx of new errors in CD
[fsc-timeout=1]
[ignore-stage-results=Flakey Spec Catcher]
Change-Id: I26663e32d9452c198c87b957b026170ee3e4bc93
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305073
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
closes AE-30
flag=none
test plan:
- verify Canvas boots in CD
- verify no influx of new errors in CD
[fsc-timeout=30]
Change-Id: Ifa04bebe1b09f01c6d3b8b2d8f3bb424759730f5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/308067
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Build-Review: James Butters <jbutters@instructure.com>
refs AE-92
Ruby 2.7 will put the enqueue_args, in kwargs if there are no additional arguments provided, even if enqueue_args is provided as a hash.
```
def x(a, b={}, *args, **kwargs)
puts a, b, *args, **kwargs
end
x(1, {'a': 'b'})
# 1
# {}
# {:a=>"b"}
```
In practice, this method is always sent enqueue_args anyway, so just make it mandatory.
Change-Id: I0e31e73bf9d4f7b20d4006ac2e34dd2f11bb1178
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/307827
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>