canvas-lms/gems
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
..
activesupport-suspend_callbacks bump rails 2023-06-30 19:07:11 +00:00
acts_as_list bump rails 2023-06-30 19:07:11 +00:00
adheres_to_policy bump rails 2023-06-30 19:07:11 +00:00
attachment_fu Make s3_backend's full_filename able to handle nil filenames 2023-06-23 21:26:04 +00:00
autoextend bump rails 2023-06-30 19:07:11 +00:00
bookmarked_collection bump rails 2023-06-30 19:07:11 +00:00
broadcast_policy bump rails 2023-06-30 19:07:11 +00:00
bundler_lockfile_extensions add `ruby` platform to lockfiles 2023-06-27 17:56:13 +00:00
canvas_breach_mitigation bump rails 2023-06-30 19:07:11 +00:00
canvas_cache bump rails 2023-06-30 19:07:11 +00:00
canvas_cassandra bump rails 2023-06-30 19:07:11 +00:00
canvas_color add `ruby` platform to lockfiles 2023-06-27 17:56:13 +00:00
canvas_crummy add `ruby` platform to lockfiles 2023-06-27 17:56:13 +00:00
canvas_dynamodb add `ruby` platform to lockfiles 2023-06-27 17:56:13 +00:00
canvas_errors bump rails 2023-06-30 19:07:11 +00:00
canvas_ext bump rails 2023-06-30 19:07:11 +00:00
canvas_http update rubocop, and apply new cops 2023-07-03 22:11:42 +00:00
canvas_kaltura Capture nil error found by Sentry 2023-07-07 20:11:16 +00:00
canvas_link_migrator Add link_resolver to gem and test with migration object 2023-07-07 19:02:45 +00:00
canvas_mimetype_fu add `ruby` platform to lockfiles 2023-06-27 17:56:13 +00:00
canvas_panda_pub bump rails 2023-06-30 19:07:11 +00:00
canvas_partman bump rails 2023-06-30 19:07:11 +00:00
canvas_quiz_statistics bump rails 2023-06-30 19:07:11 +00:00
canvas_sanitize bump rails 2023-06-30 19:07:11 +00:00
canvas_security bump rails 2023-06-30 19:07:11 +00:00
canvas_slug add `ruby` platform to lockfiles 2023-06-27 17:56:13 +00:00
canvas_sort add `ruby` platform to lockfiles 2023-06-27 17:56:13 +00:00
canvas_stringex bump rails 2023-06-30 19:07:11 +00:00
canvas_text_helper update rubocop, and apply new cops 2023-07-03 22:11:42 +00:00
canvas_time bump rails 2023-06-30 19:07:11 +00:00
canvas_unzip bump rails 2023-06-30 19:07:11 +00:00
config_file output config name when encountering a parser error 2023-07-06 16:33:07 +00:00
csv_diff add `ruby` platform to lockfiles 2023-06-27 17:56:13 +00:00
diigo bump rails 2023-06-30 19:07:11 +00:00
dr_diff add `ruby` platform to lockfiles 2023-06-27 17:56:13 +00:00
dynamic_settings bump rails 2023-06-30 19:07:11 +00:00
event_stream bump rails 2023-06-30 19:07:11 +00:00
google_drive bump rails 2023-06-30 19:07:11 +00:00
html_text_helper bump rails 2023-06-30 19:07:11 +00:00
i18n_extraction bump rails 2023-06-30 19:07:11 +00:00
i18n_tasks update rubocop, and apply new cops 2023-07-03 22:11:42 +00:00
incoming_mail_processor bump rails 2023-06-30 19:07:11 +00:00
json_token add `ruby` platform to lockfiles 2023-06-27 17:56:13 +00:00
linked_in bump rails 2023-06-30 19:07:11 +00:00
live_events bump rails 2023-06-30 19:07:11 +00:00
lti-advantage bump rails 2023-06-30 19:07:11 +00:00
lti_outbound bump rails 2023-06-30 19:07:11 +00:00
multipart add `ruby` platform to lockfiles 2023-06-27 17:56:13 +00:00
paginated_collection add `ruby` platform to lockfiles 2023-06-27 17:56:13 +00:00
plugins update rubocop, and apply new cops 2023-07-03 22:11:42 +00:00
request_context bump rails 2023-06-30 19:07:11 +00:00
rubocop-canvas update rubocop, and apply new cops 2023-07-03 22:11:42 +00:00
stringify_ids add `ruby` platform to lockfiles 2023-06-27 17:56:13 +00:00
tatl_tael update rubocop, and apply new cops 2023-07-03 22:11:42 +00:00
turnitin_api bump rails 2023-06-30 19:07:11 +00:00
twitter bump rails 2023-06-30 19:07:11 +00:00
utf8_cleaner add `ruby` platform to lockfiles 2023-06-27 17:56:13 +00:00
workflow bump rails 2023-06-30 19:07:11 +00:00
README.md Remove auditor cassandra support 2023-04-03 15:40:22 +00:00
test_all_gems.sh remove broken vendored gems html reports 2021-06-15 16:53:17 +00:00

README.md

Gems

This folder is a place to extract modular functionality from canvas. Canvas's Gemfile arrangement is enabled to read gems from this path locally without installing from a remote source. This is valuable for a few reasons:

  • it prevents circular dependencies (bundler won't allow it)
  • modularized code cannot bind to specific domain concepts on canvas models
  • gems can have their specs run independently, without needing to load all of canvas, saving iteration time
  • it allows for eventual build optimization via only running specs for the transitive closure of parents depending on a gem where a change is.

There are some tradeoffs:

  • spreads canvas over more subdirectories, giving some mental overhad to traversing the entire codebase.
  • modular tests necessarily don't test integration with canvas concepts, so solid integration tests in the app are still a requirement.
  • total SERIALIZED build time goes up because each gem loads it's specs in a new process rather than all running within an already booted canvas process.

[TODO] eventually write more on whether we feel like those tradeoffs are good ones, and what the best practices are to leverage this pattern for max-gain/min-pain.

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