also have to fix several cases where cross-shard queries have indeterminate order
Change-Id: I1faf5953787859c24481e51dad3cf60d6d332a96
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266738
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>
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>
load the context's shard before looking up past_lti_ids
test plan:
• specs pass
• verify in splunk after merge the test is no longer flaky
Change-Id: I5ee1967f17b5396254c6ea5567742eaaf57ad8b4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261169
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@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>
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>
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>
ticket to track unskip and fix: FOO-755
Change-Id: I2b062684d2aaa3c07ee78809c945537abe43246e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244004
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
I decided to go this direction for two reasons. We are using
Redis for caching in production, and we want this test to mirror
that environment as closely as possible. Also it seemed the error
was timing related when doing a lookup on notifications,
memcache got deleted when the cached objects were expected to be
there. Having a separate cache store will add a more reliable
persistence layer.
fixes FOO-755
flag = none
test plan:
- specs pass
- no flaky flaky
Change-Id: I5db414d5ed0d47250d3247e63a81fdef0157b8ce
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243812
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>
Doing this will make any changes to communication channels in the future
100000000000% easier by limiting the blast radius to just a handful of
files rather than every single spec file in canvas_lms LOL
fixes VICE-540
flag=none
/ ---- ---- \
| Test Plan |
\ ---- ---- /
- tests pass
Change-Id: I9a61b3c7155bc76e0f813b4f35466baf6a8f7589
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239871
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@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-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>
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>
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>
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>
currently works for enrollments created after the link but
this will fix it so it looks across the trust for existing
enrollments when creating the link
also remove enrollments across trust when link is deleted
and require root account because why not
closes #CORE-2486
Change-Id: I861690eee819d14f9520084aa55cfa051a32aca1
Reviewed-on: https://gerrit.instructure.com/181448
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Cody Cutrer <cody@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>
and use that to confirm that versioned submission
attachments belong to the user
test plan:
* have a student in a course on one shard
* submit a file to an assignment
* merge the user into a user on another shard
* the submission should still list the files
closes #ADMIN-1447
Change-Id: I4a1f00ac1a375cfb247cef5e6fa4f875c2bce316
Reviewed-on: https://gerrit.instructure.com/165174
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: James Williams <jamesw@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>
Change-Id: I60ec3b519219fcb5256a132c05f63538600df73f
Reviewed-on: https://gerrit.instructure.com/121760
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
closes CNVS-32229
closes CNVS-32232
test plan:
* Create a course with MGP enabled and two grading periods in
the default term
* Create two assignments for this course, one in a closed GP and
one in an open GP
* To test overrides, create the following as well:
* For one of the students, make the open assignment due in the
closed grading period
* For another student, make the closed assignment due in the
open grading period
* Ensure the following steps work for all assignment/student
combos due in a closed grading period.
** CNVS-32229 **
* Login as a teacher
* Go to speedgrader for the assignment in the closed GP
* Notice that the grade input is locked down
* Right click on the locked-down input and select 'Inspect'
* Remove the 'ui-state-disabled' class and remove
readonly="readonly" from the input field's HTML
* Notice the input is no longer grayed out and you can enter
a grade
* Enter a grade and tab out of the input
* You should see an error message that says something went wrong
and notice in the Network tab of your dev tools that the AJAX
post failed, meaning the submission was not gradeable
* Refresh the page and notice the grade is not there.
* Verify it isn't there in Gradebook either
* Login as an admin
* Go to speedgrader for the assignment in the closed GP
* Notice that the grade input is *not* locked down
* Enter a grade and tab out of the input
* You should *not* see an error message that says something went
wrong meaning the submission was graded successfully
* Refresh the page and notice the grade is there.
* Verify it is also present in Gradebook
** CNVS-32232 **
* Login as a teacher
* Go into a gradebook that has an assignment that is
locked down because it is in a closed grading period
* Notice that the grade cells for the assignment are locked
down (because the submissions fall in a closed grading period)
* Right-click on one of the locked-down cells and select 'Inspect'
* Remove the 'grayed-out' and 'cannot_edit_in_closed_grading_period'
classes
* Notice the cell is no longer grayed out and you can enter a grade.
* Enter a grade
* Click on another cell.
* You should see an error message that says something went wrong
and in the Network tab of your dev tools verify the AJAX post
failed, meaning the submission was not gradeable
* Refresh the page and notice the grade is not there
* Login as an admin
* Login as a teacher
* Go into a gradebook that has an assignment that is
in a closed grading period
* Enter a grade in a cell that should be due in a closed grading
period
* Click on another cell
* You should *not* see an error message that says something went
wrong meaning the submission was graded successfully
* Refresh the page and notice the grade is there.
* Verify it is also present in Gradebook
Change-Id: Ia80e4de626616309c5e9dffb78ed0f9671ad1076
Reviewed-on: https://gerrit.instructure.com/95687
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
protect against a low priority bug that's not relevant to the spec and
we'll likely never fix
Change-Id: I9388659915f041f521accccd62ec01d5e82ffc95
Reviewed-on: https://gerrit.instructure.com/95997
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@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>
closes #CNVS-31119
Change-Id: Iabeb0d91a2899113e287b17024d3ae704d1a0175
Reviewed-on: https://gerrit.instructure.com/88207
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
this will instead update the state of the
conflicting enrollments to the best state
additionally we track enrollments on target user
that have changed states
fixes CNVS-27923
test plan
- have user1 in course as invited
- have user2 in course as active
- merge user2 into user1
- both enrollments will exist
- enrollment for user2 will be deleted
- enrollment for user1 will be active
Change-Id: I600011af802e39f9e49719e468afa22f1fdbeffb
Reviewed-on: https://gerrit.instructure.com/74227
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fixes CNVS-27943
test plan
- have a user with user_observers
- have a second user observing the same user
- merge the two users
- the from user's user_observer should be in the
database with a deleted workflow_state
Change-Id: I6c265ac61e938b737b63b69ae5bbfe29a7ccb43e
Reviewed-on: https://gerrit.instructure.com/75064
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fixes CNVS-27291
test plan
- merge users
- data should be populated
Change-Id: I5720933484494f582bad4b294a7e6b4edea66b92
Reviewed-on: https://gerrit.instructure.com/72700
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
test plan:
* create a future course (but one that isn't restricted)
* create a module with a view requirement for an item
* add a student to the course, they should be able to look around
but not participate
* confirm that viewing the module item does not fulfill the
module item requirement
closes #CNVS-26326
Change-Id: Ibe58be1280d377a587e41b45e39ca38168f6093b
Reviewed-on: https://gerrit.instructure.com/71302
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>