refs DE-1383
Change-Id: I6ab3efff2328717a74626a4fc2b4e171e41bcb06
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293150
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: Aaron Ogata <aogata@instructure.com>
Keep start_at nill when publishing a course
closes: LS-3150
flag= none
Test plan:
Prerequisite: A course without a course start date set
- Publish the course.
- Selecting Course from the Participation drop down, expect the start
date stays empty
- Check the course API and expect it also shows the "start_at" as
nill
Change-Id: Ia3b474fd7eaef5a84b3595e2308cc05341b85354
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/291191
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@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>
Creating a Kinesis client with no creds causes the AWS gem to reach out
to an AWS-internal IP (169.254.169.254). There is a connect timeout of 1
second but this is disabled in
config/initializers/no_timeouts_debugging.rb. As a result, creating a
Kinesis client can indefinitely hang, making Canvas completely unusable.
The issue is made worse by recent changes which turned Live Events on
with such invalid config for anyone who used config from
dynamic_settings.yml, whereas previously, Live Events had to be manually
turned on via a plugin.
This change prevents invalid configs from reaching the Kinesis client;
except in prod in case anyone is actually using the feature whereby
AWS looks up creds on the internal IP (and to avoid any possible
slowdowns by checking for the settings repeatedly).
Additionally I made NoRaiseTimeoutsWhileDebugging log a message when a
timeout happens, which would have greatly helped with debugging this
issue.
refs INTEROP-7016
flag=none
Test plan:
- Have config in dynamic_settings.yml like the old
dynamic_settings.yml.example, with live-events config but no creds,
e.g.:
live-events:
aws_endpoint: http://kinesis.canvaslms.docker
kinesis_stream_name: live-events
- From a rails dev console run LiveEvents::Client.config. It should
return nil.
- Run Canvas and make sure you can login, view a course, etc. -- just
try anything that emits a live event (almost anything)
- Add aws_access_key_id and aws_secret_access_key_dec from from
dynamic_settings.yml.example into your dynamic_settings.yml
- From a rails dev console run LiveEvents::Client.config. It should
return the config.
- From a rails dev console run `LiveEvents::Client.new`. It should
immediately produce a client.
- Restart Canvas and make sure you can view a course, etc.
Change-Id: I9a325b7f30c8e0203c2903a25a1f0139776b3f1f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271907
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
closes QUIZ-8257
flag=quizzes_next
test plan:
- enable/disable quizzes_next, on Import Content page,
"Import assessment content as New Quizzes" option will
be shown/hidden
Change-Id: Ie0b88f1a3940a34512e0627e593258ddf100deb8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261928
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Susan Sorensen <susan.sorensen@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
We found that the external pact broker hasn't been used in over 2 years,
so there isn't a justifiable reason to keep these running
Test-plan:
- Verify that contract tests still run for internal customers
- Verify that post-merge, generated contracts are still pushed
to the broker
Change-Id: I8221dbf97eb78610ef2b25a69e32909b7f29b6c6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260350
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
refs FOO-1648
flag=none
[fsc-propagate=false]
move general module code to "gems"
along with specs.
Leave shim in canvas to avoid breaking
things while callsites get changed.
change some limited callsites
from Canvas::Security to CanvasSecurity
that were doing spec stubbing that required
at least one namespace change anyway
generate readme describing common use
cases.
TEST PLAN:
1) security operations continue unimpeded.
Change-Id: Ia2d102d5038e2f5d0bb24201e38894e12b73063e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259540
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
refs OUT-4041
flag=account_level_mastery_scales
Test-plan: - Ensure this PS is rebased after g/258359 merges
- After g/258397 is merged in outcomes-service,
retrigger a build and verify that new contracts are
published and that these new specs verify them
Change-Id: Id86fcdad5830cac0ea1e648bbb08c15afeba2325
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258398
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
All are being skipped for now due to flakiness, but we'll want to
be able to run them in a separate job.
Change-Id: I2389d826a4161bee4a3678a67f8fbd1596a5f521
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252314
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: Tucker Mcknight <tmcknight@instructure.com>
Change-Id: Id39b1e8d3bebcc0f9b7ded920b450f275565f708
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250923
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>
Having the dummy root account (ID = 0) always there in
our test environment makes the test environment more closely
match prod.
test plan:
- specs pass
fixes INTEROP-6158
Change-Id: I58d6ec7e19c4ab4ebf5c2d5b3a38ecee0f047e7c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246942
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
flag=none
closes OUT-3903
Note: Pact and FSC don't play nicely when generating contracts
since Pact thinks that a new FSC run of a request+state pair
is trying to override something unintentionally
FSC_REPEAT_FACTOR='1'
Test-plan
- verify that contract tests run
- (post-merge): verify that contracts are pushed to inseng broker
Change-Id: Ic856bf6b506a00a921e9b1dd6add6dc1bdd105bd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246265
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
closes OUT-3752
flag=none
FSC_REPEAT_FACTOR='1'
Test-plan:
-tests pass, verify new tests run
Change-Id: Iccf54743d4a6206c5b593bc94523544cb4dc3480
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242528
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
Test plan:
-verify planner is always enabled when a student has an enrollment
flag=none
fixes VICE-331
Change-Id: I6ffb90de94737d01afbac36eee0f36a967ace179
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242462
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
Closes PLAT-5801
flag=none
This change keeps the root_account_ids column
updated on the users table. Updates to this
column are triggered whenever a record in the
user_account_associations table is created,
updated, or destroyed.
Test Plan:
This test plan assumes you have MRA and at least
two shards set up.
1. Create a user and associate them with the root
account in Shard 1
2. Run jobs
3. Verify root_account_ids on the user is now an
array of size 1 containing the global ID of
the Shard 1 root account
4. Associate the same user with the root account
of shard 2 (one way to quickly do this is by
using User#associate_with_shard)
5. Run jobs
6. Verify root_account_ids on the user is now an
array of size 2 containing the global IDs of
both the Shard 1 and Shard 2 root accounts
7. Set the "sync_root_account_ids_on_user_records"
Setting to something other than "true":
```
Setting.set(
"sync_root_account_ids_on_user_records",
"false
)
```
8. Create a new user in an account
9. Run jobs
10. Verify root_account_ids is still nil
for the new user
Change-Id: Ia4b6552b887f58a85bc368312234db4da2237058
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238830
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
spec: Add "mobile courses with discussions" provider state. This
will allow mobile pact testing related to discussion apis.
closes MBL-14340
Test Plan: Ensure that the mobile discussion pact tests
pass against this new provider state.
Change-Id: Ie924218b8e0e72740cdba5194d3b601407cdb28c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/241528
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: KC Naegle <knaegle@instructure.com>
QA-Review: Joe Hoag <jhoag@instructure.com>
Product-Review: Joe Hoag <jhoag@instructure.com>
spec: Added 'mobile user with conversations' provider state.
closes MBL-14235
Test Plan: Verify that new mobile Pact conversations
api tests pass against the new provider state.
Change-Id: If7daa1348a32896e48c497f06e7c079e534cc036
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/237740
Reviewed-by: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Joseph Hoag <jhoag@instructure.com>
closes USERS-523
flag = none
test plan:
* builds should pass
Change-Id: Id34d85e58f6dc693b8a6ffca37d08d838562daec
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235344
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
spec: Added a 'mobile courses with groups' provider
state to allow for mobile/android pact testing of
group API endpoints.
closes MBL-14234
Test Plan: Make sure that new group-related pact tests
pass when run using the new provider state.
Change-Id: If33430057098f56f72f0200d2f2bb24339c71684
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236335
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Joseph Hoag <jhoag@instructure.com>
Product-Review: Joseph Hoag <jhoag@instructure.com>
closes USERS-436
test plan:
- requires a pact contract in local or public broker
- execute tests against Pact files
- run `bin/contracts-verify-live-events`
Change-Id: I847787780e1bc4e5024e0cd2c46001dac6e31dfa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230402
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
Reviewed-by: Brian Watson <bwatson@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
spec: Added 'mobile course with quiz" provider state.
closes MBL-14171
Test Plan:
- Ensure new mobile quiz-related pact
contracts pass against new provider state.
Change-Id: Icc8b308f49d2d43a9727a4fda666b47040437e9f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/233369
Reviewed-by: Andrew Cobb <acobb@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Joseph Hoag <jhoag@instructure.com>
Product-Review: Joseph Hoag <jhoag@instructure.com>
test plan:
All pact tests should pass
Change-Id: Ie2b79c710bfe82cecb0e0e0ff5302fb8477d956d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/231699
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Joseph Hoag <jhoag@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Andrew Cobb <acobb@instructure.com>
Product-Review: Andrew Cobb <acobb@instructure.com>