test plan
- specs should pass
Change-Id: I207aa5f16f481db74a0d3dd6536bbc033a07f538
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249336
Reviewed-by: John Koropchak <jkoropchak@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Tested-by: Rob Orton <rob@instructure.com>
refs INTEROP-5767
flag=none
Test plan
- Set up a couple of submissions associated to a plagiarism
tool
- Set Setting.set('trigger_plagiarism_resubmit', '1,10')
in the console
- Change the resend_plagiarism_events.rb file and remove
the "if_production" parts, change to send_later_enqueue_args
so you can see the jobs try to work
- Run DataFixup::ResendPlagiarismEvents.run and verify
you get a couple of jobs in the Delayed::Jobs queue that have
reasonable run_at times.
- Ensure that the live-event sends properly when they fire
Change-Id: I3441ebbdf722961445703ba13f0ce03490a28c7a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248967
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
this changes upgrades to the earliest version of rubocop
supporting ruby 2.6 while also choosing a version that fixes
a breaking 0.60.0 change to revert psych version change.
namespace changes were made on multiple cops to support
the new rubocop version requirements as well as the change to
move performance cops out of the rubocop gem in to
rubocop-performance.
the Layout/IndentFirstParameter cop is currently broken but a
rubocop version upgrade will fix that. the FreezeConstants cop
also required a fix to handle nil types.
refs DE-289
test plan:
- ensure rubocop runs completely
Change-Id: I0ca68f426e287b5a973b96a4ae0e975f1cbc0240
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248786
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
fixes INTEROP-6130
flag=plagiarism_tool_subscriptions (removes it)
Test plan
- Have a Lti::ToolProxy for TurnItIn or Urkund
or some other Plagiarism service that does
not have an associated subscription
- Run the data fixup. Verify the tool has
a working subscription
Change-Id: I21a85321caf1a735e0034661e175da3423548967
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246411
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
closes FOO-1003
TEST PLAN:
1) aua log compaction continues to work
2) state on plugin setting and in metadata
table is in sync
Change-Id: Ie161fcb079f80a4072ddd99f3a561c97d33026fd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248501
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
There are quiz questions which have a cross-shard quiz_id.
flag=none
refs INTEROP-6194
Test plan:
- before and after running migrations, try to create a QuizQuestion with
a cross-shard (global) quiz_id.
Change-Id: Ifd600774eb1aeea697e93a206cc4e26d0dd05530
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248376
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>
fixes FOO-888
Repro (before applying this migration)
- create a course and publish it
- create a quiz in the course and publish it
- create two users, A and B, and enroll both in the course as students
- have user A start the quiz but don't finish it
- have user B start and finish the quiz
- merge user B into user A
- canvas go BOOM. unique key constraint violation.
After applying this migration, I went through the same repro, verified
that the issue was fixed, and indeed you end up with multiple
UserMergeDataRecords for the same QuizSubmission, but that doesn't seem
to be a problem. You can still do SplitUsers on the resulting user and
UserMergeData without issue.
Change-Id: I6752544cec8ed08e8229334d73efe02af5a31507
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248267
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
test plan:
* migrations should run
closes #LS-1464
Change-Id: I8da5b9e2347a6e32d42b738d9e38ebb237b1771a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247651
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
closes OUT-3944
flag=none
test plan:
- confirm that these account permissions are
enabled for account admins (account roles)
and disabled but available for teachers and
designers (course roles)
- create a custom account role
- enable the "Learning Outcomes - add / edit / delete"
permission
- either run the data fixup code again or perform
the two steps above before running the migrations
from this patch set
- confirm the proficiency permissions are now enabled
on the custom role (reload Canvas permissions page
before confirming)
Change-Id: I6fb52c4f9eb0d5146453b55dba1fd14912818b7b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247047
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Jody Sailor
* run specs and test
Partially adapted from efe298c1c8
(clearing old User root_account_ids)
See also old CommunicationChannel backfill commit
8502957025
flag=none
closes INTEROP-6091
Test plan (multi-shard canvas):
- have some users and communication channels in different shards, with
some with cross-shard associations, and some comm channels in a
different shard as the user.
- run DataFixup::PopulateRootAccountIdOnModels.run on all shards to make
sure the Users all have root_account_ids.
- make sure you have some communication channels with root account ids
(this is not what we are testing here, if none are there, just set some)
- run migrations
- make sure the root account ids on the communication channels are
cleared (if you are running jobs they may start backfills so it's best
to not be running a jobs container)
- delete all jobs on all shards
(Shard.with_each_shard{Delayed::Job.delete_all}) to simulate the state
on production (with users backfill complete and no jobs)
- run DataFixup::PopulateRootAccountIdOnModels.run on all shards
- check that all communication channels have the correct root
account ids (comm channels should match the users)
Change-Id: I1ae5d4fb50bd5dadd62fe394ec8b4072f03edb3d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247183
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
and make role root_account_id not null
the datafix is done so we can remove the code
handling the old built-in roles
test plan:
* specs
closes #LS-1425
Change-Id: Ic8a115b71383c561b55275636bd93c194d752610
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247327
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
closes OUT-3890
flag=none
Test-plan:
- Verify that user interactions behave as expected
when testing with various different permissions
turned on/off when using various different user
roles
- Granular pages permissions can be found under
/accounts/self/permissions > Manage Pages
Change-Id: I0718a781991bf66fd90a14489710f0a68a4e4cb9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245714
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Jody Sailor
also run it less often
the gist is to iterate by users, instead of alerts, so that indexes can be more
effective. also, don't join against the world - select only the columns we actually
need, and carefully form our joins. this way we can also avoid a bunch of queries
post-load as well. it also makes the final query much easier to grok
on a middle sized database, this changes from ~75 queries of ~22s each (with no
improvement with a warm cache) to ~22 queries of ~10s each (down to ~30ms on a
warm cache)
Change-Id: I9f2cbae3aa3fce4d5ff9a1e2fa424ffca11e042f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246829
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
flag = none
closes LS-1436
Change-Id: I4f303f09976bc4be377bc560dcb2c5ce5d9fc7dd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247127
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
closes FOO-937
* 7-tables by day-of-week
* infer write table from timestamp
* plugin with default settings values
* instructions on setting the local shard to use log-&-compact
* write path switches on setting to log compaction for view bumps
* compaction job
* single write per log segment (multpile updates)
* truncates previous partition
* periodic job harness with available settings
Change-Id: Idd5cbaf0d83436724c5d72038e0dbc78cdc23619
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247083
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: Ethan Vizitei <evizitei@instructure.com>
Refs FOO-905
flag=none
We've removed this permission from Canvas, so let's just also
go remove all role overrides everywhere that reference it.
Test plan:
* If you had any RoleOverride records referencing the
:view_learning_analytics permission, they should be gone after
running DataFixup:ClearAnyCanvasInsightsViewRoleOverrides.run
Change-Id: I028eaa929dc4ae1176b683980ad2d3cb07c2dfbf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246805
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
test plan:
* a multi-tenant shard should still work
creating enrollments and account admins before and after
running postdeploy migrations
* the postdeploy should successfully run a datafixup
to split up build-in role rows and reassign the role_id on
other tables (account_notification_roles, account_users,
enrollments, and role_overrides) accordingly
closes #INTEROP-6045
Change-Id: I8325acb635397ac1b008b9d09788595da597cec7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243906
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
it's far more common for wiki pages to not be linked to wiki pages, so only look up their
assignment visibilities if necessary
Change-Id: Idf3f05e2c5e59a2163bd692497160c2388551be2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246533
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
so that clean up is much faster
Change-Id: I265091dc328a54fb849b3eff39cad685e7889ae1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246525
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
flag=none
closes INTEROP-6094
Test plan
- Run the database migration
and ensure Account 0 is created
Change-Id: I9a5e6f8934c76ea97997a41eeecdd7fef7e76e95
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245895
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Michael Guymon <mguymon@instructure.com>
Product-Review: Michael Guymon <mguymon@instructure.com>
flag=none
closes EVAL-1128
Test plan:
- Migrations on Cassandra run successfully
- Grade changes save the grading_period_id of the associated submission
in both Cassandra and AR
Change-Id: I7ae0ff54093b9bf1eaea43106d4788f22c6c920e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245734
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Jody Sailor
refs INTEROP-6080
flag=none
Test plan
- Have some developer keys with account ids
from a different shard
- Run DataFixup::CleanupCrossShardDeveloperKeys.run
and verify they get deleted
Change-Id: Ib389ef37b33a8a6e73c4926d9db775542dc6629f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245434
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
shares belong to the user's shard, not the content export's
so shares created for a course on a shard
that the user doesn't belong to will break
and shares sent to cross-shard users that create "received"
copies of the original share will also break
also semi-inadvertently fixing share sender info in API
and some problems on the import side when the correct
shard isn't active
test plan:
* cross-shard content shares should work
(both when sharing content from a course from a shard
the sending user is not native to, and when sharing content
to a user on a shard different than the content's course)
closes #LS-1337
Change-Id: Ib91529ffa5de0ee7a6f20f63281d6c5508982063
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245496
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:
* specs pass
Change-Id: Ib66137d96d8ae06634f4e305b9354b306a0a2405
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245475
Reviewed-by: James Williams <jamesw@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
closes OUT-3841
flag=none
test-plan:
- run migrations
- Ensure you can soft delete outcome proficiencies
(and their associated ratings)
- dc run --rm web script/rails c
> o = OutcomeProficiency.first (alternatively,
copy the factory code from factories/outcome_proficiency_factory
to create one for an account)
- ensure it has a workflow state (should be "active" by default)
- ensure the ratings have an "active" workflow state by default
> o.outcome_proficiency_ratings.map(&:workflow_state)
> o.destroy
- Ensure the outcome proficiency was soft deleted
(it should now have a workflow state of deleted)
- Ensure the ratings were soft deleted
> o.outcome_proficiency_ratings.map(&:workflow_state)
- Ensure calling undestroy restores both the proficiency and the ratings
> o.undestroy
> o.outcome_proficiency_ratings.map(&:workflow_state)
- Calling destroy_permanently! should hard delete
both the proficiency and all associated ratings (examine SQL output)
> o.destroy_permanently!
Change-Id: I6421fdfdd97b991e76fb08b528cddbc668495ac8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244166
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Augusto Callejas <acallejas@instructure.com>
refs SAS-1540
* adds an audience setting to developer keys, so a key can be set to
target external audiences with its credentials grants
* when a key with an external audience grants credentials, the token is
signed with an asymmetric key instead of the internal symmetric key
* external audiences can retrieve the corresponding public keys from
/login/oauth2/jwks
* credentials issued by developer keys with an account id include the
account's guid in a custom claim
includes a refactor of key storage and rotation in consul, which had
already been done for LTI. but it wasn't really a feature of lti, just
something used by LTI, and we needed the same for key management for
this. moved it to be part of Canvas::Security
Change-Id: Ie5c0fcee6fc21687f31c109389a3bcc1ed349c5d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243606
QA-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
Must be merged and deployed with the "Make Users root_account_ids
relative to user shard" (g/244742) commit.
The migration here is named to run before
20200806175207_populate_root_account_id_on_models
kicks off the users backfill.
flag=none
refs INTEROP-6063
Test plan:
- make sure you have some users with root account ids with all global
ids (ids are still global when on same shard as user)
- run migrations
- make sure those root account ids are cleared (if you are running jobs
you will also start backfills so you may notice users filling up again
but they will have local root account IDs for root accounts on the same
shard as the user)
Change-Id: I047afe45989f2e86ca711e24683beca4557ce1c6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244804
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
fixes INTEROP-5887
flag=none
Test plan
- Ensure you have a role without a root
account id
- Run DataFixup::PopulateRootAccountIdOnModels.run
- Ensure your roles have their root account ids
populated
Change-Id: I9fd7fa4ac40b92716b746f0e7424b85212f118ff
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244525
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
closes OUT-3805
flag=none
test-plan:
- run migrations
- cannot create an outcome_proficiency with nil context
Change-Id: Ie01742f0df539e7f6b8f31e1fedd80cd31eadfed
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242529
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Pat Renner <prenner@instructure.com>
Needed for communication_channels backfill (it depends on users being
backfilled to needs the index to efficiently check).
refs INTEROP-6038
flag=none
Test plan:
- run migration up, check index exists on table
- run migration down, check index no longer on table
Change-Id: I27a5001a42bbd52cf630204148cd64900c80a1d5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244273
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Ryan Hawkins <ryan.hawkins@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Ryan Hawkins <ryan.hawkins@instructure.com>
flag=none
closes EVAL-1065
Test plan:
- "up" migration:
- Ensure migrations run properly
- After the migration finishes, check that the assignment_id,
submission_id and submission_version_number columns in the
auditor_grade_change_records_* tables do *not* have not-null
constraints
- Check that the grading_period_id column exists on said tables, along
with an accompanying foreign key
- "down" migration:
- Check that the assignment_id, submission_id and
submission_version_number column once again have a not-null
constraint
- Check that the grading_period_id column no longer exists
Change-Id: I82d0325ea88f88138e78901415ed8fbe0d7d2814
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243691
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Although we're not sure why, there are lots of asset_user_accesses with
a cross-shard context and thus would have a cross-shard root account ID.
flag=none
closes INTEROP-6042
Test plan:
- run migration and make sure you can set root_account_id to a global ID e.g.
12340000000000123 on a AssetUserAccess
- set it back to null
- run `rake db:migrate:down VERSION=20200730144201` and make sure that you
cannot set root_account to a global ID anymove
Change-Id: Idf1db168c52e0d76bdaeed9e02466fe465276e89
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243922
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Hawkins <ryan.hawkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ryan Hawkins <ryan.hawkins@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
Closes PLAT-6031
flag=none
We have several new root_account_id population
data fixups. This date change will ensure the
new fixups included in the same release are
scheduled to run.
Change-Id: I45490e6a2dacb182de48df54b33ced658aa7e436
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243485
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
closes OUT-3759
flag=account_level_mastery_scales
Test plan:
- run migrations
- in the canvas ui or rails console, create subaccounts
- in the rails console, add outcome calculation
methods to the root account and some of the subaccounts:
> ap Account.all.pluck(:id, :name)
> OutcomeCalculationMethod.create! context: Account.find(id),
calculation_method: :latest, calculation_int: nil
- verify that calculation methods are found through
`account.resolved_outcome_calculation_method`
Change-Id: Iba4b8db2e1c78b7f7c5964eec270ed75c4f94d66
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242745
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Augusto Callejas <acallejas@instructure.com>
This was replaced with plural root_account_ids.
Test plan:
- run migrations and check that communication_channels no longer has
root_account_id column
- `rake db:migrate:down VERSION=20200713124612` and check that
root_account_id column is there again
Change-Id: I6524ed6230687c8866e714a57c366bc31aa1d5a6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242524
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
flag=none
refs OUT-3758
DO NOT MERGE (migration freeze)
test-plan:
- ensure you have at least one outcome proficiency
created for an account
- run migrations
- ensure that for your existing outcome proficiencies,
context_type and context_id are set
- create an outcome proficiency (using
outcome_proficiency_factory provides a nice template) and
ensure context_id, context_type is set on save
Change-Id: Iabd21ce00386959f12498f7fa0c1f5bd58d57127
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242140
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
Test Plan:
-specs should pass
flag=none
fixes VICE-591
Change-Id: I20595e1f7aefe8e4c6237db60b3eac9139780fef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242087
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>
* read from `conversations`, which already has root_account_ids
* copy those, which are comma-separated values in a string, to:
* conversation_messages
* conversation_participants
* conversation_message_participants, through conversation_messages
closes INTEROP-5853, INTEROP-5854, INTEROP-5855, INTEROP-5856
flag=none
test plan
* specs
* in the UI, create a conversation chain between two users
* in a rails console, note that the conversation has a root_account_ids field
* note that the Conversation's `conversation_messages`,
`conversation_participants`, and
`conversation_message_participants`
all have those root account ids as well, since there is logic to populate those on save
* for each of those associations, run `association.update_all("root_account_ids=NULL")`
* then run `DataFixup:PopulateRootAccountIdsOnConversationsTables.run`
* note that the root_account_ids fields for all associations
match the field on the conversation
Change-Id: I98ac281291c2105240610b0a0690a544c7d082a7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/241978
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
it doesn't work well in a mixed environment
Change-Id: I90b72e7a0fce1a9e4f815cc89f75b9a6b258ddfa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242679
Reviewed-by: Jacob Burroughs <jburroughs@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>
closes INTEROP-5844
flag=none
test plan:
- have existing CalendarEvents without root account id,
preferably at least one with each context type
(Course, CourseSection, Group, User w/no effective
context, User w/effective context, AppointmentGroup)
- run `DataFixup::PopulateRootAccountIdOnCalendarEvents.run`
- verify all events (except User w/o effective context)
have a root_account_id
Change-Id: I7d3c3c7221c25b3ae2d8c1b8819307cc66be229e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242024
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
refs #LS-1201
Change-Id: I4240f4b642b1c99bb6dfe3ce88713b597797bea1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242590
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
root_account_id on these tables can be cross-shard, so cannot have an FK
constraint.
flag=none
closes INTEROP-6006
Test plan:
- run migration and make sure you can set root_account_id to a global ID e.g.
10000000000001 on a AccessToken and RubricAssociation
- run `rake db:migrate:down VERSION=20200713144312` and make sure that you
cannot set root_account to a global ID anymove
Change-Id: I5ea00506f9eacba4ff0106133bcd0e8dcbaa6dc1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242539
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
communication_channels can have multiple root account IDs
(they can have no pseudonym and instead just belong to a user,
which can have multiple root account IDs).
flag=none
refs INTEROP-6003
Test Plan:
- Verify the new migration can be run up and down.
- Verify the root_account_ids attribute on the CommunicationChannel
model can be set and saved.
Change-Id: I8009ff62c3560d1de5d761ddf8d8a042b48327ca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242522
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
root_account_id on these tables can be cross-shard, so cannot have an FK
constraint.
Test plan:
- run migration and make sure you can set root_account_id to a global ID e.g.
10000000000001 on an Attachment, AttachmentAssociation, Folder,
CommunicationChannel (this one you need to use update_all() with SQL
to avoid validations apparently)
- run `rake db:migrate:down VERSION=20200713114812` and make sure that you
can not set root_Account to a global ID anymove
Change-Id: Ibcb8b54d1ba3af96bf4fad64a8ea3b7e4a613c2e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242500
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Weston Dransfield <wdransfield@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>
closes LS-1182
flag = submission_type_tool_placement
Test Plan:
- spec runs ok
Change-Id: I36eb9050e9dc4114cad87ebf4101413d69d7b93e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242136
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Clint Furse <cfurse@instructure.com>
closes EVAL-702
flag=none
Test Plan
- Run migrations.
- Create a grading period group for an account.
- Verify in a console that the group's root_account_id is set to the
root account's id.
- In the console, set the root_account_id to nil.
- Edit the grading period group in some way and save it.
- Verify in the console that the root_account_id is set again.
Change-Id: Ic38d227066297d5cc247aab37760f9c6df958d2b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239943
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
fixes KNO-498
test plan
- migrations should run
Change-Id: I727d9178d00bb88d5656def43df3d0417d3eadda
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/241840
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
Fills in the stub for actually sending the notification to the selected
students.
Test Plan:
In a Rails console
- Grab a student who has Due Date notifications set to Immediate (u)
- Grab an assignment that the student is assigned, but has not
submitted and is due in the future (a)
- `s = Submission.find_by(user_id: u.id, assignment_id: a.id)`
- `n = BroadcastPolicy.notification_finder.by_name('Upcoming Assignment Alert')`
- `AssignmentUtil.alert_unaware_student(n, assignment: a, submission: s)`
- Verify that a notification was sent
fixes VICE-445, VICE-446
flag = smart_alerts
Change-Id: I56032152c8f9a0c4c2387d28420c419f990440d1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240397
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>
since the temp index will still exist if you're running all predeploy migrations,
then all postdeploys
Change-Id: I5a139212f06bc49604e6f9c6f31764c8cc054a62
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/241492
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
* with PG <10, nothing should change/break (migrations shouldn't even try to run)
* with pg >=10, run migrations
* it should create collations, and recreate a couple indexes
* going to the users page should not be broken
* specs ensure that the sorting is to our liking
Change-Id: I3eaf42dd2207d733c164c12ef2a43a1c1b417ff2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/241190
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Conversation, and ConversationParticipant already have the
root_account_ids column so we only need to add it to ConversationMessage
and ConversationMessageParticipant.
fixes VICE-550
flag=none
/ ---- ---- \
| Test Plan |
\ ---- ---- /
- Run the migration
- bundle exec rake db:migrate:up VERSION=20200616085312
- Verify that the ConversationMessage and ConversationMessageParticipant
tables have the `root_account_ids` column
Change-Id: I7259e710208378c0ab852b3a2b51cc3a08216160
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240321
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
refs VICE-466
Change-Id: I4461ba85aa4dd4c030719dadcbecd014a89ea7e7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240470
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ben Nelson <bnelson@instructure.com>
Product-Review: Ben Nelson <bnelson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
This removes the root_account_id from Conversation,
ConversationParticipant, ConversationMessage, and
ConversationMessageParticipant. We are opting to do something similar to
whats already being done in conversation with multiple root account ids
instead.
fixes VICE-549
flag=none
/ ---- ---- \
| Test Plan |
\ ---- ---- /
- Run the migration
- bundle exec rake db:migrate:up VERSION=20200615170938
- Verify that the Conversation, ConversationParticipant,
ConversationMessage, and ConversationMessageParticipant tables no
longer have the `root_account_id` column
Change-Id: I7f736d96556ef86dc033aeb30bb37497809a0a29
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240320
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>
closes LA-728
flag = submission_type_tool_placement
Test Plan:
- find a LTI 1 tool that can be configured to do
submission_type_selection placements. The
tool will also need to be able to send a
ContentItemResponse back to Canvas. I used
a tool called lti_tool_provider_example (github)
and modified it. The response should include
the following data for MasteryConnect:
"https://canvas.instructure.com/lti/mastery_connect_assessment": {
"points": 10,
"objectives": "6.R.P.A.1, 6.R.P.A.2",
"trackerName": "My Tracker Name",
"trackerAlignment": "6th grade Math",
"studentCount": 15
}
- Install the tool under an account or course
- Create an assignment using the submission type
that matches the tool (not 'External Tool')
- interact with the tool to send a response item
back to Canvas
- The new data should be displayed below the button
- Save the assignment and verify that the data is
persisited to the DB as JSON (content_external_tag.external_data)
- also verify data is still correclty displayed when
editing an assignment
Change-Id: I5b1457e5dcfb8988ec75fbe3dfa1a3ca88bf0a77
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240130
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Clint Furse <cfurse@instructure.com>
1. Adds "coupled" column which is set only when the line item is the
default line item created when the user creates an external tool
Assignment in the UI
2. Allows the API to delete all line items it created
3. Allows the API to delete assignments it created via the line items
API (that is, deletes the associated assignment if a line item is the
main line item and was created in the UI)
closes PLAT-5772
flag=none
Test plan:
- before checking out this commit:
- install the LTI 1.3 test tool
- create an Assignment in the UI, choosing external tool as the
submission type and the test tool as the tool
- create an adition external tool Assignment in the UI
- Go to http://web.lti-13-test-tool.docker/ags/new and create a new line
item with external_tool as the submission type
- Create a new line item with no submission type
- Create a new line item that is attached to one of the manually-created
assignments. To do this you must give the `assignment.lti_context_id`
as resource link ID when creating the second line item
- check out the commit and run migrations
- open a rails console and check that the default line item for the
manually-created assignments have coupled=true. The other three line
items should have coupled=false
- create all the line items created above again. Again, only the
manually-created ones should have coupled=true.
- delete the last line item created (the extra one attached to the
manually-created assignment) with the test tool. the line item should
be deleted but the assignment/resource link/first line item should not
be.
- try deleting (with the test tool) the rest (four) of the last batch
line items. The ones with coupled=true should get a 401 response.
The other two should be deleted and their assignments and resource
links should be deleted.
Change-Id: I992c10f0c36aa5ed84f0e58e1e6c549b14a9d0ee
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238693
Product-Review: Karl Lloyd <karl@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
and apply to recent non-transactional migrations
Change-Id: I3ef72208f4c39906905229eb3188eaf4df89c68a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239699
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Change-Id: I1f311ec2f4569a7d264b141e7a734e8588652741
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239695
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
also fix foreign_key_for to prefer the obvious FK
Change-Id: I494c4a73aa136bc4a6735231c0957a9f062bdb11
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239688
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
also fix delay_validation with rails 5.2, and constraints can be re-validated
without dropping them
Change-Id: Iab4d2dc374c7b4707d67323d05e8e8e8ff203e47
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239656
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
closes PLAT-5552
closes TALLY-706
flag=none
Test plan:
Migration:
- Verify migrations run
- Verify a root_account_id can be set on a
Submission record
- Verify Submissions always live on the same shard
as their root account
DueDateCacher:
- Do something that triggers a DueDateCacher run (e.g., add some
students to a course)
- The root_account_id of the resulting submission objects should match
the owning course's root account ID
Change-Id: Ib4cd4396b736c4e5329c67caeb92cb9b74ddb1ca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239395
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Oxana Jurosevic
refs CNVS-48876
flag = none
make all auditors pass
backend strategy from dynamic
settings
configure indexes in
event_streams with columns
on db tables to search by
use a bookmarked collection
to return results with a simple
paginator
TEST PLAN:
1) use a dual-writing system for a while
2) examine API or UI results from auditor
endpoints
3) enable reading from postgres
4) API and UI results from auditor endpoints
should be equivalent
(and loaded via SQL queries)
Change-Id: If5b10736077b7721348ede323a34dd843d08c75f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236498
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
and use it for a recent non-transactional migration
Change-Id: I28e6fcc22ff1b22064cde2baf600c86a7728038a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239564
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>
and use it in recent non-transactional migrations
Change-Id: Ie96e3cbf727403c5dfe9d04bc3403170c076d5b6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239560
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>
Change-Id: I4d5c8d85a7cd0a7aa2c84f3278bfcecef0425398
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239559
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>
this query is fast, because there is already an index on the column
Change-Id: Iee781570bb897001724d5753a02dbb8b03911619
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239478
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>
despite all initial appearances it turns out these are
functionally unused and probably won't change any time soon
test plan:
* specs
closes #LA-1108
Change-Id: Ia5411d355659471465971e3f154292230841a709
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239380
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: Jeremy Stanley <jeremy@instructure.com>
closes PLAT-5837,PLAT-5838,PLAT-5839
flags=none
- On running this, it should fill root_account_id
for any tables currently in the migration_tables
method in the referenced data fixup
Test plan
- Running this migration should cause any
developer keys and developer key account bindings
to have their root account ids populated as well
as Context Modules
Change-Id: I1020f67475465b63f88a83353f5cb93ffe8d6b51
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236779
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
This change prepares Canvas Data 2 to route user
events to the proper customers
After getting feedback from folks all over the org,
we've decided to store root_account_ids on the users
table.
The intent is to populate this column with all with
global root account IDs as user_account_associations
are created, updated, and deleted for root accounts.
This population feature will be introudced in a
later commit with the ability to be turned off in
cisco accounts where a user can have many
user_account_associations with root accounts.
Here is some data that led us to this decision:
user -> root account association numbers for
all non-cisco canvas:
*One root account association:* 63% of users
*Five or fewer root account associations:* 90% of users
*Ten or fewer root account associations:* 96% of users
*Max root account associations:* 316 root accounts (1 user)
*Total Users: 118,216,506*
Closes PLAT-5596
flag=none
Test Plan:
- Verify the new migration can be run up and down
- Verify the root_account_ids attribute on the User
model can be set and saved
Change-Id: I0a3e738d7a4cbdef224d381df488918d65e6cbc4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238281
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Closes PLAT-5561
flag=none
Test Plan:
- Verify migrations run
- Verify a root_account_id can be set on a
ContentParticipationCount record
- Verify ContentParticipationCount records
always live on the same shard as their root account
Change-Id: Iab1ca4aca9ba78d81f01ed427b13350edf26de44
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/233684
Reviewed-by: Clint Furse <cfurse@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Clint Furse <cfurse@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Closes PLAT-5817
flag=none
Test Plan:
- Verify migrations run
- Verify a root_account_id can be set on a
WebConferenceParticipant
Note that backfill and model logic will come in a
later commit
Change-Id: I2790395aafe9921852b1ee814b30dff2a796c3ff
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238662
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Closes PLAT-5816
flag=none
Test Plan:
- Verify migrations run
- Verify a root_account_id can be set on a
WebConference
Note that backfill and model logic will come in a
later commit
Change-Id: If16f1bc10d752a57368764da1471644c1ae29834
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238663
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
- should only bring over the relevant tables (i.e.
no copies of canvas objects or infrastructure tables)
or rename the copied table if useful data is stored through it
(i.e. cr's "assignments" are now "assignment_set_associations"
because they were used to join to canvas assignments)
- should denormalize references to go directly to canvas
tables (also use integers instead of strings for ids)
test plan:
* migrations and specs run
closes #LA-1093
Change-Id: I864e5332cf9f51d41f685a229c36c1afb8ac42ff
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239016
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: Jeremy Stanley <jeremy@instructure.com>
closes PLAT-5605
flag=none
test plan:
* verify migrations run
* verify a root_account_id can be set on a
Favorite record
* verify Favorites always
live on the same shard as their root account
Change-Id: I2990a7d86f7c558b3a798a91926e7512cc037390
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236955
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Note that the root_account_id should be
set to the root account ID of the asset
being accessed.
If the asset being accessed is not tied
directly to a root account (a user
attachment for example), root account id
will be left blank
Closes PLAT-5580
flag=none
Test Plan:
- Verify migrations run
- Verify a root_account_id can be set on a
AssetUserAccess record
- Verify AssetUserAccess always live on
the same shard as their root account
Change-Id: Iebf25798ec27023233be7eb0f9debdf3783b1a8e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236877
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
refs CNVS-48876
flag = none
TEST PLAN:
1) run backfill
2) migration cells should have job ids for logs
Change-Id: If716a1f673bd45ecc44a4c9cee2e1c7577d27d45
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238687
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: Ethan Vizitei <evizitei@instructure.com>
test plan:
* smoke test todo list
(needs grading and peer review lists in particular)
closes #LA-952
Change-Id: I613ffa2499986700744482c56976bba207cfb971
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234903
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: Jeremy Stanley <jeremy@instructure.com>
Closes PLAT-5543
flag=none
Test Plan:
- Verify migrations run
- Verify a root_account_id can be set on a
CustomGradebookColumn record
- Verify CustomGradebookColumn records always live on the same shard
as their root account
Change-Id: I0d2c3c25afe50fc9abdf57e2a3d8d089a9c8ee2b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235209
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Closes PLAT-5547
flag=none
Test Plan:
- Verify migrations run
- Verify a root_account_id can be set on a
PostPolicy record
- Verify PostPolicy records always live on the same shard
as their root account
Change-Id: I5c274ba14d78969e1b3b71a7daedc12518f7f3b7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235198
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Closes PLAT-5736
flag=non
Test Plan
- Verify migrations run
- Verify you can set the root_account_id
of a DiscussionEntryParticipant
Change-Id: Id9266ac7b38542d50dd9f39bd246eb2bf1131532
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238593
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Closes PLAT-5603
flag=none
Test Plan:
- Verify migrations run
- Verify a root_account_id can be set on a
ConversationParticipant record
- Verify ConversationParticipant records
always live on the same shard as their
root account
Change-Id: I396cd193512cae37976241c73ff6e595b4e6083c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235265
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
closes PLAT-5579
test plan:
* verify migrations run
* verify root_account_id can be set on an AccountUser
* verify AccountUser_s live on the same shard as their root account
Change-Id: I5a227a9d62552803085eb2db6d6568f58020d0d0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235721
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Clint Furse <cfurse@instructure.com>
QA-Review: Clint Furse <cfurse@instructure.com>
Closes PLAT-5554
flag=none
Test Plan:
- Verify migrations run
- Verify a root_account_id can be set on a
SubmissionVersion record
- Verify SubmissionVersion always live on the same shard
as their root account
Change-Id: I89953ce6be4c27c9226d454a50a968e9d56ad3e9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235011
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Closes PLAT-5549
flag=none
Test Plan:
- Verify migrations run
- Verify a root_account_id can be set on a
GradingPeriods record
- Verify GradingPeriods always
live on the same shard as their root account
Change-Id: I4a1935c7d7956dcc07919033a14e56136eb5ce63
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235018
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
closes PLAT-5595
test plan:
* verify migrations run
* verify root_account_id can be set on a UserAccountAssociation
* verify UserAccountAssociation_s live on the same shard as their root account
Change-Id: Id337a5c0761de3491cb7e29b77acd989ec9dfab8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235727
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
* note that only some UserNotes will have a root account id
(those associated with a faculty journal)
* all others will have blank root account ids
closes PLAT-5588
flag=none
test plan:
* verify migrations run
* verify a root_account_id can be set on a
UserNote record
* verify UserNotes always
live on the same shard as their root account
Change-Id: Ib734d3bb9f8365d315ee8bda5d9e1f1ae9736ae3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236933
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
closes PLAT-5602
flag=none
test plan:
* verify migrations run
* verify a root_account_id can be set on a
ConversationMessage record
* verify ConversationMessages always
live on the same shard as their root account
Change-Id: I2e04a5eb6b3156fd14064954e73bbb6adafe8d3c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236953
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
* note: records that have a context of course, group,
or account will have a root_account_id
* records with a user context will not have one
closes PLAT-5606
flag=none
test plan:
* verify migrations run
* verify a root_account_id can be set on a
Folder record
* verify Folder always
live on the same shard as their root account
Change-Id: Iaebeb34416a47279ec7e0bcb560dcc142afdf504
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236935
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
closes PLAT-5600
flag=none
test plan:
* verify migrations run
* verify a root_account_id can be set on a
CommunicationChannel record
* verify CommunicationChannels always
live on the same shard as their root account
Change-Id: I9cfcc6bf52beeec5b7d697acc708ec509cbdca8c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236952
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
* note: only records with a context of course, group, or account
will have a root_account_id
* records with a user context will not have one
closes PLAT-5599
flag=none
test plan:
* verify migrations run
* verify a root_account_id can be set on a
CalendarEvent record
* verify CalendarEvents always
live on the same shard as their root account
Change-Id: I6b2c1f25aba2ddca32eaea14a121f8aedc4525c0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236934
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
closes PLAT-5776
flag=none
test plan:
* verify migrations run
* verify a root_account_id can be set on a
DiscussionTopic record
* verify DiscussionTopic always
live on the same shard as their root account
Change-Id: I18c6e815490abea9633d466f2d8213f4894f8eae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236956
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Clint Furse <cfurse@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clint Furse <cfurse@instructure.com>
closes PLAT-5587
test plan:
* verify migrations run
* verify root_account_id can be set on an AccessToken
* verify AccessToken_s live on the same shard as their root account
Change-Id: I0183d39de21ae957eb49a2a68a6e750ab27060ad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235726
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
closes PLAT-5601
flag=none
test plan:
* verify migrations run
* verify a root_account_id can be set on a
ConversationMessageParticipant record
* verify ConversationMessageParticipants always
live on the same shard as their root account
Change-Id: Ib6eff6b6d8a2cdac2c00db6eeda45b5290927493
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236954
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
closes PLAT-5563
flag=none
test plan:
* verify migrations run
* verify a root_account_id can be set on a
ContentShare record
* verify ContentShares always
live on the same shard as their root account
Change-Id: I3261791c49996047296b23c555eeb325d4cc8826
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236932
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Clint Furse <cfurse@instructure.com>
QA-Review: Clint Furse <cfurse@instructure.com>
* note: records with a context of group, course, or account will have a
root_account_id
* records with a user context will not
closes PLAT-5559
flag=none
test plan:
* verify migrations run
* verify a root_account_id can be set on a
Attachment record
* verify Attachments always
live on the same shard as their root account
Change-Id: Ib55f450ac5ad48973bd95d69a55b1edefef7f725
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236931
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Clint Furse <cfurse@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clint Furse <cfurse@instructure.com>
closes PLAT-5584
test plan:
* verify migrations run
* verify root_account_id can be set on a GroupMembership
* verify GroupMemberships_s live on the same shard as their root account
Change-Id: I517dff1ed7f0ff6f23d021f4e88e8f61e9dbe7b4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235724
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
closes PLAT-5585
test plan:
* verify migrations run
* verify root_account_id can be set on an RoleOverride
* verify RoleOverride_s live on the same shard as their root account
Change-Id: I43701e997abcb48553cbcc795a4d056d2cfdf940
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235725
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
closes PLAT-5733
flag=none
test plan:
* verify migrations run
* verify root_account_id on a OutcomeProficiencyRating
* verify OutcomeProficiencyRating_s live on the same shard as their root account
Change-Id: I5bd3e07cb2774f10fd88cbf823f12c1d3a4de55d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235395
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
closes PLAT-5582
test plan:
* verify migrations run
* verify root_account_id can be set on an EnrollmentState
* verify EnrollmentStates_s live on the same shard as their root account
Change-Id: I4a51d590dd0d3aa0200efbea88e3266b1b8325d1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235723
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
closes PLAT-5732
flag=none
test plan:
* verify migrations run
* verify root_account_id can be set on an OutcomeProficiency
( may need to use OutcomeProficiency.new)
* verify that OutcomeProficiency_s live on the same shard as their root account
Change-Id: I7f4d30a6a0f7f272b839179d236173cd207b3f5a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235394
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
closes PLAT-5729
flag=none
test plan:
* verify migrations run
* verify root_account_id can be set on a LearningOutcomeQuestionResult
* verify LearningOutcomeQuestionResult_s live on the same shard
as their root account
Change-Id: I537683a89510bbac83d8b2b3e381d5cca2728207
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235359
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
closes PLAT-5730
flag=none
test plan
* verify migrations run
* verify root_account_id can be set on a LearningOutcomeResult
* verify that LearningOutcomeResult_s live on the same shard as their
root account
Change-Id: Ic840ca5b9066eb59a46b89485edd6859f47a9b4d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235360
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
closes PLAT-5731
flag=none
test plan:
* verify migrations run
* verify root_account_id can be set on a LearningOutcome
* verify LearningOutcome_s always live on the same shard as their root_account
Change-Id: I5d361be36a9d71107b15a254f5a16f45c53a7017
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235358
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
* prereq for root_account in ContentTag
closes PLAT-5727
flag=none
test plan
* verify migrations run
* verify root_account_id can be set on a LearningOutcomeGroup record
* verify LearningOutcomeGroup records always live on the
same shard as their root account
Change-Id: Id577f2166f9c913c071035cd5233ce7d0e46a350
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235224
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Closes PLAT-5562
flag=none
Test Plan:
- Verify migrations run
- Verify a root_account_id can be set on a
ContentParticipation record
- Verify ContentParticipation always live on
the same shard as their root account
Change-Id: Ia7e766c3633f0864ba1158e71e7d47b9573dc9cb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/233680
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Change-Id: I1f6445fa5898c6a9a757a7f7e643ada491703757
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234611
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
access tokens cannot be created when masquerading a user on purpose,
because this would allow a user to get the real token and use it when
permissions for the user could change in the future. A commit was made
ee50eec4bd to create the access tokens
used when doing an lti launch on the real_user instead of the user, but
this breaks some tools that are not handling all the masquerade data.
c94b34348a reverted that change to create
them on the user again.
This commit is adding a column to access_token so we can audit usage of
the tokens created from an LTI launch. When a token is created while
masquerading we add the real_user_id to the token and make the token
expire in one hour.
test plan
- masquerade as a user
- launch an lti_tool that creates an access token
- the tool should see the end users token
- in a console verify the token is set to expire in an hour
- verify that real_user_id is used on the token
- the token should expire within an hour
fixes KNO-464
flag=none
Change-Id: I1f8913fc536f4e2c8539551efed69b27fbdb6b1a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236443
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>