Commit Graph

1366 Commits

Author SHA1 Message Date
Aaron Ogata c75e7a3fdd explicitly require rss gem for ruby 3.x
refs AE-92

Change-Id: Id9a7d86f3367682c7fd0318c1e1e7ee8c4af33ca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/307293
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-12-13 16:40:37 +00:00
Aaron Ogata 783ae3400d bump switchman to latest
refs AE-1

Change-Id: I9346bb2c94d57a37279549ca54b457442985d558
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306966
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
2022-12-08 18:12:05 +00:00
Aaron Ogata 7883fce765 replace default_scope override with rubocop linter
refs AC-1

Overriding default_scope here causes statement caching to never be used, so replace it with a rubocop linter.

Change-Id: Ifbe84a87ab19fc2f6032ed982fcbe8019e765dd1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305925
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2022-11-22 19:42:05 +00:00
Jackson Howe 63314913a9 Bump webdrivers to 5.2.0
This release fixes an issue where the wrong chromedriver url is
fetched for M1 macs.

Change-Id: Ib0f1c00a217e7f9a954bb6d0d25f5d65f999cec8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305239
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2022-11-12 00:06:27 +00:00
Jacob Burroughs db8f6fbb12 Bump rspec
Change-Id: I40e3383cabadd55ca9a8d1777ffebe437491e285
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304563
Reviewed-by: Aaron Ogata <aogata@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>
2022-11-02 16:51:50 +00:00
Aaron Ogata 1f2f837a55 bump factory_bot to latest version
Change-Id: If0c5b01410c070805e0bb562b40b41d3d671985d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304442
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
2022-11-01 15:57:23 +00:00
Jeremy Stanley 67b6d3f50d add jobs2/throttle endpoint
test plan:
 - queue some jobs, not in a strand, using the same
   or similar job tags (i.e., Foo#bar and Foo#baz)
 - use GET /api/v1/jobs2/throttle/check?term=Foo
   and verify that it counts the proper number
   of jobs and tags
 - use PUT /api/v1/jobs2/throttle?term=Foo&max_concurrent=X
   and verify that it applies a strand to the matching
   jobs and returns the name of the strand along with
   the number of jobs modified

flag=jobs_v2
refs DE-1347

Change-Id: I94cc0c80d26c52eb524440e933e52b970e388716
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/303821
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2022-10-31 17:47:08 +00:00
Jeremy Stanley fcd1adf380 global job stats / job cluster unblocking
test plan:
 - enable jobs v2 feature
 - the jobs page should have a new "Job Stats" button at the
   top-right corner
 - clicking it takes you to /job_stats
 - this shows running/queued/future/blocked counts for each
   job cluster
 - if any shards have jobs_held or block_stranded set to true,
   a pill should call this out on the shard's job cluster
   and hovering should show the id(s) of the affected shard(s)
   (also a button will copy this info to the clipboard for you)
 - you can refresh an individual job cluster with the refresh
   button on a row
 - if you have "manage_jobs" permissions from site admin, a
   wrench button will appear next to a row with blocked jobs
   (to fake a blocked job:
    delay(strand: 'foo', next_in_strand: false).sleep(1)
   )
 - clicking the button will run the job cluster unblocker
   and refresh the row

flag=jobs_v2
closes DE-1414

Change-Id: Ib0d03a193b67911e80541adcdf937b6e84239372
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/302268
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2022-10-24 20:52:35 +00:00
Aaron Ogata 97dffd25ee introduce bootsnap
refs DE-1383

Change-Id: I6ab3efff2328717a74626a4fc2b4e171e41bcb06
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293150
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-10-04 13:18:03 +00:00
Jeremy Stanley 67bad2013f API to unstuck strands/singletons w/o next_in_strand
test plan:
- queue some jobs in a new strand while explicitly setting
   next_in_strand to false, e.g.

 5.times { delay(strand: 'sad', next_in_strand: false).sleep(1) }

 - also queue a singleton that way:

 delay(singleton: 'stuck', next_in_strand: false).sleep(1)

 - verify the strand and singleton are orphaned in the jobs_v2
   user interface (strand / singleton tabs)
 - do PUT /api/v1/jobs2/unstuck?strand=X, refresh the page,
   and verify that the strand is unstuck
 - if max_concurrent is > 1 on a strand, the PUT should unleash
   the right number of jobs and return the count
 - do PUT /api/v1/jobs2/unstuck?singleton=Y, refresh the page,
   and verify the singleton is unstuck
 - ensure the unstuck endpoint returns 0 when called on a
   strand or singleton that isn't stuck
 - ensure the unstuck endpoint returns status 404 when called on
   a strand or singleton that doesn't exist
 - run PUT /api/v1/jobs2/unstuck without specifying a singleton or
   strand, and it should queue a job that unstucks all the stucks.
   it returns progress information you can query using the
   Progress API (which will unfortunately go straight from 0
   to 100% unless you are in an environment with multiple jobs
   shards)
 - sanity check increasing strand parallelism (since the
   `unleash_more_jobs` functionality was moved into
   the gem)

flag=jobs_v2
refs DE-1314

Change-Id: I687163f2d104aa5ef9cd1621d7081cc38343361e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/300662
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2022-09-26 18:07:12 +00:00
Justin Mitchell 1075cdbbd2 Bumped ruby-debug-ide version to .3
closes GH-2084
closes EVAL-2655
flag=none

Test Plan:
- specs pass

Change-Id: Ife17062af9306637155367f2260f125e8e179c0f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/301634
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2022-09-22 16:04:38 +00:00
Jacob Burroughs ae51c95095 Safer jobs moves
only clear the shard cache from multicache, and therefore
support distributed `delete_matched`

Change-Id: Iebda2e8b2df0a1aa85997c2ede47b113f0fadc15
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/300099
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-09-01 19:29:17 +00:00
Jacob Burroughs 53953aaf4b Replace our homegrown link finder with twitter-text
While I am at it, decaffinate and typescriptify TextHelper

fixes FOO-2987

Change-Id: I0b8f33a610bee737ea79ad24d8aec8f8e8051c49
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/299013
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Bobby Buten <bobby.buten@instructure.com>
2022-08-19 17:01:10 +00:00
Jacob Burroughs b8ec9f23f1 Bump i18nliner again
Change-Id: I3e67f7feafe50063329d28b0306734a97f669f92
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/298279
Reviewed-by: Charley Kline <ckline@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>
2022-08-10 22:04:14 +00:00
Jacob Burroughs 2f97fdff69 Use i18nliner that can escape asterisks
refs FOO-3042

Change-Id: I714a32dbfbf6b986573f0c8e681ad740239bc82f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/298188
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-08-09 20:26:29 +00:00
Jacob Burroughs 7fe6e770c9 Bump switchman
And for now allow writable shadow records, though we should fix
whatever is writing to them

Change-Id: I77eeb713684c36bd8cf38897c438121a858210e8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/297787
Reviewed-by: Ben Rinaca <brinaca@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>
2022-08-03 19:27:23 +00:00
Ben Rinaca 3b9798fca0 bump diplomat
fixes FOO-3038

flag = none

this version of Diplomat actually supports the `filter` argument for
`Diplomat::Health#service`. that'll help our abandoned jobs cleanup
worker to find disappeared nodes more quickly when it tries to filter by
`"not Checks.Status == critical"`.

test plan:
* canvas should still be able to read from consul

Change-Id: I70f48b91fd5d7c4034ad398b4463467d3ec02737
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/297704
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ben Rinaca <brinaca@instructure.com>
Product-Review: Ben Rinaca <brinaca@instructure.com>
Reviewed-by: Sean Scally <sean.scally@instructure.com>
2022-08-03 19:19:19 +00:00
Xander Moffatt 73cd068565 update switchman_inst_jobs to 4.0.9
why
* fixes a bug where jobs enqueued during a
Shard.with_each_shard were queued on the original shard
and not the currently active shard

refs INTEROP-7408
flag=none

test plan:
* none

Change-Id: Ie532c0b887cc45a58ba850d4c226d8f8484ee9b8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/297441
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Hawkins <ryan.hawkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2022-07-29 22:40:14 +00:00
Ievgenii Matkivskyi f966d077c8 Revert "Add converter to utf-8 for imports"
flag=none
Closes SOS-2811

This reverts commit b95dafe9b0

Test plan:
  - Run Roster import job from sistemic

Reason for revert: Invalid byte sequence happening in production.

Change-Id: I5af469957f955aea393c7f8393648c0c9be477fe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/296804
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tamas Nagy <tamas.nagy@instructure.com>
Reviewed-by: Balazs Komaromi <balazs.komaromi@instructure.com>
QA-Review: Ievgenii Matkivskiy <ievgenii.matkivskiy@instructure.com>
Product-Review: Ievgenii Matkivskiy <ievgenii.matkivskiy@instructure.com>
2022-07-25 11:09:28 +00:00
Jacob Burroughs b3c933a0fb Bump switchman for native shadow records
[pin-commit-multiple_root_accounts=5629aede86e3f2cf41556a4c2cb8e107d578de2a]

Change-Id: Iab0571e307c167eb6782d26773fe69055064d243
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/296581
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ben Rinaca <brinaca@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-07-20 17:55:17 +00:00
Jacob Burroughs b5d0b859a6 use an actually working version of inst-jobs
Change-Id: I3e58d239de6e94d930e1fe1c7c4df7e1f6b8997b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/295687
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-07-07 19:55:26 +00:00
Xander Moffatt 15944e00ab update switchman-inst-jobs
why:
* discovered a small bug where jobs queued inside a
`Shard.with_each_shard` where queued on the original shard
and not the current one inside the block

refs INTEROP-7408
flag=none

test plan:
* stop your jobs container/process
* in a rails console, run `Shard.with_each_shard { <enqueue some job> }`
* go to canvas.docker/jobs_v2 and search for queued jobs with a tag that
matches the jobs that you queued
* confirm that the jobs for each shard have that shard as their Shard

Change-Id: I99bb339ac921d98d97e614f92b75efdb5fa8af77
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/295483
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Hawkins <ryan.hawkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2022-07-05 17:24:53 +00:00
Jeremy Stanley 68c5aa5a30 Revert "Bump inst jobs for connection clearing"
This reverts commit fe33b7e7ac.

Reason for revert: Job server fails to start with uninitialized constant error

Change-Id: I098ba42ba711e0f525bec560d2e6d628ef15ced9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/295119
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2022-07-01 20:51:21 +00:00
Jacob Burroughs fe33b7e7ac Bump inst jobs for connection clearing
Change-Id: I249107ef231d0fdb155d20105d057e22c19dad3b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/295299
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-07-01 16:48:37 +00:00
Jacob Burroughs 55b3c879b5 Fix some rails 7.0 specs
[ignore-stage-results=Flakey Spec Catcher]

Change-Id: I969034adc9f70d7cec2e150e1e02676c0977e49a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293321
Reviewed-by: Aaron Ogata <aogata@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>
2022-06-07 21:39:33 +00:00
Ed Schiebel fd7e122969 Recurring events: add create series to calendar_events api
This commit adds code to calendar_events_api_controller#create
for parsing an rrule parameter to create an event series.

see https://icalendar.org/rrule-tool.html for help creating RRULEs

closes LS-2799
flag=calendar_series

test plan:
  - enable site admin flag calendar_series
  - POST to /api/v1/calendar_events and event including an rrule param
    for example:
    {"calendar_event":{"context_code":"course_84","title":"an event",
     "start_at":"2022-06-03T06:00:00-04:00",
     "end_at":"2022-06-03T06:30:00-04:00",
     "rrule":"RRULE:FREQ=WEEKLY;INTERVAL=1;COUNT=2"}}
  > expect a response with the first event in the series, plus the rest
    in the duplicates array.
  - try with errors
    - an RRULE with COUNT > 200
    - an RRULE with COUNT <= 0
    - an RRULE using UNTIL that creates > 200 events
    - an RRULE with no COUNT or UNTIL
    - an RRULE that's not valid
  > expect a 400 response

Change-Id: Ib7282bbe1b7ab0cb27ce3e351d0be4622208a212
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293153
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2022-06-07 14:07:41 +00:00
Ievgenii Matkivskyi b95dafe9b0 Add converter to utf-8 for imports
flag=none
Closes SOS-2428

Test plan:
 - Upload archive with Users.csv in ISO encoding
 - Upload archive with Users.csv in ASCII encoding

Change-Id: I680c0b343c3b0374fd7e207eb1f43e063b1c104a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287235
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ievgenii Matkivskiy <ievgenii.matkivskiy@instructure.com>
Product-Review: Ievgenii Matkivskiy <ievgenii.matkivskiy@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Reviewed-by: Balazs Komaromi <balazs.komaromi@instructure.com>
Reviewed-by: Tamas Nagy <tamas.nagy@instructure.com>
2022-06-07 09:54:21 +00:00
Jacob Burroughs 133165106b Boot on rails 7.0
Change-Id: I61d5ba9f6ef5e0837da2ec22b695b9a56b88acb5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293104
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-06-06 13:55:46 +00:00
Jackson Howe c3b1fef1d5 Pin multipart-post to 2.1.1
since v2.2.0 conflicts with our Multipart gem

closes CNVS-55656
flag = none

Test plan:
 - Attach a file as a comment in speedgrader
 - Expect it to work

Change-Id: Ifff1188b0fb802ecbe6a6d76821892d842504f85
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293239
Reviewed-by: Ben Rinaca <brinaca@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Alex Slaughter <aslaughter@instructure.com>
2022-06-03 18:04:30 +00:00
Jacob Burroughs c7bf5fba48 Remove rails 6.0 support
Change-Id: I0df8f625c119b2622e358a5d663c158e2d7d7cb8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/292904
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-05-31 22:13:22 +00:00
Isaac Moore fd540f6f7c Update `inst-jobs` and `inst-jobs-statsd`
This will result in new `create` and `complete` statsd metrics being
emitted for jobs.

closes DE-1124
flag=none

test plan:
- ensure that Canvas boots correctly and jobs are queued/executed
correctly:
  - with a local statsd server running
  - without a local statsd server running

Change-Id: I4d451e61e3ddb397c371d46b0e2e0a34ae9295c5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/292758
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
2022-05-31 17:51:25 +00:00
Jeremy Stanley c28a19bc45 requeue failed job
test plan:
 - create a job that will fail
   (e.g. `delay.raise "whoops"`)
 - find the failed job in /jobs_v2 and click its id
 - scroll down to the job details table and click the
   "requeue job" button
 - the job should be requeued and the id of the requeued
   job should appear in place of the button
 - search that id and you should find the newer failed_jobs
   entry (after the requeued job fails)

flag=jobs_v2
closes DE-1194

Change-Id: I33d637db616aad1ec431428e7c5c60c6253660aa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/292334
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Migration-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2022-05-28 00:08:22 +00:00
Aaron Ogata 498d69b130 Revert "Update `inst-jobs` and `inst-jobs-statsd`"
This reverts commit 95963e668a.

Reason for revert: broke beta

Change-Id: I0c4b13e362f72f72db8e68d8c701354ab27d8868
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/292424
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Aaron Ogata <aogata@instructure.com>
2022-05-26 17:52:55 +00:00
Isaac Moore 95963e668a Update `inst-jobs` and `inst-jobs-statsd`
This will result in new `create` and `complete` statsd metrics being
emitted for jobs.

closes DE-1124
flag=none

test plan:
- ensure that Canvas boots correctly and jobs are queued/executed
  correctly:
    - with a local statsd server running
    - without a local statsd server running

Change-Id: Iaccf0c7094de1be8dae5571aaccbf5c301213978
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/292622
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
2022-05-25 19:25:40 +00:00
Jacob Burroughs 5ac72b3cc2 Bump guardrail
Change-Id: I558e18b97cee363f46a2536e06f693db11c8fd4c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/292311
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-05-20 18:56:01 +00:00
Evan Battaglia 9ee38b469b Convert newlines to CRLFs in params used in signature base strings
LTI 1 launches (and LTI 2 launches using the same OAuth 1 signature
method) use a form with hidden fields to send the parameters to the LTI
tool. Browsers always send newlines in hidden input fields (i.e. params
encoded as form data) as carriage return + line feed (%0D%0A = "\r\n").
As a result, if any launch parameters include newlines, the tool will
get "%0D%0A" in the query params for them.

Currently, though, we calculate the base string as if the newlines in
the parameters are just "%0A". This commit changes the newlines to CRLF
before-hand to simulate what browsers do. (I then use the CRLF'd version
for the actual parameters ... this eliminates any possibility of any
differences due to weird mixed LF and CRLF endings or anything, and
browsers don't add extra CRs if endings are already CRLF.)

refs INTEROP-7387
flag=none

Test plan:
** SETUP **
- on line 210 of app/controllers/lti/message_controller.rb, right before
  the end of the lti2_basic_launch method, add the following line:
    Lti::Logging.lti_1_launch_generated(message.message_authenticator.base_string)
- have the following LTI tools installed:
 - an LTI 2 tool with the Canvas.placements.similarityDetection
   placement (that should be in the MessageHandler's 'capabilities')
 - an LTI 1 tool with extension_setting "oauth_compliant"
 - an LTI 1 tool without extension_setting "oauth_compliant" (and
   double-check sure disable_lti_post_only "Don't Move LTI Query Params
   to POST Body" feature flag is off)
- For the LTI 2 tool, add "ResourceLink.description" to the
  MessageHandler's "capabilities".
- For the LTI 1 tools, have a custom parameter
  with the value "$ResourceLink.description" (there might be a way to
  sent this as resourcelink_description instead of a custom parameter, I
  don't know what it is) and give it the similarity_detection placement
- Open the copyasfetch_verify_oauth_signature.rb script (attached to the
  ticket). Find the secrets for your LTI 1 and LTI 2 tools as described
  in the script. Adjust the `secret_for_url()` method there for your
  tools.

** LAUNCHING AND TESTING **
- Launch the tools in the following ways in a browser that supports
  "copy as fetch" (Chrome and Firefox do). (Note that you don't need the
  tools running / working, we just need to look at the launch.)
  - for the LTI 2 tools and LTI 1 tools, create a new assignment. In the
    text field add some bullet points. Under Submission Type choose
    Online -> Text Entry. Then choose the tool in the Similarity
    Detection dropdown. The tool will launch.
  - For the LTI 1 tools, also make assignments with the description with
    bullet points but of type LTI assignment by choosing the tool. Then
    launch the assignment.
- For each launch, verify the base string for the launch as follows.
  - In the logs, the base string is logged:
      grep base.string log/development.log
    Check that newlines are encoded as %0D%0A (which when double-encoded
    in the base string is %250D%250A). If you want, to unencode one
    level you can use:
      ruby -e 'require "cgi"; puts CGI.unescape(ARGF.read.split("&").last)'
  - Go to dev tools, find the launch in the Network tab, right click and
    choose "copy as fetch". Save to a file and pipe into the
    copyasfetch_verify_oauth_signature.rb script. It will tell you if
    the expected signature matches the one used in the launch. Also
    verify that the base string used includes CRLFs, i.e. "%250D%250A".

Change-Id: I7d70f7740612ad25cb3ff61940d05e97a5a87aea
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/290806
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
2022-05-17 17:20:23 +00:00
Jacob Burroughs 20acf8163e Bump switchman
Change-Id: I23b290ecc89fb3c563e9df615aa7d1435b31cc8b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/290725
Reviewed-by: Aaron Ogata <aogata@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>
2022-04-28 17:24:53 +00:00
Jacob Burroughs 9ca9d4d455 Bump switchman
Change-Id: I10c13d1d8e394c9400bc22cfdf8cc02ad2f209bb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/290399
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-04-25 21:08:40 +00:00
Jacob Burroughs f6121de2d4 Bump switchman
Change-Id: If14b7962f3b386fcfc097503394d27d8f58cbace
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/289192
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
Reviewed-by: Aaron Ogata <aogata@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>
2022-04-07 17:38:26 +00:00
Jacob Burroughs 7ad5108c4c Bump switchman, again
Change-Id: Id3f440266486296f58b4501d3c7398e2d3ea7437
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/289044
Reviewed-by: Aaron Ogata <aogata@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>
2022-04-06 19:17:46 +00:00
Jacob Burroughs 080a769f3c Bump switchman
Change-Id: I06feda486092452eeb7cd648a504ae4797a5a5af
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/289028
Reviewed-by: Aaron Ogata <aogata@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>
2022-04-06 16:30:10 +00:00
Jacob Burroughs f11caf4435 Bump switchman
Change-Id: I1ddb2a45c15bf7c245dc01dc8a006d8e18237c9e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/289009
Reviewed-by: Aaron Ogata <aogata@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>
2022-04-06 14:13:18 +00:00
Aaron Ogata 72e3428da7 add job context to short log format
refs DE-1125

Change-Id: I606f8d3ff61f27f658c744287b43183205469a9f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/288950
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-04-05 19:48:54 +00:00
Jacob Burroughs e8ae65f4c8 Bump switchman
Change-Id: I7744ed7392a4b9a5dfb0b12b25dda6a01ac31e68
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/288941
Reviewed-by: Aaron Ogata <aogata@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>
2022-04-05 19:18:12 +00:00
Aaron Ogata a5cb130154 add rails version to Gemfile.lock
refs DE-523

Previously, the current version would be represented by Gemfile.lock and the next version by Gemfile.lock.next. Replace both with a common format of Gemfile.rails<version>.lock to be able to iterate over the files in a cleaner way.

Change-Id: I35aef3a14e726eb35db8aebc808af4a925552c01
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/288563
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>
2022-03-31 17:01:45 +00:00
Aaron Ogata 682e2c54f2 automatically delete failed jobs after n months
refs DE-1120

Change-Id: I39aa0a1afa4c8aa505cddf101fe8d78a909374da
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/288528
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-03-30 22:48:32 +00:00
Jacob Burroughs 282d6e3692 Bump switchman
Change-Id: If0ce6d8005dcbd1f6786a67db49b67fa6caab5ba
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/288247
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
2022-03-28 15:27:34 +00:00
Jacob Burroughs 6f373aa3c7 Bump parallel
Change-Id: I79cbfabf43ecdb9e0247343bdab951baf32ae986
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287964
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
2022-03-24 20:39:33 +00:00
Jacob Burroughs f4be7b34bb Bump rails
Change-Id: Ic0e73e43b78ffd5b02c435facf80eb89b08bf876
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287946
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2022-03-24 19:17:49 +00:00
Jacob Burroughs bfb87b7efc Bump switchman
Change-Id: I3dc1f153d8d635bad50b7b77826d7044679ceba8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287956
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-03-24 18:59:09 +00:00
Aaron Ogata 0e13f0d033 replace CANVAS_RAILS6_x variables with CANVAS_RAILS
refs DE-523

Test Plan

1. Ensure CANVAS_RAILS override works
2. Ensure file override works
3. Ensure consul override works

Change-Id: I6eea63bba5c401428c02179a3d6187c8265ce33e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287849
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-03-24 18:14:52 +00:00
Jacob Burroughs 2092be993f Bump switchman
Change-Id: Icbb684949a9c8fb2b472ce6f9fddc0d2833b1ec2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287846
Reviewed-by: Aaron Ogata <aogata@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>
2022-03-23 21:03:32 +00:00
Aaron Ogata b9ad4f562c bump switchman
Change-Id: I7e50b01c94f420447e0e52ccbff8a9db1b3e3351
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287805
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-03-23 16:33:13 +00:00
Jacob Burroughs b97f29ba03 Remove CANVAS_ZEITWERK
Change-Id: Ia83164d6f145af4d60303e139a13bd2e68d6e7eb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287703
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
2022-03-22 22:51:19 +00:00
Jacob Burroughs ca5473f2b1 Bump switchman
Change-Id: I2c82c7514d067dde79ebb2b8a737b6f26ef3498f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287715
Reviewed-by: Aaron Ogata <aogata@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>
2022-03-22 21:52:29 +00:00
Jacob Burroughs 2ee5122f0f Patch the cache namespace earlier in boot
And bump switchman to patch the pg adapter earlier in boot

Change-Id: I88baa87b0894e7252229109f2e0b89af10754ca9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287663
Reviewed-by: Aaron Ogata <aogata@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>
2022-03-22 19:36:32 +00:00
Jacob Burroughs a057114f43 Bump switchman
Change-Id: I6bcce0e81b6a79dc5e0a693d3fc4669437643d8a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287546
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
2022-03-21 16:05:30 +00:00
Brian Watson 1145a30d2e Upgrade stormbreaker to 0.0.8
flag=none

Test-plan:
- axe build still passes

Change-Id: I28fd178a0704fe1ba0e3b39d7a58f67862bd7e40
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286678
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
2022-03-11 22:58:37 +00:00
Ed Schiebel 2636d96e21 Update canvas_connect gem
This gets the gem update from pull request
https://github.com/instructure/canvas_connect/pull/15

closes LS-3032
flag=none

test plan:  it was tested in github, but if you want to again
  - in /plugins select AdobeConnect,
  - set domain and meeting folder to http://your.ip.address/, login id and password to anything
  - in /calendar, create a calendar event with an adobe connect webconference
  - refresh the calendar
  > expect the calendar_evens api call to return the event with web_conference data
  > expect the event to show up
  > expect an error logged in your console
  - If you want to prove it still works if there is an adobe, I have a perl script webserver and data file that mocks Adobe Connect

Change-Id: I58770baeb7006d65681431f032894209e04c259d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286812
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2022-03-10 21:07:13 +00:00
Aaron Ogata eac76c6c71 bump switchman to 3.x
refs FOO-2746

Change-Id: I494ceed28f06049267f0d58b6f3800885e64cecb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286727
Reviewed-by: Jacob Burroughs <jburroughs@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>
2022-03-10 13:04:53 +00:00
Aaron Ogata a1cf1ed6d3 bump switchman to latest 2.x branch
refs FOO-2746

[skip-crystalball]

Change-Id: I47bc4228b6012a985dbb176f173142879d91458c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286599
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>
2022-03-09 18:15:37 +00:00
Brian Watson 2f2a27d91b Upgrade to Selenium 4
Switches from standalone containers to explicit node+hub config

Selenium 4 has some differences in handling stale elements that we
should be aware of moving forward

closes OUT-4988
flag=none
[skip-stages=Flakey Spec Catcher]

Test-plan:
- make sure screenshots can happen for failures
- retrigger a few times and make sure things pass
- verify build summaries are intact
- verify FSC can still run seleniums
- verify local selenium running still works
  - firefox / chrome / edge where applicable
- verify docker selenium running still works
  - firefox / chrome / edge where applicable

Change-Id: I8f2fe5a34d712b5ccd7191bae7a9aeeb6f1f473d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284811
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
2022-03-09 15:28:31 +00:00
Aaron Ogata a7f3197352 support pinning commonly modified gems to specific versions
Change-Id: I1bb63c1c1af144678236cd1a7ea63d1e10c666a4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286541
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-03-08 17:33:30 +00:00
Jacob Burroughs 7d0d80bdc8 Stop leaking siteadmin ids from spec setup
Change-Id: I9370a96eb9eb0fde8c11f0243dc0785489002a55
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285831
Reviewed-by: August Thornton <august@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-02-25 23:11:11 +00:00
Aaron Ogata 77732bfb7e bump inst-jobs
Change-Id: Idf67d8968dbe22b7442328d3ffbc2ba1bd882889
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285852
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>
2022-02-23 19:51:27 +00:00
Aaron Ogata b70b8fa918 bump inst-jobs for job migrator race condition fix
refs DE-923

Change-Id: Id1ba0c3cb87b543077d69f0d87353327f3b42617
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285790
Reviewed-by: Jacob Burroughs <jburroughs@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>
2022-02-23 15:11:31 +00:00
Isaac Moore 8530016136 Update Sentry Ruby SDKs to 5.1.0
This version update includes several bug fixes and new features.

flag=none
closes DE-1054, DE-1033

test plan:
- verify errors and transactions are still captured
- verify that traces which have a parent transaction abide by the parent
  transaction's sample decision (if the trace ID ends in `1`, the trace
  is sampled; if it ends in `0`, it is not sampled)

Change-Id: I0763239e8b9ba962306d81de4987769ca32ef000
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285105
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
2022-02-16 22:36:45 +00:00
Jacob Burroughs 209cea8027 Rails 6.1 basic spec functionality
Change-Id: I89129633731a68c38a5026b6b26318d1f3699a2a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284968
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-02-16 17:31:11 +00:00
Jeremy Stanley 9960127819 remove unused gem testingbot
it's not compatible with ruby 3 and it hasn't been used since
we stopped running selenium specs on internet explorer

Change-Id: Iad79eeb57b4ce7a1f972e223278accef79966a99
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285262
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2022-02-15 23:33:40 +00:00
Aaron Ogata 12b16265e9 bump inst-jobs and switchman-inst-jobs
refs DE-923

Change-Id: I3720242a11053fe7a6b3e539e159af1df5478686
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284446
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-02-04 18:35:30 +00:00
Isaac Moore 3982a41bb8 Update Sentry Ruby SDKs to latest version
Sentry recently dropped the `faraday` requirement from their Ruby SDKs,
which means we no longer need to use our fork which set the dependency to
an older version.

flag=none
closes DE-1012

test plan:
- verify Canvas starts successfully
- verify exceptions are reported to Sentry correctly
- verify APM transactions are reported to Sentry correctly

Change-Id: Ifc9a290c21b0fdb5cb15b4ec542d467fa562cdd9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284270
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
2022-02-03 17:58:26 +00:00
Jonathan Guardado 45e50601c4 Fix wordcount in attachments being slow in large courses
This PS uses most of the work done in the previous implementation.
The main difference is the moment when the word count is calculated,
a new column was created to store this value at the moment of
saving the file, this will avoid requesting the AWS s3 bucket for
each file when loading the speed grader

flag=word_count_in_speed_grader
fixes LS-2922
test plan:
- Enable word count in speed grader flag
- In a course that has many attachments in speedgrader
- Create an assignment that requires submissions
- Submit a PDF, RTF, TXT, and DOCX file
- In speed grader, verify the word counts are present when
selecting the different files

Change-Id: I7262afe43787ffdf7859fbf2d10cd16a52521996
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283607
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
2022-02-03 17:37:11 +00:00
James Butters 0ca63f7991 use most recent rspecq version to get specific build times
rather than trying to calculate the build times, use the new rspecq
version that now adds the buildTimes to redis.

flag = none

Change-Id: I40544859e2be2831f140fa45387922036af8cd8c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284181
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Bobby Buten <bobby.buten@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2022-02-02 19:07:07 +00:00
August Thornton 9ed779733e bump ffi to resolve build error on Ubuntu
flag = none

Test plan:
• run `bundle install`
• run `bundle exec rails canvas:compile_assets
• verify no errors related to commit message

Change-Id: Ifff4a6c32bf517b35a6981bb14a17b159368ff9b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284109
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2022-02-01 20:27:12 +00:00
August Thornton a906d73a94 bump debase gem for ruby 3+ compatibility
The ruby debug open source contributors have released a beta form of
debase to address Ruby 3.0.0+ compatibility. Their main goal is to
migrate from debase to the new debugging gem bundled with new ruby
versions, so it's not a priority for them to release something that
is non-beta.

See: https://github.com/ruby-debug/debase/issues/92 for more info.

flag = none

Test plan:
• `bundle install` doesn't blow up with a fresh install of Ruby 3+

Change-Id: Ib476ce0eed6a5b6a9f006d9355323857cd7db470
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284078
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2022-02-01 18:52:41 +00:00
August Thornton 043a9e416a bump ffi to fix TypeError: Unable to resolve type 'size_t'
flag = none

Test plan:
• run `bundle install`
• run `bundle exec rails canvas:compile_assets
• verify no errors related to commit message

Change-Id: I0e9a4adfbff519970ec64e3436e10d4a41081985
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284079
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2022-02-01 18:52:29 +00:00
Isaac Moore 3294460221 Add option to enable Sentry APM
Because APM collects performance monitoring data about each request or
job execution, this results in a large amount of additional data being
sent to Sentry. For this reason, APM is off by default, and the rate of
sampling is configurable in a setting.

Settings related to this change:

- `sentry_backend_traces_sample_rate`: the APM sample rate, with a
  default value of 0.0 (max value 1.0, although this isn't recommended)

refs DE-922
flag=none

test plan:
- ensure you have Sentry running at sentry.docker and have a DSN
  configured in `config/sentry.rb`
- confirm that, by default:
  - no traces appear in the "Performance" section
- change the `sentry_backend_traces_sample_rate` setting to `1.0`
- restart rails and job servers
- confirm that:
  - traces now appear in the "Performance" section for both controller
    and job executions
  - for jobs, traces and contain context from the job under the
    "INST-JOBS"section
- remove `config/sentry.yml` and restart rails and jobs servers
- confirm that the app/jobs start fine and there are no issues

Change-Id: I876d9e3c9fb55c8dca374f29987775803e6aabaf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282306
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ben Rinaca <brinaca@instructure.com>
2022-01-13 23:32:00 +00:00
Isaac Moore 3e748c1c7e Upgrade Sentry SDKs
This commit replaces `sentry-raven` with the more modern Sentry SDKs.

Settings related to this change:

- `sentry_disabled`: completely disables Sentry, in case anything goes
  sideways (defaults to `false`)

refs DE-922
flag=none

test plan:
- make sure to check out the correct patchset in the
  `gems/plugins/uuid_provisioner` directory (see the tag below for ref)
- create a new project in Sentry (it may be easiest to set up Sentry to
  run locally; check out `getsentry/onpremise` on GitHub for setup
  details; it's not too onerous. note that you will need to add
  `VIRTUAL_HOST` and `VIRTUAL_PORT` to the `nginx` container in that
  `docker-compose.yml` in order to have your Sentry accessible via Dory
  at `sentry.docker`)
- configure `config/sentry.rb` with your DSN
- restart rails and job servers
- confirm that, by default:
  - any errors raised in controllers appear in the "Issues" section
  - any errors raised in jobs appear in the "Issues" section
  - user context associated with issues includes user IP and global ID
  - job issues contain context from the job under the "INST-JOBS" section
- set `sentry_disabled` setting to true and restart rails/jobs servers
- confirm that the app/jobs start fine and there are no issues
  - also confirm that Sentry is disabled (no errors received)
- remove `config/sentry.yml` and restart rails and jobs servers
- confirm that the app/jobs start fine and there are no issues

[pin-commit-uuid_provisioner=735c2102fb0020ac5aa80734a323bf08322d002d]

Change-Id: Id0fa4b4ee57ab812cd75d21d2e8ab5e21177af1a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279454
Reviewed-by: Ben Rinaca <brinaca@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-01-10 16:58:07 +00:00
Brian Watson 7e9d804dd2 Repair canvas coverage
closes OUT-4926
flag=none

Test-plan:
- coverage should be complete
- coverage in latest jenkins build should match
  what's visible in code-coverage.inseng.net

Change-Id: Ia64778433a698e7f2eb8bbd2a5e9621662eedb03
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281119
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
2022-01-05 17:55:26 +00:00
Bobby Buten 8be4bb35c3 purge pulsar from canvas
refs DE-966
flag=none

TEST PLAN:
  ensure build completes and all tests run successfully

Change-Id: I82ef402eb790fafce53393b17b4695c9151e1745
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281489
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ben Rinaca <brinaca@instructure.com>
QA-Review: Bobby Buten <bobby.buten@instructure.com>
Product-Review: Bobby Buten <bobby.buten@instructure.com>
2022-01-03 20:37:22 +00:00
Jacob Burroughs d8f6784f08 Bump rails
CVE-2021-44528

This security vulnerability has to do with the Host Authorization
middleware in Action Pack.

In the Consumer Smoke Test stage of the jenkins build, the `canvas`
container has port 8181 mapped to the running rails server but it hadn't
been added to the config.hosts application config. Leveraging the
ADDITIONAL_ALLOWED_HOSTS puts `localhost:8181` in the config.hosts so
that the Host Authorization middleware allows requests for that host
header.

Change-Id: I2dc04fb3fbcd72239da1fda1220626985efbd6e9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281229
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2021-12-23 15:26:13 +00:00
Aaron Ogata 1486d79784 bump inst-jobs
Change-Id: I92b3183e60f15872492921aac7f34a622dc89dd7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281639
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Migration-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-12-20 21:22:25 +00:00
James Butters 589d1a6c6b update version of rspecq
Change-Id: Ic3b388471e706f68689cf4f57211b3dc49e2d53d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281590
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Reviewed-by: Bobby Buten <bobby.buten@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
2021-12-20 12:57:20 +00:00
Jackson Howe 88381e66cb Revert "Add word count to attachments"
This reverts commit b702c7045f.

closes EVAL-2146
flag = word_count_for_speed_grader
Reason for revert: causing slowness in speedgrader in large courses

Change-Id: I4b5f6e34fd32dfbf8b7d7404311bee32ab4203e9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/280934
Reviewed-by: Dustin Cowles <dustin.cowles@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-12-14 23:12:46 +00:00
Keith T. Garner a399030940 make pulsar the default again
We're back to makign installing pulsar the default again. Later test
builds broke without it.

Change-Id: Icb994b5dc5a566537c4c9ad513ab0f0b2ca2893e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281209
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2021-12-14 19:18:40 +00:00
Luis Oliveira 4d95fa28db Apply darker course colors for high contrast UI
fixes: LS-2854
flag=high_contrast_course_colors

test plan:

- Create a user

- Enable High Contrast UI on their account.

- Navigate to calendar, course list and dashboard.

- Create a course for you, and right after, visit the calendar,
so the calendar flow defines a color for the course

- Create another course and got straight to the dashboard,
so the dashboard flow defines a color for that course

- Define a custom hash for a third course

- Check the colors on the course list, calendar and dashboard

- Enable the High Contrast Course Colors

- Check that all the colors now have a contrast ratio of at least 4.5:1

Change-Id: Idd5d4475acceb4742a29938237b88b0d403de611
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279764
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
2021-12-13 23:33:32 +00:00
Keith T. Garner f01fdbb2cb fix sync between dockerfiles and pulsar optional
In earlier attempts to make pulsar optional for our docker builds, the
dockerfiles that need to be in sync got out of sync. This returns them
to being in sync, and makes the pulsar gems optional which is better for
open source users.

Change-Id: Id8a02878bb61cf589670526da0626a90da530a58
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281101
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2021-12-13 22:48:38 +00:00
Aaron Ogata 5b46e34869 bump inst-jobs
Change-Id: I239d454c7a292d6099bfcb5287dfaddedc71fd0b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/280778
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
2021-12-09 20:23:01 +00:00
James Butters fca3312001 remove remaining rspecq conditionals
flag = none

Test Plan:
-Jenkins passes
-Crystalball map generation build passes

Change-Id: If2190816b0ec31066837430b826369891ceac783
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/280297
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Brian Watson <bwatson@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2021-12-08 16:33:38 +00:00
Brian Watson 96fbbf87c9 Revert "Revert "Crystalball post-merge map generation""
Also moves config/initializer/crystalball.rb to spec/support
to prevent it from running in prod

This reverts commit 9a9c68be6e.

Test-plan:
- passes cd to edge without failure
- generates map successfully in PoC build

Change-Id: I67c02ebaea06e11b3a3721aa49217da16e75bd32
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279848
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
2021-12-01 17:35:52 +00:00
Evan Battaglia b58a45f4ad bump inst-jobs
closes INTEROP-7176

Test plan:
- specs
- bundle exec flakey_spec_catcher --verbose -t \
  spec/lib/basic_lti/basic_outcomes_spec.rb:771
- observe that spec does not take longer and longer each run

Change-Id: Ifefd72c7a3e801cb11c21b0a79adad0a654e8eab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279849
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2021-12-01 00:30:15 +00:00
Brian Watson 9a9c68be6e Revert "Crystalball post-merge map generation"
This reverts commit bd847c2d14.

Reason for revert: breaking cd

Change-Id: I85ed1dc69045d2cd984778da12c2e0b402b842ad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279637
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
2021-11-30 17:36:13 +00:00
Brian Watson bd847c2d14 Crystalball post-merge map generation
flag=none

Test-plan:
- #crystalball-noisy should link to the latest build AND the
  latest map should be linked (stored as a build artifact)
- job should run nightly
- nightly alerts should promopt #crystalball-noisy posts
  (but not gerrit manual triggers)

Change-Id: Ibbd45dfd8a9b3ed8f4c662b322214cbbc3dc99b4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277205
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
2021-11-30 16:18:07 +00:00
Cody Cutrer c2cba46851 RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation
[skip-stages=Flakey]

auto-corrected

Change-Id: I4a0145abfd50f126669b20f3deaeae8377bac24d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279535
Tested-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-11-25 14:03:06 +00:00
Cody Cutrer 379d5d7611 rubocop: default to error severity
means we can remove a whole bunch of specific cop configurations that
now inherit the proper settings. cops that still have violations need
to be explicitly named to make them not error. this means that the
list of remaining cops is explicitly in our config now. also combined
the don't-auto-correct lists with the not-yet-fixed lists, so that
it's only a "permanent" section and a "todo" section

the final computed configuration is unchanged by this commit, with one
exception - Bundler/OrderedGems was moved to the Gemfile.d/.rubocop.yml
override, and some of the internal gems violated that so their
gemfiles have been autocorrected

Change-Id: I100884a96dbe9eb9d4bfc0692663c271daa9de16
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279413
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-23 21:31:26 +00:00
Cody Cutrer f88857d91e bump ruby_parser
to be able to deal with arg forwarding in ruby 2.7

Change-Id: I843fe376849ee2a8ba158c71f8a0e45779dfee3d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279106
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>
2021-11-22 05:15:33 +00:00
Jeremy Stanley 5e8d200f39 tweak AR_QUERY_TRACE options
* respect truthiness of AR_QUERY_TRACE env var (setting it to
  "0" or "false" turns it off)
* allow AR_QUERY_TRACE in test as well as development
* add AR_QUERY_TRACE_LEVEL option (valid values are "app", "rails",
  and "full")

Change-Id: I398b800bb42b1bc7716cf322a6e6330bfaa8955b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278849
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2021-11-19 22:14:42 +00:00
Evan Battaglia 66663ceafa Add region to InstAccess tokens we create
flag=none
refs INTEROP-7085

Test plan:
- in a prod console make sure ApplicationController.region shows the
  region
- locally, edit ApplicationController region to fake a value
- locally, in a console make sure ApplicationController.region shows that value
- have Canvas & API gateway set up using each others' keys
- go to /api/v1/inst_access_tokens
- in API gateway source, add console.log(payloadStr) to the end of
  deserializeAndVerifyToken() in src/instAccessTokens.ts
- bring up API gateway and use that token
- you should see your region you added in the payload

Change-Id: Idb773f4177dcc4d620d7a70ff1b8921047d71679
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278506
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-11-18 19:05:48 +00:00
Weston Dransfield 50eb12b386 Allow AR query trace in development
flag=none

Test Plan:
- Set the "AR_QUERY_TRACE" env var to "true"
- Restart Canvas
- Load a Canvas page and verify query traces
  are being logged
- Set the "AR_QUERY_TRACE_LINES" env var to some number
- Restart Canvas
- Load a Canvas page and verify the query traces
  are limited to the number you chose
- Set the "AR_QUERY_TRACE_TYPE" env var to either
  "write" or "read"
- Verify only queries of the chosen type are logged
- Verify query traces are not logged in in non-
  development environments ("test", for example)

Change-Id: I2f5f7610a71e0bbfaa80327c422fc87162a5a78b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278634
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2021-11-18 15:59:24 +00:00
Cody Cutrer d91263c442 RuboCop: Style/ExpandPathArguments
auto-corrected, but so many tweaks after to gemspecs it may as well
have been manual

Change-Id: I69aeb6e216894462d6d893ed4c123aa9898fc72f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278516
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>
2021-11-17 22:06:59 +00:00