refs AE-1
Test Plan:
1. make sure you've got redis configured as your cache. MultiCache.cache
should return a ActiveSupport::Cache::RedisCacheStore
2. have a setup where the local ID of a root account on one shard matches
the local ID of your SiteAdmin account on another shard. For example,
in my setup the SiteAdmin account lives on Shard 1 and has a local ID
of 1, and on Shard 2 I have a root account with a local ID of 1.
3. bundle install on a branch with pre-3.4 switchman
4. clear redis: redis-cli flushall
5. start a rails server and navigate to your site admin account in the
browser. For me, that's
<shard 1 domain>/accounts/site_admin
6. navigate to your root account on the other shard with the same local id
as the site admin account:
<shard 2 domain>/accounts/<root account local id>
Verify it takes you to the correct account.
7. stop your server, switch to this branch (switchman 3.4.2), do a
bundle install, and start your server. Navigate to the root account on
shard 2 again:
<shard 2 domain>/accounts/<root account local id>
Verify it takes you to the correct account.
Change-Id: I5ff422a597df9f2eb064277b67bbf6a2c5426266
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316174
Reviewed-by: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
I was able to replace one of our custom cops with a built in one
(just had to make it ignore older migrations).
Then I had to manually fix a couple of (important!) offenses
Change-Id: I000310bb6b065034384ba3a33ef5e37e22b9be5a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315855
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
includes some minor hash layout fixes that were incompatible with prior rubocop
[skip-stages=Flakey]
Change-Id: I75e903292daa70c84b03600b97fac49ca1155004
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315786
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
like if someone were to put a helper script in there to aid them in
applying the same action to every private plugin :shiftyeyes:
Change-Id: Ice5006d81fb76c29ea74d142d850a65268f3b0a0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315778
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
closes EVAL-2943
flag=none
Test Plan:
1. Create a course with an emoji in the name and publish it
2. Create an assignment with an emoji in the name and publish it
3. Add a student to the course
4. Submit to the assignment as the student
5. Enter a comment with an emoji
6. Download the submission comments from the Speedgrader
7. Observe that emojis are displayed properly in the report
Change-Id: I1c7ca39e7d10e9b65991c01be86e24c62dc58cd9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315403
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Also remove the engine experiment, because that never really went
anywhere for canvas and was just one more "different" thing
[fsc-max-nodes=15]
[fsc-timeout=45]
Change-Id: Ib990deb94bf5e25d587d554f64c535c9b96cce26
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314469
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Migration-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
closes AE-99
re-work LazyPresumptiousI18nBackend:
- most of the functionality is now in upstream as Backend::LazyLoadable
- the locales.yml and community.csv containing data for all locales is now
in a new Backend::MetaLazyLoadable
- CSV parsing got put into its own module
test plan:
- Canvas should load in English, including the list of other languages
- changing language should still work
- community translations are still available
- (testable in console) I18n.backend.initialized? should not return true
after setting I18n.locale until after a translation has been requested
while that locale is active
Change-Id: I060763de4d7f889efae234109fde801867192c43
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314616
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Detection is disabled by default, but can be enabled by setting the
N_PLUS_ONE_DETECTION environment variable to 'true'. For more information,
see doc/detect_n_plus_one_queries.md
closes EVAL-2973
flag=none
Test Plan:
1. Start rails
2. Create a coures with multiple assignments and go to
/courses/:id/assignments
3. Notice there are no N+1 query warnings shown in log/development.log
and that log/prosopite.log does not exist.
4. Run the `spec/models/grading_period_spec.rb` spec file and notice that
no N+1 query warnings are shown in log/test.log
5. Set `N_PLUS_ONE_DETECTION: 'true'` in docker-compose.override.yml
under web: :environment.
6. Stop/start rails
7. Go to /courses/:id/assignments
8. Notice there are N+1 query warnings shown in log/development.log
and that log/prosopite.log exists and also has warnings in it.
9. Run the `spec/models/grading_period_spec.rb` spec file and notice that
N+1 query warnings are shown in log/test.log (but not in
log/prosopite.log)
Change-Id: I33f43e65df10e2161f1a0687eee3e0b7826bfe3d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313592
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
and use less pessimistic versioning in the Gemfile, now that we have
the lockfile to enforce it
Change-Id: I65d0ae5704ba6b3353c4429f6a14058310ad3cdb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314512
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>
Build-Review: Cody Cutrer <cody@instructure.com>
fixes FOO-3422
fixes FOO-3405
fixes FOO-3410
Change-Id: I6e9ca67acadeda0b522c3f8e93627bd7814a3a05
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313036
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Jacob Burroughs <jburroughs@instructure.com>
Change-Id: I4ee64e70cf4ac444ad6b0333a958d83a193614d3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/311744
Reviewed-by: Isaac Moore <isaac.moore@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>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Change-Id: I25be73991a0542755579de897b98561ded3cd0c2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310452
Reviewed-by: Isaac Moore <isaac.moore@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>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Test plan:
- See that TypeScript errors are reported in Gergich for prior
failing build
- Tests pass for latest build for this commit
flag=none
Refs DE-1519
Change-Id: I3cd7e8fc43d24932fdd60b296e9015d76d3671ac
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310278
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
for great debugging justice
flag=none
Test plan:
- specs
- require 'pry' and 'binding.pry' in code or console
Change-Id: I07ddec6a46ef6755db1a3978d0bf2903f9bc8fab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310028
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
refs AE-1492
Test Plan:
1. Ensure that all appropriate gem versions are installed for CANVAS_RAILS=6.1 with plugins enabled
2. Ensure that all appropriate gem versions are installed for CANVAS_RAILS=7.0 with plugins enabled
3. Ensure that removing Gemfile.rails*.lock and running “bundle install” produces both 6.1 & 7.0 lockfiles with no overwrites to the partial files
4. Ensure that all lockfiles update when using “bundle update” in both versions and there are changes to commit
5. Ensure that removing plugins and running “bundle install” produces no changes to commit
6. Ensure that “bundle exec rails c” with CANVAS_RAILS=6.1 runs the right version
7. Ensure that “bundle exec rails c” with CANVAS_RAILS=7.0 runs the right version
8. Ensure that the Gemfile.*.lock.partial does not contain any secrets or private plugin names
NOTE: “vcr” gem is intentionally pinned to an old version (6.0.0) for testing
Change-Id: Id8e449466ec7839b3b71f2430256c0e8d0967775
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/309093
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Build-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
flag=none
test plan:
- verify tests pass
- verify no new issues in CD
Change-Id: Ia65c867bfc9e5c1f352f7c26130683b8a2df19d5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/308542
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Change-Id: I954402cb7016c1590748f149279865db967272a3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/308110
Reviewed-by: Isaac Moore <isaac.moore@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>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Change-Id: I42c5bbfd59d5b14ddef9cb70f2524f0f379c9963
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/308066
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Change-Id: I18f355de356e3f52284fb1f55c589590587d5c60
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/308056
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>