there is an index on the user_id and context_id, we want to find from
the keys of the index and let root_account get populated from favorite
context
test plan
- specs should pass
fixes VICE-1236
flag=none
Change-Id: I70f2ceaa941d38cd7a7de054b0888044d3325a25
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261298
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
fixes FOO-1591
flag = none
test plan:
- have two users observing the same student
- remove user 1 as an observer
- merge user 2 into user 1
- it should work
Change-Id: Ic7cecc446e88a62916329d0411fa49d0787f89a1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258572
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
test plan
- use api or mobile app to set favorite for a group
- merge with another user
- the favorite should come over
fixes FOO-1441
flag=none
Change-Id: I6f1cdd3e0287b1d286b87bde739edb9addcf46b6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256066
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Change-Id: I7f40ed058b50882121da69f0cb05966854b8e920
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250924
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan
- specs should pass
Change-Id: Ib13398d368c81dd4d29e1245ed971fd2ef2b3fbf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249768
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
communication_channels only live on users shard and they only work on
users shard. There have been bugs that were incorrectly placing them on
a different shard, but they never worked.
users invited into a course get a user object created as pre-registered,
but they do not get root_account_ids set until after they have clicking
the email. the email can also cause a user merge that would put the
communication_channel on the merged user but again the root_account_ids
would not be present until after that process so before_create was not
enough to populate communication_channels.
this commit also makes it so the channels are just populated on a user
merge event, since they could change, this is also appropriate.
after a datafix up is run ids should be populated but log a stat when we
send a message to ensure it.
fixes VICE-895
flag=none
Change-Id: I4721a563988f8fa399fca9d23b73e17c2a6371e7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249227
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
because users can live cross shard, it is more simple to activate the
observation_links shard to make sure the proper ids are used and updated
this also splits observer side and student side up a bit, using a
similar pattern.
There are good number of tests in this area, mostly on the split users
side, but there was one case that was failing prior to this commit which
the new spec was added inside of split_users.
test plan
- specs should pass
- have user_observers and observees from various configs and shards
- merge the users
- the ids should all be valid and point to correct users
fixes VICE-765
flag=none
Change-Id: I83750844f5bb50b17dbf70661fd8a739b307020c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246878
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
test plan
- specs should pass
- have a user on shard 1
- enroll the user in a course
- on shard2 merge the shard1 user into a user on shard2
- it should not throw an FK violation error
risk low, specs fail without code change
fixes VICE-777
flag=none
Change-Id: Iefc62bc426ca3ae8179fcd6a286a0d9a5dec48e8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246989
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
closes FOO-899
flag=none
test plan: (specs should cover)
- have two users on two different shards
- have both users "favorite" the same course on one of the shards
- merge them
- it should work
Change-Id: I444b89467dd12933f480a9fface3497914220c9b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246155
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
when merging a user if done from the source shard the target user.id is
global, but from target shard is is local and the update call will fail
and update the record to a local id. This could potentially be a user
that should not be associated to that record
test plan
- specs should pass
- merge users with observation links from target shard
fixes VICE-734
flag=none
Change-Id: Iad6007bfb4bc596f21a69a59555d5622f08d4721
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245751
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ben Nelson <bnelson@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
such as gradebook column settings stored for every
course, etc
test plan:
* all user preferences should behave as before, such as
gradebook column sizes, course nicknames,
dashboard card color settings, etc
closes #LA-571
Change-Id: I6896e0d97d577c554d450f377137cb4d6e78e2ef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226119
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan
- merge a user via api
- the merged data in the console will have the user that did the merge
fixes CORE-3284
Change-Id: I193c1cd40fd056be9fef6c5961f5ac5bf9aed419
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/219862
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
fixes CORE-3303
Change-Id: Ib966712928f74a94cce51b6ad797fd9a03661832
Reviewed-on: https://gerrit.instructure.com/210628
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
also update the updated_at to get elapsed time of user merge
Change-Id: I699365cbba2530bd6a5eab4439704b1adeecaa13
Reviewed-on: https://gerrit.instructure.com/198715
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes CORE-2964
test plan
- merge a user that would fail
- it should show error
Change-Id: If93c1cef615b0929ba4fc5e6f8f58bc87e6999af
Reviewed-on: https://gerrit.instructure.com/193865
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
Change-Id: Ia81943b1f3c068b74a3bb4e23cf7029500e66807
Reviewed-on: https://gerrit.instructure.com/194091
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
fixes CORE-2912
test plan
- merge sharded user with notification policies
- it should work
Change-Id: I2db56ba887bc360a79ed0c090ede72196b4b1e1b
Reviewed-on: https://gerrit.instructure.com/193519
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
fixes CORE-2910
test plan
- have cross shard user with notification policy
- it should be on other user after merge
Change-Id: I11ab0ffced313cc220974e8d2e523c1ae5225830
Reviewed-on: https://gerrit.instructure.com/192671
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes CORE-2907
test plan
- merge a cross shard user with user observers
- split should work too
Change-Id: I9dbe6437f483a38635bdd835d5ffe130be04fb8f
Reviewed-on: https://gerrit.instructure.com/192590
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
refs CORE-2880
if they have a cross shard enrollment we can hit
the unique index problem
test plan
- enroll a user into a course on other shard
- have submissions
- merge users
- it should work
Change-Id: Ic93e7a30510543d640361bf22dfcb0db31e8a1eb
Reviewed-on: https://gerrit.instructure.com/192008
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
refs CORE-2880
test plan
- set nickname for course
- merge users
- nickname should come over
Change-Id: I298f88163c838f2344a579fcf427ec96229f93d9
Reviewed-on: https://gerrit.instructure.com/191922
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes CORE-2880
test plan
- merge cross shard users with favorites, course
card colors, and nicknames
- they should all work
Change-Id: I7ed5ed4e08b5299b8aa4e2ea91e5053ceae9aa2e
Reviewed-on: https://gerrit.instructure.com/191817
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Change-Id: If7801aa4af6e39af0f885eba78e354ec7096db29
Reviewed-on: https://gerrit.instructure.com/189636
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
also use consistent users and just get them from
the class instead of passing them around
fixes CORE-271
fixes CORE-272
test plan
- merge a user with prefs
- they should come through
Change-Id: I1debabbffed1dba8b1c215aa676a51a5b5dc4c53
Reviewed-on: https://gerrit.instructure.com/187281
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fixes CORE-2421
test plan
- have a user with notification policy
- it should come over on merge
Change-Id: I4e8a77871d1576f41602b2993b72bf3fd012ee20
Reviewed-on: https://gerrit.instructure.com/187282
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
when a user_a is merged into user_b, user_a is
deleted, but the enrollments lti_tools still point
to the old lti_id, so this allows us to store them
and serve them as the lti_id when a user is merged
fixes CORE-2565
test plan
- merge a user that uses an lti tool in a course
- the lti_id should not change for that course
Change-Id: Iac70957ed1fcb08111745a91d0c2e402dfad3002
Reviewed-on: https://gerrit.instructure.com/181905
Tested-by: Jenkins
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
these have been created as the user does things on
the cross shard objects, but we should they should
be created when the user is merged.
This also allows us to put FKs on the columns.
refs CORE-2572
test plan
- specs should pass
Change-Id: I9364653b9c16b893291709943020c5989ae798a5
Reviewed-on: https://gerrit.instructure.com/185440
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
when user_merge was written you could not have
a cross shard observer. User merge has been
updated to support cross shard everything, and
user_observers also support cross shard users, but
they been ignored on cross shard merges
refs CORE-2572
test plan
- specs should pass
Change-Id: I722073773106950d441b8103c8f8814ca9d62588
Reviewed-on: https://gerrit.instructure.com/185439
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
refs CORE-2561
test plan
- specs should pass
Change-Id: I507a1b5a61044e4fee96c49a2857252ae9a755c9
Reviewed-on: https://gerrit.instructure.com/185436
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
this makes the query time lots faster
refs CORE-2561
test plan
- specs should pass
Change-Id: I4f2f747d6255e3422dcf1b87efe24af51a7d0619
Reviewed-on: https://gerrit.instructure.com/184905
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Change-Id: Ic6f6e6e46bcc5b18e6a7f413c272b9721f3485d0
Reviewed-on: https://gerrit.instructure.com/181904
Tested-by: Jenkins
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
closes #CORE-1958
Change-Id: I7604a0cafbf9a7c3e102c1e0d572f33be20095ed
Reviewed-on: https://gerrit.instructure.com/169376
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* have a user with conversations
* merge the user into one on another shard
* the conversations should remain in the inbox
closes #CORE-1895
Change-Id: I4792c98e3ead122e954ba2b3e0335dcdb99dae69
Reviewed-on: https://gerrit.instructure.com/165371
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
for my sanity because it's too confusing to actually refactor
closes #CORE-1140
Change-Id: I445e0edeb3fde76ffd02a467180ee7a83d916067
Reviewed-on: https://gerrit.instructure.com/143538
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
fixes CORE-1069
refs CORE-1026
test plan
- have 2 users with conflicting submissions
one with grade one with submission
- merge them
- split them and it should be restored
Change-Id: Id645ddcc0c5182a825e513de7e7d05e6fa50f254
Reviewed-on: https://gerrit.instructure.com/142004
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fixes CNVS-38707
test plan
- user merge should work
Change-Id: I4378b075ae806e8813a9f9d1224c2a96b33d3727
Reviewed-on: https://gerrit.instructure.com/123507
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
they don't really do anything
Change-Id: I90873c2b4570d3416c7d21f19843552be3965eeb
Reviewed-on: https://gerrit.instructure.com/108557
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
fixes CNVS-33046
test plan
- with user from shard 1 create user service
- merge into user on shard 2
- it should not fail
Change-Id: I7a62d26998b3f7c099fc9064b483f22b5540e0b4
Reviewed-on: https://gerrit.instructure.com/94172
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
refs CNVS-29149
test plan
- when merging users
- communication channels should be recorded
Change-Id: I24709e85ced40e4a5c62d62042c464c669e77738
Reviewed-on: https://gerrit.instructure.com/89883
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>