auto-corrected, with post-review checking for possible nilness
Change-Id: I89c30b92691a2a5f73d98d9c8ac721c50d3a4ba7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278014
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
[skip-stages=Flakey]
auto-corrected (with manual post-review looking for possible non-array,
non-string slices that might go bad, with none found)
Change-Id: I00feba96f58f701ed1f668f86928b8871d0d8ef2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277991
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
During user deletion, workflow_state was changed to
'deleted' on the Pseudonym, but deleted_at property
was not set. This change fixes this, deleted_at
will be set to the current time.
Closes SOS-2378
Test plan:
- Do a SIS import with one active user in it
- Change the status of the user to 'deleted' in CSV
- Run SIS import again
- Check the deleted_at property for the given user
in the pseudonyms table of the Canvas database
flag = none
Change-Id: I6ea6cfedc5e2889ff8ce6914978137025f49cd68
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277663
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>
[skip-stages=Flakey]
the balance. mostly. Lint/UriEscapeUnescape is put in the pending
block because it's so touchy, and I didn't want to deal with it
right now
all manual
Change-Id: Ibeb81e013f56f160d51f7d237a9bcfe98daa1e53
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277569
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>
closes FOO-2414
test plan:
* create a user via SIS
* run another SIS import with the user's status set to "suspended"
* that use should no longer be able to login
Change-Id: I31b177ee797b3dd8962112960bda11c5c4fa575a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276557
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Closes SOS-1917
flag=none
Test plan:
- import a csv with declared_user_type provided
- verify that the user has declared_user_type set
- import a csv with declared_user_type not provided
- verify that the user still has declared_user_type set previously
- import a csv with declared_user_type=<delete>
- verify that user's declared_user_type is unset
Change-Id: I9a26247b20f65cdb96a5a84e0eb53dd29f391467
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275475
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Kozma Jozsef <jkozma@instructure.com>
Product-Review: Kozma Jozsef <jkozma@instructure.com>
test plan
- upload file with BOM
- it should just import
fixes VICE-2058
flag=none
Change-Id: Ibc9b6743390b7f74769f61caf063b7c8a3c00988
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/273489
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
test plan
- specs should pass
refs VICE-2001
flag=none
Change-Id: I3073e72c2b4e5d44300e583311286fa7db8b512c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/272625
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
instead or retrying with the same process, retry with a new job
test plan
- run sis import
- it should work
fixes VICE-2001
flag=none
Change-Id: I18034482c4cb37c74999f6a6935274e959a5e822
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/272624
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
test plan
- import course file with dates and use <delete> to remove the dates
- it should work, see specs
fixes VICE-1993
flag=none
Change-Id: I7ac72679077bf86669ac87a7f231c0744fb4ede2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/272540
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:
- set up a blueprint course
- give it a SIS ID in course settings
- in account settings, attempt to enroll a student via
SIS import, providing an enrollments.csv containing
something like the following:
course_id,user_id,role,status
SIS_BLUEPRINT_COURSE_ID,SIS_USER_ID,student,active
- you should get a warning message that says the student
enrollment in the blueprint course isn't allowed
flag = none
fixes LS-2552
Change-Id: Ic5bf97ed742b6fee9a35df9d7777b650095560f8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271937
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
where suspending means they still show up everywhere, but the user is no longer
allowed to login
closes FOO-2039
test plan:
* have a regular user with an access token, and an active session
* (via a separate session or access token) suspend a pseudonym
via the API as an admin (logins API, set workflow_state to
suspended)
* ensure the original user gets logged out when they refresh, and
that their access token doesn't work
* but as the admin, you can still see the user
Change-Id: Idc0c61bcc244697e3c89b9beb2edfbe2a504b00e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269878
Reviewed-by: Simon Williams <simon@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>
If a pseudonym is found during a user import but the SIS ID doesn't match,
this flag would override the old (or non-existent) non-matching SIS ID
with the new SIS ID in the upload.
closes SOS-1922
Test plan:
- Do a SIS import
- Change the SIS ID of one user in the input file
- Run SIS import again
- Check the SIS ID of the changed user in Canvas
flag = none
Change-Id: I2b29904c1e34e7a7beebd5f41176e35f3fb54ef1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267749
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>
test plan:
- render docs, and click "SIS CSV Format" in the left nav
- see the field name for homeroom_course under courses.csv
- ensure you can use this field to create a homeroom course or
update an existing course'd (with SIS ID) homeroom setting
flag = canvas_for_elementary
closes LS-2122
Change-Id: Ica7ceff2bdfb5035c15cf237cc230b6cd117a603
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263947
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
when moving students between sections in a sis import
Change-Id: Ia04fb6c5d2d17ea4a6da24080735319f787a7622
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263374
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>
there is a known condition in our submission upsert that cause a
deadlock to happen because of a bunch of history that I have mostly
forgotten. see 7fd0528c3a for more context
The logic will rescue a dead lock, and then the job knows to retry if it
hit the dead lock. If it is not run in a job, we don't get the retry,
and it it hits the deadlock and fails the import.
test plan
- specs should pass
- move to section should not hit visible dead lock errors
fixes FOO-1555
flag=none
Change-Id: If8c7e6fa1d24e92a8dab1d6ebf5b29a7802ba5d3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257699
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
closes FOO-1366
flag=none
TEST PLAN:
1) run sis enrollments import that adds a string error
to "messages"
2) it gets inserted as a SisBatchError, no explosion
Change-Id: I87f54f5300448c5ed005612c44639d33bc4d41c7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255603
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>
closes FOO-1024
rather than provide migration instructions for all
users to get off of cassandra and on to postgres
for their auditors data, this will
default any un-configured installs to write
both places for now.
After a year, which is the retention window for
auditors data, we can force reads to come from AR
and deprecate/remove any cassandra code
entirely.
also clean up some model tests to not reach so deeply into
the implementation of auditors
Change-Id: If4ca01682618f85d04c9ee7a91522f4c1deac1ac
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249162
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>
test plan
- specs should pass
- run sis import with <delete> as the pronoun
- it should remove the users pronoun
- rake doc:api should work
fixes VICE-955
Change-Id: I2112b785641148a5a3edfe5313ab067ef47005e2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251672
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>
closes FOO-1126
TEST PLAN:
1) try to import a user that has more than 100
paths with the same email address
2) SIS import should not bomb
Change-Id: I642ea259accdc3b50060f9f28a803211f026830e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251650
Tested-by: Ethan Vizitei <evizitei@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Change-Id: I7f40ed058b50882121da69f0cb05966854b8e920
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250924
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
closes FOO-1148
flag=none
TEST PLAN:
1) import sis batch with an x-shard user and an existing
communication channel for the target email address.
2) we should detect the channel already exists and not
try to create a new one
3) the batch should succeed.
Change-Id: I20e4b0a7f61545715ff014e96492cc7a88916297
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251391
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
closes FOO-1112
TEST PLAN:
1) force your attachment reading flaky (see test)
2) try to import, first malformed csv failure should
redownload and retry
3) truly malformed csv should raise after 2 attempts
Change-Id: I3373a45f75965381604c28b05c42932491cc51f8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250761
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
test plan
- run the following with group category object and file contents
- GroupAndMembershipImporter.create_import_with_attachment(category, file)
- it should return a progress
- it should import groups and group members
closes VICE-813
flag=none
Change-Id: Iccc7a4f491d7efbe035057a2915f318fd695deb1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249030
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: Rob Orton <rob@instructure.com>
also look for the communication channel on the users shard
test plan
- have an account with a trust in place
- have a user with a login on both accounts
- on the account that is not on the same shard as the user
- run a user import that adds an email to the sis_id of the login
- it should be on the users shard
fixes VICE-889
flag=none
Change-Id: I1a4155892d519691d26797620a0d9a1b9c00d8e4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249192
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>
SIS is considered source of truth, and sis may change pronouns and don't
want to manage a second list of accepted pronouns
test plan
- run sis import with pronoun
- it should add it even when not in account list
fixes VICE-838
flag = none
Change-Id: I51804ac73c8a1934d5c135c736de0a3dfa6131b2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248782
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@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>