canvas-lms/gems
Cody Cutrer 016ae41723 lint several more idempotent schema changes in non transactional migrations
and actually enforce the linter (by setting a cutoff date for old migrations)

Change-Id: I50001b479e24b30714c37c331515b186bc089468
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332721
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>
Migration-Review: Cody Cutrer <cody@instructure.com>
2023-11-13 21:39:11 +00:00
..
activesupport-suspend_callbacks bundle update rake 2023-11-13 21:37:43 +00:00
acts_as_list bundle update sqlite3 2023-11-03 13:25:07 +00:00
adheres_to_policy bundle update rake 2023-11-13 21:37:43 +00:00
attachment_fu reduce dependencies of vendored gems 2023-08-28 15:58:30 +00:00
autoextend bundle update rake 2023-11-13 21:37:43 +00:00
bookmarked_collection bundle update rake 2023-11-13 21:37:43 +00:00
broadcast_policy bundle update irb 2023-11-13 21:36:05 +00:00
canvas_breach_mitigation bundle update --bundler 2023-09-29 15:42:35 +00:00
canvas_cache bundle update rake 2023-11-13 21:37:43 +00:00
canvas_cassandra bundle update rake 2023-11-13 21:37:43 +00:00
canvas_color bundle update rake 2023-11-13 21:37:43 +00:00
canvas_crummy bundle update rake 2023-11-13 21:37:43 +00:00
canvas_dynamodb bundle update rake 2023-11-13 21:37:43 +00:00
canvas_errors bundle update rake 2023-11-13 21:37:43 +00:00
canvas_ext bundle update rake 2023-11-13 21:37:43 +00:00
canvas_http bundle update rake 2023-11-13 21:37:43 +00:00
canvas_kaltura bundle update rake 2023-11-13 21:37:43 +00:00
canvas_mimetype_fu bundle update rake 2023-11-13 21:37:43 +00:00
canvas_panda_pub bundle update rake 2023-11-13 21:37:43 +00:00
canvas_partman bundle update rake 2023-11-13 21:37:43 +00:00
canvas_quiz_statistics bundle update unf_ext 2023-11-13 21:38:47 +00:00
canvas_sanitize bundle update rake 2023-11-13 21:37:43 +00:00
canvas_security bundle update rake 2023-11-13 21:37:43 +00:00
canvas_slug bundle update rake 2023-11-13 21:37:43 +00:00
canvas_sort bundle update rake 2023-11-13 21:37:43 +00:00
canvas_stringex bundle update rake 2023-11-13 21:37:43 +00:00
canvas_text_helper bundle update rake 2023-11-13 21:37:43 +00:00
canvas_time bundle update rake 2023-11-13 21:37:43 +00:00
canvas_unzip bundle update rake 2023-11-13 21:37:43 +00:00
config_file bundle update rake 2023-11-13 21:37:43 +00:00
csv_diff bundle update rake 2023-11-13 21:37:43 +00:00
diigo bundle update rake 2023-11-13 21:37:43 +00:00
dr_diff bundle update irb 2023-11-13 21:36:05 +00:00
dynamic_settings bundle update rake 2023-11-13 21:37:43 +00:00
event_stream bundle update rake 2023-11-13 21:37:43 +00:00
google_drive bundle update rake 2023-11-13 21:37:43 +00:00
html_text_helper bundle update unf_ext 2023-11-13 21:38:47 +00:00
i18n_extraction bundle update rake 2023-11-13 21:37:43 +00:00
i18n_tasks bundle update rake 2023-11-13 21:37:43 +00:00
incoming_mail_processor bundle update unf_ext 2023-11-13 21:38:47 +00:00
json_token bundle update rake 2023-11-13 21:37:43 +00:00
legacy_multipart bundle update rake 2023-11-13 21:37:43 +00:00
live_events bundle update rake 2023-11-13 21:37:43 +00:00
lti-advantage bundle update rake 2023-11-13 21:37:43 +00:00
lti_outbound bundle update rake 2023-11-13 21:37:43 +00:00
paginated_collection bundle update rake 2023-11-13 21:37:43 +00:00
plugins bump moodle2cc to 0.2.42 2023-10-25 00:03:19 +00:00
request_context bundle update rake 2023-11-13 21:37:43 +00:00
rubocop-canvas lint several more idempotent schema changes in non transactional migrations 2023-11-13 21:39:11 +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 rake 2023-11-13 21:37:43 +00:00
twitter bundle update unf_ext 2023-11-13 21:38:47 +00:00
utf8_cleaner bundle update rake 2023-11-13 21:37:43 +00:00
workflow bundle update rake 2023-11-13 21:37:43 +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