Commit Graph

1946 Commits

Author SHA1 Message Date
Cody Cutrer 752b0b3e84 reduce dependencies of vendored gems
only require the exact rails gems that are needed, instead of the
whole enchilada. this slightly speeds up running individual tests,
but massively reduces lockfile churn when we update gems

Change-Id: I6c360ed03d41e02563a460e669b2cee7ee7e8cca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326235
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>
2023-08-28 15:58:30 +00:00
Aaron Ogata 6104d981f0 bump inst-jobs & switchman-inst-jobs
refs AE-437

Change-Id: I80d0e5b47386ce97645903b5ab937923b4791137
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326229
Reviewed-by: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2023-08-28 14:58:14 +00:00
Spencer Olson 15f9441a12 fix spelling: assocation -> association
refs EVAL-3436
flag=none

Test Plan:
- specs pass

Change-Id: I2c899fb2576cd82aeecac5b08917759cabf5e665
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326052
Reviewed-by: Samuel Lee <samuel.lee@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
2023-08-24 14:43:03 +00:00
Omar Gerardo Soto-Fortuño 54560c284d Fix n+1 when using suspended? in broadcast
closes VICE-3643
flag=none

test plan:
  - Specs pass.
  - There are plenty of tests testing sending notifications,
      we can trust in them to make sure everything is working
      correctly.
  - To verify that this fix removes the N+1, the best way to do it
      is to run manually in the rails console the queries that this
      would normally generate and check that there is no N+1.
      To do that, do a:
      u = User.eager_load(:active_pseudonyms).take
      That should do a query to the user table and LEFT OUTER JOIN
      with pseudonyms preemptively.
      Then, you can do:
      u.suspended?
      That shouldn't generate a query. If it does, the N+1 is
      still there.

qa risk: low

Change-Id: I89ec1ba0a7b7443ccca995445da56351b407bda1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325730
Reviewed-by: Aaron Suggs <aaron.suggs@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-08-23 17:46:31 +00:00
Cody Cutrer 3c2410f815 bundle update aws-sdk
Change-Id: Ief6c7ede20c21dbc31beba9f1ac18dc97b1e45b7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325868
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>
2023-08-22 23:35:38 +00:00
Cody Cutrer a3004e2580 bundle update rubyzip
Change-Id: Ib60887ae0f008196b3f25a3bcee7bac998c8ace0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325869
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>
2023-08-22 23:35:26 +00:00
Cody Cutrer ef651ce622 bundle update faraday
Change-Id: Ie858ddf127ef2954fd617283c8738f5804abf6de
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325831
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2023-08-22 23:35:15 +00:00
Cody Cutrer 9f6688b4b8 rework google_drive for currently maintained upstream gems
google-api-client is deprecated and unmaintained; need to use
the service specific gem. this gets us on the latest APIs, and
importantly unblocks us on updating other common dependencies
(most notably a step towards updating faraday, but also retriable)

Change-Id: I646da7dc68b8c5f6068142608c19771dafbef127
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325392
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-08-22 23:34:10 +00:00
Cody Cutrer 15a2ddbe41 remove submit-assignment-from-google-docs/drive code
it was disabled a year ago due to a broken API. the Google Drive LTI
is the way to do this now. this commit removes now unused related code
from the view, controllers, and the google_drive library

Change-Id: Ieccef46036c847f27e98dc8297da10d04b6721f9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325750
Tested-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-08-22 23:30:39 +00:00
Cody Cutrer 1397092957 bundle update rails
Change-Id: I8c3e93b99f9656e64520400e1ee10123b836a075
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325864
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>
2023-08-22 22:23:08 +00:00
Cody Cutrer dd453ba37c bundle update rails
Change-Id: I39eb3799ab011b16fb2cb448f032ffafd21087d3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325834
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>
2023-08-22 21:18:44 +00:00
Cody Cutrer a3918016ef bundle update mime-types
Change-Id: Iaff6d2c801bb9a72422b74aa4bb8c7e19a66ee04
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325835
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>
2023-08-22 21:18:25 +00:00
Angela Gomba 33db9ee32b Add Outcome Group to account-level outcome reports
closes OUT-5824
flag=outcome_service_results_to_canvas

This PS is for hackweek Q3 2023.

Test Plan:
- Run the outcome results report and student competency report from the
  root account
- Observe there are no errors and that the learning outcome group
  title and learning outcome group id columns are included
- Repeat steps for a sub-account

Change-Id: If8fecdfae1f2c7b45ac803c642711a66c4b04b93
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323738
QA-Review: Martin Yosifov <martin.yosifov@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Dave Wenzlick <david.wenzlick@instructure.com>
2023-08-22 16:00:02 +00:00
Isaac Moore d0541b7978 Use an assumable role from Vault for S3
refs AE-57
flag=none

test plan:
- connecting with an access key still works
- connecting with a role (if present) works too

Change-Id: Id04406d85a657c071cabe0dc37e2df642a726bec
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325723
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>
2023-08-22 15:35:28 +00:00
Jeremy Stanley ce352b8d7d retry account reports after PG::ConnectionBad
this doesn't happen _frequently_ but it happens often enough
with long-running queries that it annoys admins

test plan:
 * specs pass

flag=none
refs FOO-3720

Change-Id: If6e66235d83208d801a95bf9b62b339cce466508
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325661
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Perry <jason.perry@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2023-08-22 14:44:35 +00:00
Cody Cutrer 3bdca1ff92 bundle update rubocop
Change-Id: I6fd6d6ac27554ed95c2c1473c6c53ff54c6d7329
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325720
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>
2023-08-21 23:37:19 +00:00
Cody Cutrer 5088ae332d bundle update nokogiri
Change-Id: I6f47dd35205d7d463e93dcfdca032080d7626272
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325721
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>
2023-08-21 19:08:06 +00:00
Cody Cutrer b2b8fcfd21 bundle update will_paginate
Change-Id: Ib020bf4c58582cb6c50688efafca053c8fec378b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325628
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>
2023-08-18 20:22:03 +00:00
Cody Cutrer d2bc4a9d38 bundle update rack-test
Change-Id: I242eac144911d29481e5169232409b61e9a647a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325585
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>
2023-08-18 20:19:43 +00:00
Cody Cutrer 067af65314 bundle update rails-dom-testing
Change-Id: I1a15e312907f9728e657897677737afa219ea0f9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325520
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-08-17 23:00:22 +00:00
Cody Cutrer d7e49a55cf bundle update parallel
Change-Id: I16bd4467b67fa1b3c7947712b5aac45cb8258ad3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325514
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-08-17 22:59:17 +00:00
Cody Cutrer 91650d0cff bundle update mail
Change-Id: I60774c71a7faa34b55670da2b0108f6607ebddf8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325510
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-08-17 22:58:26 +00:00
Cody Cutrer 893a7377d2 bundle update net-imap, net-pop, net-smtp
Change-Id: I94439fe38c7fc8a5449749ed94898d6db08c10df
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325489
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>
2023-08-17 19:37:59 +00:00
Cody Cutrer f4c5e63c7e bundle update mime-types
Change-Id: I903edaf1d8cf887d43923aeca692a5e0107ef4d8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325488
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>
2023-08-17 19:37:49 +00:00
Cody Cutrer 6347778e4e bundle update tzinfo
Change-Id: Iea47a60ee8056b761d38ef854aa44ccb435bc585
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325486
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>
2023-08-17 19:37:28 +00:00
Cody Cutrer cfead13ea6 bundle update statsd gems
need to remove strand filter (it never worked)

Change-Id: Id3f6970216b68936a775aa246341cc5db2e9d2a7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325484
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>
2023-08-17 19:37:09 +00:00
Cody Cutrer 37c355a671 bundle update regexp_parser
Change-Id: Idd859875b4167b399472550da333620f0f6370d1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325477
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>
2023-08-17 19:36:31 +00:00
Cody Cutrer c4d0b3ebf2 bundle update pg
Change-Id: Iaefdb0e8f4e300614450dfd7a552b1aa330e3786
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325468
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>
2023-08-17 17:51:28 +00:00
Cody Cutrer 15ec75cf72 bundle update twilio-ruby
Change-Id: Ie725fc2227c014741c7ecb10f311b075996ac144
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325309
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>
2023-08-16 12:22:00 +00:00
Cody Cutrer a18c485b6d bundle update diplomat
Change-Id: Id76e639558f47981e0e5b9866dff6514252b67e4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325304
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>
2023-08-15 23:31:13 +00:00
Cody Cutrer 26b2cdee1c make sure to fully resolve secondary lockfiles when deps didn't match
Change-Id: Ibe844a260a313790195bba47bfd40f5662d047af
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325095
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>
2023-08-15 23:30:36 +00:00
Cody Cutrer aebb87b7c8 bundle update faraday
Change-Id: I17ad4bfec0bdaeb90b9fdfe5c6de1a09f81b3145
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325308
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>
2023-08-15 21:56:26 +00:00
Cody Cutrer 6d6d09c3e0 bundle update sqlite3
Change-Id: If943867d8f514d1573ef974508f3f6c5eb3415d2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325279
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>
2023-08-15 20:20:26 +00:00
Cody Cutrer e1f3572229 bundle update code_ownership
Change-Id: Ifbedc2ea19a39e11217b34b2320a05e9cd3e1d16
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325278
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>
2023-08-15 20:19:48 +00:00
Cody Cutrer 562f56cd58 bundle update inst_statsd
Change-Id: I07900190cad93a4f2ec0d6449ef96f0d37cc0df3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325276
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>
2023-08-15 20:19:00 +00:00
Cody Cutrer 176e41cc89 bundle update timecop
Change-Id: Ic1fb4a864b2b40d0b9e5f6df7bdb640189e3ac66
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325281
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>
2023-08-15 20:16:56 +00:00
Cody Cutrer 0810360b15 bundle update aws-partitions
Change-Id: I83cb5b8548de56a4d809f2d7a36402a4dc0c9f69
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325277
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>
2023-08-15 20:16:27 +00:00
Cody Cutrer 3543fd8d71 bundle update mime-types-data
Change-Id: I4e8b52cf162b7c6082888cbf8e6f5905ef0150b8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325010
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>
2023-08-15 20:16:15 +00:00
Cody Cutrer 254e93d84a fix `bundle install` not installing gems from plugins sometimes
if the secondary lockfile already exists, but a pinned version
changed, it may through a slightly different error

Change-Id: I998fbf3225d8acf59ff33023ef778a8861c679c4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325094
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>
2023-08-14 18:12:46 +00:00
Cody Cutrer e81c2b7fcf Revert "bundle update hashie"
This reverts commit e738c243d7.

Reason for revert: incompatibility with private plugins

Change-Id: I0569c413f2c28c9dc21f481bff9d9beb9e753ce7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324713
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-08-14 17:15:45 +00:00
Cody Cutrer e738c243d7 bundle update hashie
Change-Id: Ie93fd12e122da29dc8cc9645d12e60e8cd57ca58
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325009
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>
2023-08-14 16:38:50 +00:00
Cody Cutrer 9e763ac3f9 bundle update multipart-post
requires moving the legacy multipart vendored gem out of a
conflicting namespace

Change-Id: Ib56a7b3cb4e372514b23c82cbbb59a5599462092
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324948
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2023-08-14 16:37:46 +00:00
Cody Cutrer ab2a259ca6 bundle update sentry
closes AE-305

Change-Id: I637e547a156320caaa3c47b02e7ba98869df4a54
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325005
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>
2023-08-14 16:32:44 +00:00
Cody Cutrer e1a6ca4982 bundle update rubocop
no new cops, but a few fixes to existing cops (notably
Style/RedundantReturn)

Change-Id: I64a744c3d81e25329c1612e4622ca96783b0801d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324942
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>
2023-08-14 16:32:06 +00:00
Cody Cutrer 2c344da93a fix consul timeouts
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>
2023-08-11 17:45:40 +00:00
Cody Cutrer 97f80895ad bundle update dogstatsd-ruby
Change-Id: Iabcbba265a879095324af3f1a8a2c48283af19e2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324947
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>
2023-08-11 17:42:57 +00:00
Cody Cutrer f450de57b6 bump rails
Change-Id: Idf23d6f1926efb208d8d8b3e6f9629676b4bdb76
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324918
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>
2023-08-11 17:42:20 +00:00
Cody Cutrer 9675382c2d bundle update ruby_parser
Change-Id: I0c2140d2468443d54776f7135d7838e89c5df746
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324943
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>
2023-08-10 23:20:32 +00:00
Cody Cutrer 749ad3e67b bundle update version_gem
Change-Id: I480e31427d3743b27b7a96d5825c089968c59092
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324945
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>
2023-08-10 22:24:03 +00:00
Cody Cutrer 22442512c6 bundle update google_drive dependencies
Change-Id: Ibe7dacd464fc870b60723421919aa9972bd7a312
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324933
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>
2023-08-10 22:15:56 +00:00
Cody Cutrer 2cb5700116 bundle update aws
Change-Id: I24511d55aa30d73045a909d29488652a5539b750
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324931
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>
2023-08-10 22:13:56 +00:00
Cody Cutrer 9d16a9408a bundle update addressable
Change-Id: I765ecdb9d6fc0e8cac578cae34dcf0989093cd0f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324930
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>
2023-08-10 22:13:40 +00:00
Cody Cutrer 35a21b6538 bump sanitize
Change-Id: I6cd54d8a3f83f556ce895512219927590375b325
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324895
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>
2023-08-10 17:54:22 +00:00
Cody Cutrer 5de85fb2d3 bump rails
Change-Id: Ia59f4a8831c6bfc6f44d6490f7f2f5dbf43c0006
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323855
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>
2023-08-08 17:30:30 +00:00
Cody Cutrer ccba9e75b1 bump rspec-related gems
Change-Id: Id53c1d31be838972bcfb5c45dd9d9861aa240752
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323856
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>
2023-08-07 20:13:45 +00:00
Cody Cutrer 8f8f6f7313 bump rubocop gems and apply changes
[skip-stages=Flakey]

Change-Id: I5f080be6efb64351b4a89e6bd6040bc6f0432e82
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323854
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>
2023-08-07 20:13:35 +00:00
Cameron Ray 55e5bca8c3 default account grading schemes model updates
Allows accounts to have a default grading scheme attached.
Works for nested sub_accounts.

flag=default_account_grading_scheme
closes EVAL-3367

[pin-commit-multiple_root_accounts=34042244337234b7993bc85351a443fc103f69b8]

Test Plan:
- Tests Pass
- In the Rails console
  - Find a grading scheme
  - Find a sub-account
  - `sub_account.grading_scheme = grading_scheme`
  - `sub_account.save`
  - Should be no errors
  - Find a course in that sub account
  - `course.grading_scheme = nil`
  - `course.save`
  - `course.default_grading_scheme`
  - Should return sub accounts default grading scheme
  - `sub_account.grading_scheme = nil`
  - `sub_account.save`
  - `account.grading_scheme = grading_scheme`
  - Verify that `sub_account.default_grading_scheme` and
    `course.default_grading_scheme` both return the root accounts
    grading scheme

Change-Id: I5b4a374e3e43f06ab06148f9c0f9f35a343bc606
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323569
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2023-08-07 16:53:12 +00:00
Paul Gray 6166fc126e Remove canvas_link_migrator from canvas
This commit removes the canvas_link_migrator gem from canvas, instead
pulling in the gem from rubygems. This code now lives at:
https://github.com/instructure/canvas-link-migrator

flag=none
refs LF-373

Change-Id: I96221dfefacc8712262ab15e27d0de53817a7178
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323277
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: James Logan <james.logan@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Paul Gray <paul.gray@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2023-07-31 17:52:54 +00:00
Cody Cutrer be8f098d8d fix rescued exception for consul failsafe cache
Change-Id: Ifcabff13ea130c0a1f95ae0b60decdd0265a3ada
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323774
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>
2023-07-28 14:42:24 +00:00
Cody Cutrer fb65d9a7e2 handle small/negative max_length for truncating text
fixes CANVAS-J4EB

Change-Id: I767bfc4192c2ce37e98b7ebfa96753a611878c43
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323567
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2023-07-27 16:55:39 +00:00
Cody Cutrer 3b90b979eb ignore permissions errors when attempting to write to Consul failsafe cache files
refs AE-380

Change-Id: Ib6c29da30883fe07008b17faf4e2f9dc4a08cf75
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323282
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>
2023-07-27 16:52:01 +00:00
Aaron Suggs 8d76497d54 Add CodeOwnership support to CanvasErrors
As a developer, I’d like to know which Sentry errors my team is
responsible for. Since Canvas is owned by multiple teams, it can take some
effort to determine which team is responsible for a particular sentry
error.

The code_ownership gem can help. It lets us define YAML configs with path
globs of which teams own which files. As an error bubbles up, it uses the
stack trace to know which team best "owns" the error.

In this commit, we add an `inst.team` tag to the error that will be
sortable / filterable in Sentry.

The next step is to add CodeOwnership config and definitions to the
canvas-lms rails app.

This is a Hack Week project.

refs VICE-3684

Test plan:
  - specs pass

flag=none

Change-Id: Ifdd5cac0e33c92b2c9112e70b3c7e3a9a9d4e023
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323629
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2023-07-27 14:50:25 +00:00
Jacob Burroughs 98ae4cd3e7 Introduce the concept of failure reasons to adheres_to_policy
Change-Id: I51d96bf84ccc093ff3206d2ae7d04656080ab634
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323054
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>
2023-07-20 18:03:51 +00:00
Cody Cutrer 54adfc7c10 wrap partition creation in a transaction
just in case the connection drops immediately after creation, but before the
FKs are added, or callbacks called

Change-Id: I738cb0ba84e87859ce55a30ac562e9c146bdbb44
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322799
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>
2023-07-20 16:22:53 +00:00
Jacob Burroughs 6c260d35f2 Upgrade json-jwt
Change-Id: I4f8b1aaaecabd0b231cd32d24a213e1d45df450d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323142
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>
2023-07-19 15:02:11 +00:00
Mysti Lilla 215f35e5e0 Set up methods for html migration
README updates as well

closes LF-380
flag=none

Test plan
- Canvas migrations should still
  work properly with links as before
- Quizzes people are okay with the
  methods

Change-Id: I0c1816391e625c86ba531cff9394ea78915cf8d8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322237
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Paul Gray <paul.gray@instructure.com>
QA-Review: Paul Gray <paul.gray@instructure.com>
Product-Review: Paul Gray <paul.gray@instructure.com>
2023-07-18 21:44:46 +00:00
Jeremy Stanley 84925b5936 abort report runners when deleting account reports
otherwise, parallelized reports will keep launching new runners
until the report completes, even though the user will not be able
to see the result. if the user deleted the report because it was
not scoped properly and was taking too long, this only makes
the problem worse

test plan:
 - start a large parallelized report such as a user access report
 - delete the report via the account reports API
 - after currently running jobs exit, no new jobs for the report
   will launch

flag=none
fixes FOO-3676

Change-Id: Icd7558e4c7746a0e7fb6223e118b0b1ca9220bb7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322922
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Perry <jason.perry@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2023-07-18 18:07:32 +00:00
Mysti Lilla a788bd7bd4 Move link_replacer to gem
refs LF-380
flag=none

Test plan
- Set up a course with several kinds of links
  to other Canvas assets (files, media files,
  wiki pages, discussion topics, etc)
- Run an import from an existing Canvas export
  package
- Run a course copy
- Run a BP course copy
- Verify links look correct after the migration
- Make sure warnings from links come through
  still

Change-Id: I3d607b43a26ac03c563b604b2320dbc17ea7513a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322403
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Reviewed-by: James Logan <james.logan@instructure.com>
QA-Review: James Logan <james.logan@instructure.com>
2023-07-17 23:49:29 +00:00
Mysti Lilla 1f7a40c9a5 Move database replacement to html_converter
refs LF-380
flag=none

Test plan
- Set up a course with several kinds of links
  to other Canvas assets (files, media files,
  wiki pages, discussion topics, etc)
- Run an import from an existing Canvas export
  package
- Run a course copy
- Run a BP course copy
- Verify links look correct after the migration

Change-Id: I1df3c611fd03813d45cc5b299a664f2f47aaac58
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322508
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Paul Gray <paul.gray@instructure.com>
QA-Review: Paul Gray <paul.gray@instructure.com>
Product-Review: Paul Gray <paul.gray@instructure.com>
2023-07-17 23:49:16 +00:00
Jeremy Stanley af3655ec7a add job ids to account reports
the job id will make it possible to find logs for an account report
that goes wrong (but not wrong enough to end up in Sentry)

make use of some helpers already deployed for sis imports for
this purpose

test plan:
 - run migrations
 - run an account report
 - the Delayed::Job id for the job that performed the report
   should be stored in account_report.job_ids (check the
   jobs logs to see that it matches)
 - run a parallelized account report such as grade_export_csv
 - the AccountReportRunners should record a job id as well

closes FOO-3665
flag=none

Change-Id: I26b61ff66abb8a34ed3aeba889ff66f6eaf87d20
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319508
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2023-07-14 19:07:25 +00:00
Ryan Hawkins 8d74397b9b Properly lookup 1.3->1.1 mapping during 1.3 launch
This reverts commit 0e703b84c0.

why:
- Previously, work was done to add the oauth_consumer_key and
  oauth_consumer_key_sign to LTI 1.3 launches that are associated with a
  1.1 tool.
- This work is important, as it improves the migration experience for
  tools.
- However, the previous attempt at this did not account for tools within
  production Canvas having invalid URLs/domains. While we do validate
  URLs now, we didn't always, so there are some bad tools still hanging
  out in the wild.
- Additionally, while the previous commit did add a feature flag, it
  didn't add it properly, meaning that even though the flag was off, it
  was still looking up the association, it just wasn't adding the
  property to the 1.3 Message. This commit does it properly now.

fixes INTEROP-8124

flag=include_oauth_consumer_key_in_lti_launch

test-plan:
- The first half of this test plan is taken verbatim from the previous
  commit:
  ------ Start Old Test Plan
- Clone Xander's handy dandy Remix 1.1/1.3 test tool and run it locally.
  https://github.com/xandroxygen/lti_1p1_test_tool
- Run the tool and then install it locally by following the directions
  for both 1.1 and 1.3.
- Launch the 1.3 tool and make sure that under the 1.1 claims section,
  there is an oauth_consumer_key with value key and an
  oauth_consumer_key_sign section. You don't have to check the
  signature, as the algorithm for it is unit tested using values from
  IMS's examples from the spec itself.
- Now delete the 1.1 tool and launch the 1.3 tool again. You should
  still see the oauth_consumer_key info.
  ------ End Old Test Plan
- Now, to test that things won't broke when there are malformed tools,
  do the following:
- Create a new course.
- Manually create a new tool in the rails console in this course with
  malformed data. We have to bypass some rails validations to mock prod.
  ```ruby
  tool = Course.last.context_external_tools.new(url: "http://url path>};/invalidurl}",

          domain: "url path>};"
          settings: {
            "text"=>"LTI 1.1 Tool with Garbage Data",
             "visibility"=>"public",
             "custom_fields"=>{"user_id"=>"$Canvas.user.id"},
             "course_navigation"=>
              {"enabled"=>true,
               "url"=>"http://url path>};/invalidurl}/launch?placement=course_navigation",
               "text"=>"LTI 1.1 Garbage Data",
               "selection_width"=>500,
               "selection_height"=>500,
               "message_type"=>"basic_lti_request",
               "visibility"=>"none"},
             "vendor_extensions"=>[]
             })
  tool.save(validate: false)
  ```
- Launch the LTI 1.3 test tool from this new course. You should NOT see
  an oauth_consumer_key & oauth_consumer_key_sign in the LTI 1.1 claims.
  More importantly, the launch should succeed without a 500.
- Delete the manually created tool and launch the 1.3 tool again. All
  should be the same as above.

Change-Id: Icea1ed5fd0a316fac51ba87591ea79b2002d5a9d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322172
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Ryan Hawkins <ryan.hawkins@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-07-14 17:15:27 +00:00
Charley Kline 0c474d56e0 Make Account Report header rows always English
Fixes FOO-3452
flag=none

We don't want to translate the column heading values
in any of the CSVs generated by the account_reports,
because they will most likely be used to import into
some customer ETL, and if the heading values change
depending on the locale the report was run in, it
might possibly confuse the code that's processing the
CSV files.

Test plan:
* Switch to a non-English locale
* Run an account report
* Examine the generated CSV
* The first row containing the column names should
  be in English, not in the language of the locale
  you are working in

Change-Id: Ia6bf87784f205fa33018e636c0f6ddd5b368a30f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322721
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
2023-07-13 22:28:54 +00:00
Mysti Lilla db2d07bedf Move relative_url? to gem
refs LF-380
flag=none

Test plan
- Specs pass
- Course links work in course
  copy

Change-Id: I37bc765783d17ab1d5beff3589c9683635442610
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322496
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Paul Gray <paul.gray@instructure.com>
Product-Review: Paul Gray <paul.gray@instructure.com>
QA-Review: Paul Gray <paul.gray@instructure.com>
2023-07-13 16:49:22 +00:00
Cody Cutrer 014b010c05 implement failsafe local caching of several Consul settings
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>
2023-07-12 14:52:34 +00:00
Chawn Neal 342c93f832 IMP sends errors to error_reports and sentry through CanvasErrors
The canvas errors gem uses a callback to send to error_reports,
so using CanvasErrors now also reports to Sentry.

fixes VICE-3546
flag=none

Test plan:
1. IMP errors should still generate error_report.
2. IMP should send errors to sentry.

Change-Id: If420bdb4c87d05cd1e2d0bd89577e912d6301ba8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322198
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Chawn Neal <chawn.neal@instructure.com>
2023-07-11 16:40:16 +00:00
Mysti Lilla 57ee56964c Move link_parser to gem
refs LF-380
flag=none

Test plan
- Set up a course with several kinds of links
  to other Canvas assets (files, media files,
  wiki pages, discussion topics, etc)
- Run an import from an existing Canvas export
  package
- Run a course copy
- Run a BP course copy
- Verify links look correct after the migration

Change-Id: I5dcb2c0680a8136c2d67b0db755942ff2ed8067d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322131
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Logan <james.logan@instructure.com>
QA-Review: James Logan <james.logan@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2023-07-10 21:42:09 +00:00
Jacob DeWar 830b801ffc Capture nil error found by Sentry
flag=none
fixes LF-450

Test Plan:
-Set byebug breakpoint in kaltura_media_file_handler.rb:add_media_files
*Before client.startSession(CanvasKaltura::SessionType::ADMIN)
-Have a course with attachments that don't have media objects
*At least one must not be rejected by
*attachments.reject(&:active_media_object_by_media_id)
-Export course
-Start debugging delayed jobs
-Import to new course
*(Do not course copy)
-Step through client.startSession
*If I do not step through it, it fails
-Continue to the first line of bulkUploadCsv
-Stop notorious
-Continue debug session
-In UI, validate error is
*Failed to get bulkUpload result from Kaltura

Change-Id: If6e85fba127698e5a525b19019a3e22b856439b6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322225
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Jacob DeWar <jacob.dewar@instructure.com>
2023-07-07 20:11:16 +00:00
Mysti Lilla 007a202ce6 Add link_resolver to gem and test with migration object
refs LF-380
flag=none

Test plan
- Set up a course with several kinds of links
  to other Canvas assets (files, media files,
  wiki pages, discussion topics, etc)
- Run an import from an existing Canvas export
  package
- Run a course copy
- Run a BP course copy
- Verify links look correct after the migration

Change-Id: Ic7c9eff96ce0e6f75963ea2ec9d8c20929cc1bc2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320567
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Logan <james.logan@instructure.com>
Reviewed-by: Paul Gray <paul.gray@instructure.com>
Product-Review: Paul Gray <paul.gray@instructure.com>
Product-Review: James Logan <james.logan@instructure.com>
QA-Review: James Logan <james.logan@instructure.com>
QA-Review: Paul Gray <paul.gray@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2023-07-07 19:02:45 +00:00
Dustin Cowles 739a425d19 output config name when encountering a parser error
This will help people quickly identify a syntax error in a config file
such as dynamic_settings.yml in their development environment.

flag=none

Test plan:
- Specs Pass

Change-Id: Icd4597424da4c3a44570c0de1258edc52bce378c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322203
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Stephen Kacsmark <skacsmark@instructure.com>
Product-Review: Stephen Kacsmark <skacsmark@instructure.com>
2023-07-06 16:33:07 +00:00
Cody Cutrer aa7041d2c1 update rubocop, and apply new cops
[skip-stages=Flakey]

Change-Id: I2d3ffbeb652a6668941125a8a2afe87f104c8d0a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321953
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-07-03 22:11:42 +00:00
Cody Cutrer 399181bb27 bump rails
Change-Id: Ia540a9ccc668e7dab62cda642b6eb9da2b661604
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321691
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>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2023-06-30 19:07:11 +00:00
Mysti Lilla 22f98491d0 Canvas Link Migrator gem start
refs LF-380
flag=gem_migration_links

Test plan
- Specs pass

Change-Id: I2e4865a42ccfbb06844facce98c7c7ac0679341c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320566
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
Reviewed-by: Paul Gray <paul.gray@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-06-29 17:12:45 +00:00
Cody Cutrer 003e65f3aa bump rails
Change-Id: Ib9a7f75fde9d85ac8d650ae2cad1b00cd5f98a4f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320432
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>
2023-06-27 19:06:17 +00:00
Cody Cutrer c51fc4be30 add `ruby` platform to lockfiles
Change-Id: I865d51f54945dad9ec7ccc6f22e0cf4ee587c641
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321480
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-06-27 17:56:13 +00:00
Matheus 924be0da13 Make s3_backend's full_filename able to handle nil filenames
closes LF-390
flag=none

test plan:
- Using backend stragegy S3Backend
- Create a course image with a nil filename
  (Save a normal image and nil the resulting attachment filename)
- Publish and enroll in that course
- Load your card dashboard and check that it gets to load

Change-Id: I92461bd774824ddc0778c2d929e69e583a930e86
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321158
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
2023-06-23 21:26:04 +00:00
Ryan Hawkins 0e703b84c0 Revert "Send oauth_consumer_key in LTI 1.3 Launches"
This reverts commit b4eafd838e.

Reason for revert: This commit is causing issues within Canvas and Sentry is down, so we can't see just how bad they are. They seemed pretty bad when we could see them though.

Change-Id: I672876dd6dd6fe22d5b5c1fb010b1050db3c5a7a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320360
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Ryan Hawkins <ryan.hawkins@instructure.com>
2023-06-21 21:55:17 +00:00
Ryan Hawkins 5088f222d0 fix: Dev Key Report matches API scope
why:
- Admins were running the Dev Key Report in beta and noticed that
  a discrepancy between the keys shown in the UI vs the report.
- This was due to a difference in the scope used in the API vs the
  report. Apparently, there was a point in time where new keys created
  at the account level defaulted to invisible, so filtering by visibility
  does not work properly. This was likely fixed in 1a5f8ad01a, so new
  keys don't have this issue.
- Now the report and the UI match up

test-plan:
- Before checking out this commit, do the following:
- Create a new developer key at the account level
- Go into the Rails console and update it to not be visible:
`DeveloperKey.find(<blah>).update!(visible: false)`
- Run the report
- Note that the key you just created isn't there, but does show up
  in the UI.
- Check out this commit
- Run the report again. The key should now show up in the report.

fixes INTEROP-8106

flag=none

Change-Id: Ib4c8270efefad600e01945a9a9e965085fbe2b62
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320406
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-06-21 19:05:55 +00:00
Cody Cutrer 5431d47758 rubocop: Rails/I18nLocaleAssignment
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>
2023-06-13 21:59:50 +00:00
Cody Cutrer d2b02ba910 rubocop: Lint/SendWithMixinArgument
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>
2023-06-09 16:04:56 +00:00
Ryan Hawkins b4eafd838e Send oauth_consumer_key in LTI 1.3 Launches
why:
- the spec says send it
- we are not doing that now
- instead, do it right
- (Also, it will help tools migrate from 1.1 to 1.3, which is currently
  a bit of a pain point)

test-plan:
- Clone Xander's handy dandy Remix 1.1/1.3 test tool and run it locally.
  https://github.com/xandroxygen/lti_1p1_test_tool
- Run the tool and then install it locally by following the directions
  for both 1.1 and 1.3.
- Launch the 1.3 tool and make sure that under the 1.1 claims section,
  there is an oauth_consumer_key with value key and an
  oauth_consumer_key_sign section. You don't have to check the
  signature, as the algorithm for it is unit tested using values from
  IMS's examples from the spec itself.
- Now delete the 1.1 tool and launch the 1.3 tool again. You should
  still see the oauth_consumer_key info.

closes INTEROP-8050

flag=include_oauth_consumer_key_in_lti_launch

Change-Id: I31b5082e76ec3408b4706f4abb4e3d9ab6890b45
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319394
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
2023-06-07 19:23:32 +00:00
Jacob Burroughs 7dcc507d0a Rubocop for ruby 3.1
[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>
2023-06-06 16:44:26 +00:00
Isaac Moore 1aec43b868 Improve CanvasHttp Sentry logging
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>
2023-06-02 22:28:28 +00:00
Isaac Moore 401500bcf2 Log warnings for invalid CanvasHttp certs
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>
2023-06-01 17:15:04 +00:00
Cody Cutrer b636c1c041 add a bundler binstub
refs AE-297

and also include binstubs in the path in docker

this will help ensure people are running the correct version of bundler

Change-Id: I68e7f6a43efd89ff257a9307aa4f6709acef05f8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318776
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>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-30 17:34:50 +00:00
Cody Cutrer 8225efae46 pin git sourced gems in sub-gems to the same as canvas
refs AE-297

and also add this to `bundle check`

Change-Id: Ia0369485787e70f9d9a5f1e93cb76cddab3d6c93
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318750
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-30 17:34:32 +00:00
Mysti Lilla 570206eb60 Upload correct content type for media
refs LF-283
flag=none
QA-risk: medium
[fsc-timeout=30]

Test plan
- Upload files in the RCE and make sure
  their content types make sense
- (It looks like 'video' was sort of the
  default recently because the old
  code didn't seem to be getting the
  data it was expecting)
- We want the full content type with
  a slah to make LF-283 work better
- Check other places we might be using
  the uploader and see if it's working
  there too (I can't think of other places
  we're using it :( )

Change-Id: I7f155ee2c2bd7c2dfdc62e097748c5c8ecb9e513
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318822
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Luis Oliveira <luis.oliveira@instructure.com>
QA-Review: Luis Oliveira <luis.oliveira@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2023-05-26 17:04:35 +00:00
Aaron Ogata 97ea28d396 convert last instance of old credentials for sqs mailbox
refs AE-254

Change-Id: I03c356f89a014aac96a9eb244b9b2f33b95e1d3f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318921
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>
2023-05-25 12:42:50 +00:00
Aaron Ogata 7d16d3feea fix for ruby 3.1
Change-Id: I920b1b13fa13d2e5ba10081660c0a75d2fef4e35
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319080
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-24 22:53:11 +00:00
Cody Cutrer f01d90c4e9 enforce that BUNDLE_LOCKFILE is found when used
Change-Id: I7fca235c8044614a5eb39b0b4867959e24bc317b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318650
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@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>
2023-05-19 19:13:34 +00:00
Cody Cutrer 80f97039c0 bump and apply rubocop gems
[skip-stages=Flakey]

Change-Id: I473807528062dfc9e8e983728c6d27726513686c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318465
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>
2023-05-19 18:57:17 +00:00
Isaac Moore 60e4463b65 Remove gemfiles from plugins that don't need them
flag=none

Change-Id: Id854603d7b92b3e26126944a49d739e1601d981d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318640
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@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>
2023-05-19 17:43:57 +00:00
Cody Cutrer 7746f95086 calculate gemfile and lockfile locations relative to Bundler.root
so that you can run things from other working directories

Change-Id: Ifb01d4fdb70cfb6c4e14943963cabaaabe9f6893
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318396
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-05-17 15:33:42 +00:00
Cody Cutrer fb3981b9f6 fix explicit lockfile selection
depending on order, the default gemfile might not be set properly because it
was still doing its regular selection logic

Change-Id: I425bd529526e43c5cd752c2570f554638b9524dd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318329
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>
2023-05-16 22:45:22 +00:00
Cody Cutrer 1c15214a63 keep lockfiles in sync as part of `bundle` commands
closes AE-283

this eliminates script/sync_lockfiles.rb and integrates its
functionality directly into `bundle install`, `bundle check`, etc.
it also generalizes a few pieces so that the same approach is used
for all use cases:
 * syncing versions between the main Gemfile and gems in gems/
 * maintaining separate lockfiles for no plugins/including
   private plugins
 * maintaining separate lockfiles for multiple Rails versions
   (crossed with the previous bullet)

The differences between them are just small variations on how strict
versions must match between lockfiles, and requiring pinning of
versions not in the default lockfile.

For full details, checks the docs on BundlerLockfileExtensions

This does change the strategy for filtering private plugin dependencies
out of the committed lockfile(s) - instead of filtering based on hash
of source, simply don't even include private plugin gems in the gemfile
when building the filtered lockfile (i.e. dynamic Gemfile, rather than
monkeypatching bundler to filter out -- semi-succesfully -- private
plugins from the Definition).

It also changes the "default" lockfile for Canvas that gets checked
in to be Gemfile.lock, so that other tools that are not
multi-lockfile aware can find it (such as rubocop, dependabot, and
others). This will be the lockfile corresponding to the current
default rails version for Canvas, and without private plugins.

Change-Id: I7ba398381974acbc4445f34fa3b788e8a07c5ce6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317888
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>
2023-05-16 18:39:21 +00:00
Isaac Moore a29ad0f7e0 Read JWT secrets from Vault instead of dynamic_settings
refs AE-45
flag=none

test plan:
- specify `canvas_security` values in `vault_contents.yml`
- confirm they're loaded correctly when calling `CanvasSecurity` methods,
  like `services_encryption_secret`, `services_signing_secret`, and
  `services_previous_signing_secret`

Change-Id: Ib088eb2c123bcc32cfd6d67729916a6d7c5c2529
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314607
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>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
2023-05-15 18:59:18 +00:00
Aaron Ogata c1445538a7 clean-up kaltura client http client
refs AE-141

Change-Id: Ib6ac2857e7dd7dddeacbb64952055a8315775637
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317985
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2023-05-12 14:30:19 +00:00
Ryan Hawkins ed5bb5d067 Add Dev Keys Account Report
why:
- Customers would like a way to easily see what keys they have in their
  account, what permissions those keys have, and where those keys came
  from, all in a machine and human-readable format. Thus, a CSV report!

closes INTEROP-7944

flag=none

test-plan:
- Have a consortium setup.
- Create a key in the consortium parent account. Make sure the key is
  visible. It doesn't matter whether it is on or off.
- Create two keys in both the cross-shard and same-shard
  consortia child. Ensure you have at least one LTI key, either from the
  parent or in the child account. Additionally, select some scopes for
  the API key so that they show up in the report.
- Run the report in both accounts. You should see the inherited key in
  both reports and the keys specific to the child accounts in their
  respective reports.
- Make the parent key invisible and remove all scopes from the API key.
- Rerun the report and make sure that the parent key doesn't show up
  anymore and that the API shows as having access to "All" API
  endpoints.

Change-Id: I34ea4b894d21024321db7c8de17faf49d2c98686
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312364
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
Migration-Review: Isaac Moore <isaac.moore@instructure.com>
2023-05-11 15:40:08 +00:00
Aaron Ogata 25e347edd6 convert incoming_mail_processor to using vault
refs AE-254

Change-Id: I0f1cb98b83464e4cef3e2843fe844a644f4f0bf6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317865
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>
2023-05-11 15:01:37 +00:00
jake.oeding f8b6ad34d0 re-enable data sources in various tags
we used to allow data protocols in src attributes
in the following tags: audio, video, source, and
track. this patch re-enables that ability

fixes LF-18
flag=none

test plan:
*pre-req: have an access token that you can use to
 make an API request
-prep a POST request to:
 http://canvas.docker/api/v1/courses/<id>/pages
-in the wiki_page[body] field of the request, add an
 audio, video, source, and track tag
-for each tag, add a src="data:anything" attribute
-make the request
>confirm that the src attributes aren't stripped from the
 body field in the response

qa risk: low

Change-Id: I52db5ad1fcefd410d8c7339a9bd27300080196c6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317903
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: Jake Oeding <jake.oeding@instructure.com>
2023-05-11 14:07:30 +00:00
Mysti Lilla 380e639f5d Clarify save_attachment?
refs MAT-1350
flag=none
qa risk: very low

Test plan
- Using local files and s3 files
  make sure you can upload a file
- Make sure images still have
  thumbnails like they shoud

Change-Id: Ifbdd2c547b28333bece8ae246a2fa54d25a316cf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317829
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2023-05-10 20:34:43 +00:00
Cody Cutrer 538ce90ed8 bump sanitize
Change-Id: I0fbecb820d59af3b38963b7782abc96c33394ea9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317823
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-05-10 13:33:27 +00:00
Cody Cutrer 6b6190d6d4 bump redcarpet
Change-Id: I53cf6a5690d0f3a24106ee333cc2a5f6cde32afe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317822
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>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
2023-05-10 13:33:15 +00:00
Cody Cutrer 833b17facb bump oauth
Change-Id: Ieef103d6986c42ab9a1feaad247796a3e4a1cb21
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317821
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>
2023-05-10 13:33:04 +00:00
Cody Cutrer f00ee1e5db bump nokogiri
Change-Id: Ib1bee8241147cfac7cd6bfd778c0fc6c271f8467
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317808
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-05-09 22:58:11 +00:00
Cody Cutrer 5d6c6d5def bump rack
Change-Id: I98ff462a8719be0c18f54763746be0a02b890bd3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317807
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-05-09 22:57:57 +00:00
Cody Cutrer 2ad4ea5d18 fix lockfile syncing from canvas lockfile to sub-gems
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>
2023-05-09 22:57:42 +00:00
Cody Cutrer 1dc67d2ae2 bump httparty
Change-Id: I276f4c2833757e41de960650c08e68a0afc808a6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317802
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-05-09 19:46:20 +00:00
Cody Cutrer 9f7eb93367 bump inst-jobs
Change-Id: I5a750e65687b598848dec3548adedf1edb473cd7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317670
Reviewed-by: Xander Moffatt <xmoffatt@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>
2023-05-08 16:24:38 +00:00
Cody Cutrer dd20ce4d7c bump switchman
closes AE-164

Change-Id: Ib35763088ce2449f93ab64cf0be3f54b71004b6d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317496
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-05-04 17:09:08 +00:00
Cody Cutrer 92f0d11892 bump i18n
this includes a fix for https://github.com/ruby-i18n/i18n/issues/639,
and thus we need to adjust a spec

Change-Id: I5b1425245f942dcdfdcfa34863ec43c1afe6ff0f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317518
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-05-04 16:16:29 +00:00
Cody Cutrer aa4c092467 use Arel for EXISTS sub-queries
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>
2023-05-02 17:30:40 +00:00
Jacob Burroughs 6f0bafa7d1 Remove * from dynamicsettings cache key
Change-Id: If5e931ae6c426fe845e1cb9c6301304f2dd201a4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317437
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>
2023-05-02 17:13:15 +00:00
Omar Gerardo Soto-Fortuño 5a49211252 Do not broadcast messages to suspended users
fixes VICE-3244
flag=none

test plan:
  - Specs pass.
  - Enroll a user in a course and note his ID.
  - As a teacher, create a new Announcement (or
      anything else that will trigger a notification).
  - Notification should be sent, you can verify on
      /users/[ID]/messages
  - As an admin, go to /users/[ID] and click on Suspend User.
  - Try creating another announcement.
  - Notification shouldn't be sent.

qa risk: low

Change-Id: Ia8a484901c76391c92f6d3f4e51a9046426b0f87
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316576
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Chawn Neal <chawn.neal@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2023-05-02 16:17:39 +00:00
Cody Cutrer 502aa068da rubocop: Layout/Multiline*LineBreaks
[skip-stages=Flakey]

Change-Id: I24912809267088bc19a4082c49bc5f78ca7b76bb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317302
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: 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>
2023-05-01 19:31:42 +00:00
Aaron Ogata 2a3e6b04af fallback to vault if encryption_key not in config
refs AE-61

Change-Id: I9e38c8a1ab15bcdc6924198a480c20b639dfb8a4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317283
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>
2023-04-28 21:26:39 +00:00
Jeremy Stanley b14357d4d1 handle missing developer key in user access token report
test plan:
 - hard-delete the developer key linked to an access token
 - run a user access token report
 - the report should complete (with an empty column for the
   missing developer key's name)

flag=none
fixes FOO-3388

Change-Id: If44a65ec99846bada0685edaa32047021ca1897d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316449
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2023-04-25 16:07:33 +00:00
Aaron Shafovaloff 4b66bcae5c remove CoffeeScript checking from gems/tatl_tael
test plan:
  - existing tests pass

flag=none

refs EVAL-3055

Change-Id: I80bebc17e49473d9bb9a8b94ce55f9047b1b3f6f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316537
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2023-04-20 18:10:52 +00:00
Cody Cutrer 25461d73b8 bump inst-jobs
[skip-crystalball]

Change-Id: I42f3748bbde72653d242bf7815f9fb31576e8c7f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316253
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
2023-04-19 15:36:04 +00:00
Cody Cutrer dc4bdcccc0 bump rubocop and rubocop-rails
minor bugfix releases

Change-Id: I4543d90776855c2c53a79c3d9db9f9b8d522c4df
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316044
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-04-18 17:48:46 +00:00
Cody Cutrer 64c4308714 commit lockfiles for sub-gems
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>
2023-04-14 14:07:43 +00:00
Cody Cutrer 7144f0c66a bump rubocop-rails
I was able to replace one of our custom cops with a built in one
(just had to make it ignore older migrations).

Then I had to manually fix a couple of (important!) offenses

Change-Id: I000310bb6b065034384ba3a33ef5e37e22b9be5a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315855
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-04-14 14:07:34 +00:00
Cody Cutrer 7c37aa5f64 rubocop: prep for updating rubocop-rails
auto-correctable cops applied

[skip-stages=Flakey]

Change-Id: Ie80bdfd170d9233d4a750edce6be467c93f3493f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315835
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>
2023-04-14 14:07:22 +00:00
Cody Cutrer 62fc5c033d rubocop: prep for updating rubocop-rspec
auto-correctable cops applied

[skip-stages=Flakey]

Change-Id: I17e18e2e1a230ef7b27f01ddb7e587045eabf97f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315809
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>
2023-04-12 19:30:10 +00:00
Cody Cutrer 480e29c4d5 bump rubocop-performance
and apply new fixes

[skip-stages=Flakey]

Change-Id: Ie2f9057a435076c4b872175651cedf737b2c5696
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315800
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>
2023-04-12 19:29:39 +00:00
Cody Cutrer 1d3d9ed499 rubocop: fix miscelleneuos violations in prep of bumping rubocop
Change-Id: I9d37303737f00d6e022cb8fc08726e293a7336ab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315166
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>
2023-04-12 19:26:13 +00:00
Cody Cutrer dbfff50c2d rubocop: Layout
addresses minor changes in cops in rubocop 1.49

[skip-stages=Flakey]

Change-Id: I79503c905f59752d67391e70909e73441323faee
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315160
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>
2023-04-12 14:57:56 +00:00
Cody Cutrer e99e8c0049 remove unnecessary line continuations
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>
2023-04-12 14:57:18 +00:00
Cody Cutrer b2b0bff902 rubocop: Style/TernaryParentheses, Style/RedundantParentheses
[skip-stages=Flakey]

Change-Id: I8d860eedd8b199ed3adf0e2bf9162b43096c5347
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315130
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-04-12 14:56:48 +00:00
Cody Cutrer 76d29f5b2d rubocop: automatically ignore BookmarkedCollection.concat for Style/ConcatArrayLiterals
Change-Id: I6bbee140a20ab8bfe356a4cbbc5aa21deac913c4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315647
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>
2023-04-11 18:36:09 +00:00
Cody Cutrer 14f5fa1fdf remove unused i18n utils
Change-Id: I4db721d7e80adbe04c90f4a9a0548d268e607ca7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315541
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>
2023-04-11 18:35:57 +00:00
Cody Cutrer 828149374d rubocop: fix Migration/Execute for the common case of interpolation
Change-Id: I06e2335a5a099fb85767d41f6136d13206301a7e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315656
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>
2023-04-11 16:30:15 +00:00
Cody Cutrer d5fc701582 rubocop: add helper to easily silence all legacy migrations for any given cop
Change-Id: I076e5e7dd6abad9f3755f05a21c98a0c11a42111
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315652
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>
2023-04-11 16:14:37 +00:00
Cody Cutrer 1a8e56680c fix a couple crashes in rubocop-canvas
Change-Id: I0d4b603fef51d967ae457d1be2a68f7e91f10865
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315118
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>
2023-04-11 15:05:32 +00:00
Cody Cutrer fcd804d7fe rubocop: Lint/NonAtomicFileOperation
Change-Id: I161aeada3a9dcbbcc0042c94c97e0f2da1871f71
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315162
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>
2023-04-11 14:48:13 +00:00
Cody Cutrer 7c2814caf2 rubocop: Style/ConcatArrayLiterals
Change-Id: I19d66081860377a01fc4c60a947a05765b19ec14
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315164
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>
2023-04-11 14:48:01 +00:00
Cody Cutrer f46fef5599 rubocop: Style/MapToHash, Style/MapToSet
Change-Id: I75a78a3d86d5875b450d4f32c2f71d8a44a735f4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315125
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>
2023-04-11 14:41:55 +00:00
Cody Cutrer a5ed8666f4 rubocop: Style/FileRead, Style/FileWrite
Change-Id: I9b8196a100f3b10f9146cdd18fa0a859ea665cb0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315161
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>
2023-04-10 20:57:32 +00:00
Cody Cutrer c101827780 rubocop: Style/RedundantConstantBase
[skip-stages=Flakey]

Change-Id: Ie18389de5b45f433aa82a13f62daa2a5a9d44b80
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315120
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>
2023-04-10 20:56:27 +00:00
Cody Cutrer c1a8612e12 rubocop: Style/RedundantRegexpEscape
Change-Id: Idf4e1cee69240eebcbeab56f909c7aa21eea6f62
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315122
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>
2023-04-10 14:12:01 +00:00
Jacob Burroughs 0934e30455 Fix vendored gems
Change-Id: Iff3b5b8275989863fd35f94fbb5d18ef97fd84be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314969
Reviewed-by: Cody Cutrer <cody@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>
2023-04-03 17:11:23 +00:00