canvas-lms/gems
Cody Cutrer e05536529e add optional argument for Redis#pipelined
to specify the (singular) key you will operate on, so address
a specific node when it's a distributed redis client

Change-Id: I9c4c0ab7114ea491439b42e4f4310f81470422a7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/331131
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@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-10-24 19:25:01 +00:00
..
activesupport-suspend_callbacks bundle update psych 2023-10-11 14:31:36 +00:00
acts_as_list bundle update sqlite3 2023-10-11 14:31:50 +00:00
adheres_to_policy bundle update --bundler 2023-09-29 15:42:35 +00:00
attachment_fu reduce dependencies of vendored gems 2023-08-28 15:58:30 +00:00
autoextend bundle update loofah 2023-10-11 14:32:07 +00:00
bookmarked_collection bundle update loofah 2023-10-11 14:32:07 +00:00
broadcast_policy bundle update psych 2023-10-11 14:31:36 +00:00
canvas_breach_mitigation bundle update --bundler 2023-09-29 15:42:35 +00:00
canvas_cache add optional argument for Redis#pipelined 2023-10-24 19:25:01 +00:00
canvas_cassandra bundle update loofah 2023-10-11 14:32:07 +00:00
canvas_color bundle update --bundler 2023-09-29 15:42:35 +00:00
canvas_crummy bundle update --bundler 2023-09-29 15:42:35 +00:00
canvas_dynamodb bundle update aws 2023-10-06 20:31:06 +00:00
canvas_errors bundle update loofah 2023-10-11 14:32:07 +00:00
canvas_ext bundle update --bundler 2023-09-29 15:42:35 +00:00
canvas_http add optional argument for Redis#pipelined 2023-10-24 19:25:01 +00:00
canvas_kaltura add optional argument for Redis#pipelined 2023-10-24 19:25:01 +00:00
canvas_mimetype_fu bundle update --bundler 2023-09-29 15:42:35 +00:00
canvas_panda_pub add optional argument for Redis#pipelined 2023-10-24 19:25:01 +00:00
canvas_partman bundle update loofah 2023-10-11 14:32:07 +00:00
canvas_quiz_statistics bundle update psych 2023-10-11 14:31:36 +00:00
canvas_sanitize bundle update psych 2023-10-11 14:31:36 +00:00
canvas_security add optional argument for Redis#pipelined 2023-10-24 19:25:01 +00:00
canvas_slug bundle update --bundler 2023-09-29 15:42:35 +00:00
canvas_sort bundle update --bundler 2023-09-29 15:42:35 +00:00
canvas_stringex bundle update sqlite3 2023-10-11 14:31:50 +00:00
canvas_text_helper bundle update --bundler 2023-09-29 15:42:35 +00:00
canvas_time bundle update --bundler 2023-09-29 15:42:35 +00:00
canvas_unzip bundle update --bundler 2023-09-29 15:42:35 +00:00
config_file bundle update loofah 2023-10-11 14:32:07 +00:00
csv_diff bundle update sqlite3 2023-10-11 14:31:50 +00:00
diigo bundle update --bundler 2023-09-29 15:42:35 +00:00
dr_diff bundle update sqlite3 2023-10-11 14:31:50 +00:00
dynamic_settings bundle update loofah 2023-10-11 14:32:07 +00:00
event_stream bundle update loofah 2023-10-11 14:32:07 +00:00
google_drive bundle update psych 2023-10-11 14:31:36 +00:00
html_text_helper bundle update --bundler 2023-09-29 15:42:35 +00:00
i18n_extraction bundle update --bundler 2023-09-29 15:42:35 +00:00
i18n_tasks bundle update --bundler 2023-09-29 15:42:35 +00:00
incoming_mail_processor bundle update loofah 2023-10-11 14:32:07 +00:00
json_token bundle update --bundler 2023-09-29 15:42:35 +00:00
legacy_multipart bundle update mime-types-data 2023-10-04 15:16:35 +00:00
live_events bundle update psych 2023-10-11 14:31:36 +00:00
lti-advantage bundle update --bundler 2023-09-29 15:42:35 +00:00
lti_outbound Set resource_link_title in any speedgrader launch 2023-10-05 03:53:41 +00:00
paginated_collection bundle update sqlite3 2023-10-11 14:31:50 +00:00
plugins fix multiple grading periods account report 2023-09-26 18:13:05 +00:00
request_context add optional argument for Redis#pipelined 2023-10-24 19:25:01 +00:00
rubocop-canvas bundle update loofah 2023-10-11 14:32:07 +00:00
stringify_ids bundle update --bundler 2023-09-29 15:42:35 +00:00
tatl_tael bundle update --bundler 2023-09-29 15:42:35 +00:00
turnitin_api bundle update --bundler 2023-09-29 15:42:35 +00:00
twitter bundle update psych 2023-10-11 14:31:36 +00:00
utf8_cleaner bundle update --bundler 2023-09-29 15:42:35 +00:00
workflow bundle update --bundler 2023-09-29 15:42:35 +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