canvas-lms/gems
Rob Orton 553b2fe558 fix race condition on report runners
this is very difficult to test, because it's a race condition, but the
test plan would work...

the changes are just plumbing through if the primary db should be used
or a replica, and then methods that have been well tested and used.

for parallel account_reports we write rows to account_report_rows and
then read from account_report_rows to generate the csv file. If this is
done on a replica, it can be lagging and not get all the records.
Typical reports, this would not be a problem because it is old data for
a report...
but when we just wrote the data it may not exist, so use the primary
database.

test plan
 - run a report with a primary database and read_only replica
 - pause replication
 - the report should work

fixes PFS-16619
flag = none

Change-Id: I93140ce8f566a4e0553377388d6296ec36d800cb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248863
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mark Valentine <mvalentine@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2020-09-29 22:47:34 +00:00
..
activesupport-suspend_callbacks rails 5.2 2018-04-25 19:15:20 +00:00
acts_as_list spec: fixes for ruby 2.6 2020-03-09 15:57:06 +00:00
adheres_to_policy stop logging stats in adheres_to_policy 2019-03-21 16:29:16 +00:00
attachment_fu rails 5.2 2018-04-25 19:15:20 +00:00
autoextend Add dependency resolution to autoextend 2019-12-16 21:38:14 +00:00
bookmarked_collection auditors read path 2020-06-09 16:10:33 +00:00
broadcast_policy break up broadcast policy to_list on creation 2020-02-29 00:23:29 +00:00
canvas_breach_mitigation use same options for authenticity tokens when resetting 2020-01-29 13:14:13 +00:00
canvas_cassandra allow passing consistency through batch ops 2020-08-25 14:55:34 +00:00
canvas_color Handle named colors like ‘red’ in theme editor 2018-02-16 23:26:02 +00:00
canvas_crummy add streaming templates: part 1 2019-07-31 19:23:44 +00:00
canvas_dynamodb allow client injection for dynamodb 2020-09-01 15:48:44 +00:00
canvas_ext rails 5.2 2018-04-25 19:15:20 +00:00
canvas_http tune http throttle computation to seconds 2020-07-28 01:12:49 +00:00
canvas_i18nliner highlight dependencies in canvas:compile_assets 2020-09-24 20:51:51 +00:00
canvas_kaltura make CanvasKaltura.cache aware that Rails.cache is dynamic 2018-03-06 05:46:59 +00:00
canvas_mimetype_fu fix file warnings for specs on linux 2018-09-07 21:50:53 +00:00
canvas_panda_pub standardize on json-jwt, and bump to 1.10.2 2019-10-21 15:07:52 +00:00
canvas_partman bulk_insert for partitioned models 2020-07-09 16:23:22 +00:00
canvas_quiz_statistics Add user_ids to quiz statistics endpoint 2019-12-04 19:24:27 +00:00
canvas_sanitize Fix sandbox "allow-popups" errors 2020-08-13 19:30:06 +00:00
canvas_slug fix slug generation exception 2020-08-27 16:37:05 +00:00
canvas_sort da licença part 53 2017-05-01 21:06:11 +00:00
canvas_stringex spec: fixes for ruby 2.6 2020-03-09 15:57:06 +00:00
canvas_text_helper da licença part 53 2017-05-01 21:06:11 +00:00
canvas_time rails 5.2 2018-04-25 19:15:20 +00:00
canvas_unzip compare UNZIPPED size of sis imports 2020-09-15 14:41:44 +00:00
csv_diff add sis batch setting to disable diffing on high diff row count 2019-04-16 12:31:50 +00:00
diigo da licença part 53 2017-05-01 21:06:11 +00:00
dr_diff remove skipping linters if whitelisted engineer 2020-05-08 15:17:49 +00:00
event_stream use AR scope for event_stream AR procs 2020-09-24 20:34:14 +00:00
google_drive bump some gems to reduce ruby 2.7 deprecation warnings 2020-09-22 16:08:42 +00:00
html_text_helper spec: a bit of cleanup in gems/ tests 2019-02-06 15:19:17 +00:00
i18n_extraction Upgrade sexp_processor in i18n_extraction 2020-02-14 20:48:44 +00:00
i18n_tasks speed up translations loading 2019-07-01 15:25:30 +00:00
incoming_mail_processor don’t try stuff on nil 2019-05-03 21:01:35 +00:00
json_token da licença part 53 2017-05-01 21:06:11 +00:00
linked_in remove all dependecy on instructure-oauth 2017-07-11 19:21:09 +00:00
live_events delay loading live events context until we actually send a live event 2020-09-03 17:20:12 +00:00
lti-advantage spec: publish test results from gems running rspec 2019-08-28 18:45:17 +00:00
lti_outbound allow whitelisted query param to be added to lti launch body 2018-09-19 18:46:36 +00:00
multipart Escape filename for multipart form uploads 2020-02-04 17:32:54 +00:00
paginated_collection da licença part 53 2017-05-01 21:06:11 +00:00
plugins fix race condition on report runners 2020-09-29 22:47:34 +00:00
rubocop-canvas bump rubocop version to 0.68.0 to support ruby 2.6 2020-09-29 16:09:54 +00:00
stringify_ids Make stringifying stuff work even with uppercase letters 2019-11-15 03:23:34 +00:00
tatl_tael spec: remove explicit jest guidance for now 2020-05-20 19:21:42 +00:00
turnitin_api bump some gems to reduce ruby 2.7 deprecation warnings 2020-09-22 16:08:42 +00:00
twitter drop Message#asset_context and DelayedNotification#asset_context 2017-08-22 17:47:51 +00:00
utf8_cleaner add missing test to Utf8Cleaner and cleanup 2019-01-11 22:10:24 +00:00
workflow rails 5.2 2018-04-25 19:15:20 +00:00
README.md Add docs on how to run gem tests 2016-03-09 18:08:44 +00:00
test_all_gems.sh Alpine canvas-lms based image 2020-07-15 17:21:56 +00:00

README.md

Gems

Testing

To test all the gems:

cd gems
./test_all_gems.sh

To test an individual gem

Run ./test.sh inside the gem's folder. This is basically the same as:

cd gems/google_drive
bundle
rspec