Commit Graph

152 Commits

Author SHA1 Message Date
Kyle Rosenbaum d310b75f47 add RspecQ under feature flag; refs DE-803
RspecQ can now be used to run tests using the
'use-rspecq' commit message feature flag

test plan:
- build runs as normal without use-rspecq enabled
- enabling use-rspecq commit flag runs tests using rspecq,
no tests run via old rspec/slenium groups
- test numbers match between differing builds
- build artifacts are created with or without feature flag
- build summary report works with or without feature
flag

Change-Id: Ibaf32177a8ec28a89278eaa4277bd7a752cbfc58
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/272130
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: James Butters <jbutters@instructure.com>
2021-09-01 20:26:52 +00:00
Evan Battaglia cc27686aeb Prevent creating LE Kinesis client from hanging
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>
2021-08-23 22:19:44 +00:00
Ethan Vizitei 3fdc6405a0 enable api-gateway config for notification preferences
closes INTEROP-6689
flag=none

also dev config for api-gateway development

TEST PLAN:
  1) provide api gateway url through dynamic settings
  2) notification preferences uses api gateway for graphql
     queries

Change-Id: I78c59998d6de522df4f16a98d8f468424add674c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271525
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-08-17 18:30:13 +00:00
Nate Armstrong f189732913 Fix js-tests + mutagen
flag=none

test plan:
- add docker-compose/js-test.override.yml to COMPOSE_FILE
  in .env
- run tests
  > mutagen-compose run --rm js-tests bash
  > yarn run test:jest:watch ui/features/act_as_modal/react/__tests__/index.test.js

Change-Id: Ia74d33b5d7d942c2419a233fdb9c86acb0b0b51c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270754
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Nate Armstrong <narmstrong@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
2021-08-11 22:46:58 +00:00
James Butters d206cac48d Revert "correct the docker dev documentation"
This reverts commit 332a98bf34.

Reason for revert: the code change this was based on is reverted.

Change-Id: I0f4b39bd6d051cee92a9bb4f4793ae4055867a78
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267649
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Tested-by: James Butters <jbutters@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-06-29 13:53:55 +00:00
James Butters 6fded992dc Revert "fix js-tests.override"
This reverts commit 0b78f170c6.

Reason for revert: this was just a temp workaround. 

Change-Id: Ic365eb15e38fce8433df1110d0d970588721379d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267651
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2021-06-29 13:36:53 +00:00
James Butters cc32af3ccd Revert "asset install in Dockerfile"
This reverts commit 655cecbd5d.

Reason for revert: broke dev environments

Change-Id: I97f47a8ef7ac369b3cb30e448a3cfa9997c03930
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267650
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2021-06-29 13:36:09 +00:00
James Butters 0b78f170c6 fix js-tests.override
the recent change to Dockerfile and docker-compose yamls
neglected to modify the js-tests.override.yml

flag = none

Change-Id: Id2e923bb4ed8f25946ab95364ce76898f2c178b7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267897
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2021-06-25 20:18:20 +00:00
James Butters 655cecbd5d asset install in Dockerfile
move asset compiling into the Dockerfile allowing for a simpler
docker dev setup.

flag = none
closes: DE-696,DE-365

Test Plan:
-mac normal setup
-mac mutagen setup
-linux normal setup
-linux mutagen setup

Change-Id: I7e178c1ca91ee1908c4af55e03ec0010f5abce8e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266332
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
2021-06-24 19:25:48 +00:00
James Butters 332a98bf34 correct the docker dev documentation
followup to Dockerfile changes, correcting the documentation
to match the new workflow.

closes: DE-727
flag = none

Change-Id: I55dd950b2399cd804bb67934bab345b0b69e37d7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267777
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-06-24 19:25:38 +00:00
Dustin Cowles 56ad038287 Fix issues with js-tests Docker container
Previous commits renamed the generated_2 volume but missed the js-tests
container. Some scripts (notably script/nuke_node.sh) rely on git.

Chromium is now only officially distributed as a snap. Since we do not
have snap available in the base image, using the official Google Chrome
deb package is a workaround to get js-tests working.

flag = none

Change-Id: Iab40ef504d9dad6d7ae56a0c9a4485ee8468a92d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265912
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Dustin Cowles <dustin.cowles@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Product-Review: Dustin Cowles <dustin.cowles@instructure.com>
2021-06-08 18:46:55 +00:00
Ethan Vizitei cf8acc1fb7 include debug output for pulsar bootstrap script
closes FOO-1931
flage=none

TEST PLAN:
  1) run build
  2) see bootstrap output for pulsar
  3) pulsar specs pass

Change-Id: I260d3e7d39a5600949f492f383a74ea4d7812ec4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264087
Reviewed-by: Aaron Ogata <aogata@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>
2021-05-03 19:39:53 +00:00
Ethan Vizitei 2244ec98ab AUA writes on message bus
closes FOO-1835
closes FOO-1837
closes FOO-1838
flag=none

TEST PLAN:
  1) enable aua on pulsar
  2) all aua log messages that go to the
     db also get sent to a pulsar topic

Change-Id: I0f90ab7c8aa32376a122e30a1c104a1651a507bf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263930
Reviewed-by: Cody Cutrer <cody@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>
2021-05-03 16:33:02 +00:00
Ethan Vizitei 117c6dbc1c match pulsar retry strategy to failure pattern
Change-Id: Ib91b2ce81159f07f313d532b68ee41529877775e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263758
Reviewed-by: Aaron Ogata <aogata@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>
2021-04-28 16:03:59 +00:00
Nate Armstrong ba71429064 Add compose file for canvas-rce-api
refs = none
flag=none

test plan:
- Pull the changes
- Add docker-compose/rce-api.override.yml to .env
```
COMPOSE_FILE=docker-compose.yml:docker-compose.override.yml:docker-compose/rce-api.override.yml
```

- run `docker-compose up`
- the rce api image should build
- once everything is running verify that the rce api is connected
  - create a new page
  - insert Course Document
  - Documents tray should load without error

Change-Id: Ie9a6cc73db6e87ea2e7f9f69fe85428791803a71
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263574
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Nate Armstrong <narmstrong@instructure.com>
Reviewed-by: Guilherme Baron <gbaron@instructure.com>
QA-Review: Guilherme Baron <gbaron@instructure.com>
2021-04-27 17:19:45 +00:00
Ethan Vizitei 7159efe38d cut back on pulsar retries
Change-Id: I4594d731e6ce4eb247d45485062a96392abd77f4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263695
Reviewed-by: Aaron Ogata <aogata@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>
2021-04-26 21:14:30 +00:00
Aaron Ogata a03e821d17 improve pulsar bootstrap pre-execution check
refs DE-639

Pulsar has 2 services internally, dispatcher and admin server, make
sure both are ready before executing the admin work.

Test Plan
1. The build passes
2. Build is monitored for rest of day for any further intermittent failures

Change-Id: I14f9911285070e727003dc8c0ade5aa067388594
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263430
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-04-22 15:22:20 +00:00
Ethan Vizitei edb599a264 make pulsar tests wait for pulsar stability before running
closes FOO-1894

also make the docker image only retain critical files
for pulsar dependency

Change-Id: I8b0c7138707abb2ac3b748c8b5ce8f41e2741051
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263360
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-04-21 18:50:03 +00:00
Ethan Vizitei a0624c197c MessageBus integration vector
refs FOO-1835
refs FOO-1850
closes FOO-1862

TEST PLAN:
  1) MessageBus specs actually run in build

Change-Id: Iaec6b7206830bd2d6d28177d8fc3b9aa4680a800
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262754
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-04-15 22:14:38 +00:00
Ethan Vizitei 09bc72dcd7 Pulsar Dependencies
closes FOO-1828
closes FOO-1829
closes FOO-1831

- add service to run pulsar locally in pulsar.yml
- add apt-get dependencies to compile "rice" and "pulsar-client"
- add dependency on pulsar-client gem

Change-Id: Id942db70dc81fd977e907aff0702c7eda7f68820
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262287
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>
2021-04-14 15:59:45 +00:00
Evan Battaglia 55dd0b3d79 Revert "MicrosoftSync: move creds from vault to consul"
This reverts commit 8704d83a37.

Reason for revert: Vault is not ready for prime time

Change-Id: I37c41be5345aa2ee362df4e7831cf64d2729668d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261952
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-04-13 22:02:14 +00:00
Evan Battaglia 8704d83a37 MicrosoftSync: move creds from vault to consul
Test plan:
- From a rails console, run:
  MicrosoftSync::GraphService.new('ourtenant').list_education_classes
- There should be an error telling you where to put the creds
- Follow the instructions, hopefully they are self-explanatory.
- Run again and and the education classes should be listed

Change-Id: I4a8cf6f788178345bac375b8be6aa31b04bc4a24
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262423
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-04-07 21:06:51 +00:00
Ahmad Amireh 4243097b21 rename some things
fixes FOO-1265

[skip-eslint=true]
[pin-commit-analytics=7e49eefd7f59cbf43fd03bf8957bbbfa76f8d9d5]
[pin-commit-demo_site=adade2e38e46a358a4643cd3db2fe5ccffe39ec5]
[pin-commit-instructure_misc_plugin=47a3161102b0611af56d134fbd0c828ddc1b8abf]
[pin-commit-migration_tool=0dbac2f5b421d894395605ce4b583ef0f7d60b22]
[pin-commit-multiple_root_accounts=cc96d28c0d59bbe47acc64de4fdd8e1d2b029805]

Change-Id: I14c07f20bd260cf0de1f48ceb70b3c2313edf2d2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258807
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
2021-04-06 01:12:49 +00:00
Jacob Burroughs 088cbb4cd5 Introduce release notes data model
Single dynamo table for all release notes data.  Should support active-record
style patterns (mostly) for CRUD operations, plus querying the latest N visible
records by role and environment.  Also supports paginated listing of *all* notes
for administrative purposes

fixes FOO-1752

Change-Id: Ic1e7e204e93e263479a738af18daf312c801269c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261548
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>
2021-04-05 16:09:59 +00:00
Evan Battaglia 220b44cbf1 Microsoft Sync, initial syncer job
* Lays out framework for getting and caching Microsoft API tokens and
  hitting the Microsoft Graph API.
* Simple sync job which creates a group for the class if it doesn't
  exist and sets the extra LMS/SIS metadata.

NOTE: I discovered the MS API is eventually consistent -- it does not
immediately create a group when we hit the POST /education/classes
endpoint. In a future commit (I added a new ticket) we can work replace
the "sleep" with polling with sleeping or launching a new delayed job.

closes INTEROP-6567
flag=microsoft_group_enrollments_syncing

Test plan:
* Get creds from me and put in dynamic_settings.yml
* Try getting a token and observe it is cached (only the first time you
  run will you see "get service:timeouts:microsoft_sync_login:error_count"
  and "set microsoft_sync_login/<OURTESTTENANT>" calls to the redis cache):
    MicrosoftSync::LoginService.token(<OURTESTTENANT>)
* Put our test tenant (you can get that from me) into your root
  account's settings[:microsoft_sync_tenant]
* Create a course with a name and description that clearly label it
  as your test course for the Microsoft sync project
* From a rails console run:
    c = Course.find(...) # your new test course
    g = MicrosoftSync::Group.create(course: c)
    syncer = MicrosoftSync::Syncer.new(g)
    syncer.sync
* Run the syncer again and observe (from the MicrosoftSync::GraphClient:
  log lines) that we do not create or delete anything.
* Check that the group looks OK on the Microsoft side:
    g = MicrosoftSync::Group.last
    syncer = MicrosoftSync::Syncer.new(MicrosoftSync::Group.last)
    cgs = syncer.canvas_graph_service
    gs = cgs.graph_service
    gs.get_group(g.ms_group_id)
* Check that the extra properties on the group have been set:
    gs.get_group(g.ms_group_id, select:
      %w[microsoft_EducationClassLmsExt microsoft_EducationClassSisExt])
* Update the group's ms_group_id to nil in the database:
    g.update! ms_group_id: nil
  Then rename the course to something similar but slightly different and
  re-rerun the sync job (you may have to run syncer.course.reload and/or
  syncer.group.reload to make the syncer get new values). Then repeat
  the last two steps. In the first of those two steps, the group name,
  but in the second step, the data in microsoft_EducationClassLmsExt
  should be updated. This is because the syncer assumes if a group has
  been created it was created correctly, but it doesn't assume the extra
  metadata was ever set to it re-sets it. Also check that ms_group_id
  has been re-filled in on the group record.
* Change your creds to something invalid and clear the rails cache.
  Run the sync. It should raise an error. Then check that the Group
  record has been updated with workflow_state=errored and
  last_error="Invalid Status Code: Login service returned 401 for tenant
  <OURTENANT>". This is what will be shown to the user (teacher).
* If you need/want to look at the Microsoft admin web console, you can
  get those creds from me. From there you can delete your group, if
  needed. You can also delete your group by using:
    gs.request(:delete, "groups/#{ms_group_id}")

Change-Id: I077497c1c412095420079ea80d461bd172425bca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260232
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Wagner Goncalves <wagner.goncalves@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Wagner Goncalves <wagner.goncalves@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2021-03-24 14:30:20 +00:00
Augusto Callejas 099704ff86 Fix ignore path typo
flag=none

Change-Id: I240a98127688eb742553e962c83e6dbfbb4aaa71
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259471
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Augusto Callejas <acallejas@instructure.com>
2021-02-25 18:50:58 +00:00
Ahmad Amireh 486b0bf72c upgrade to node14
fixes FOO-1527
flag  = none

test plan: you can install node modules and run webpack

Change-Id: I33347d791b0923f4471b555c6fac303b098b1ef4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257333
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>
2021-01-27 15:33:52 +00:00
Keith T. Garner b76829d1fe fix dangling sentence in mutagen readme and permissions
Change-Id: I653e04c481930c44f869e4313fa122e13db5163f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257043
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2021-01-20 15:12:08 +00:00
Keith T. Garner dafab87020 add mutagen docker-compose files for development
This adds some example docker-compose files that work with mutagen to be
used for local development with docker.

Change-Id: If0a787708abc21bcdbf0fe30fc6d0625d1bc1a27
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255064
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2021-01-19 23:48:25 +00:00
Ahmad Amireh 46f8efd61f modernize canvas_quizzes
fixes FOO-1409
flag  = none

no more client_apps, canvas_quizzes now lives as part of canvas-lms
proper inside app/jsx/, which makes the build leaner and leaves us with
one less thing to reason about

logical changes:

- converted from AMD to ES modules
- upgraded to recent react + react-router
- dropped RSVP in favor of native Promises
- used CanvasModal instead of home-grown Dialog
- removed dead code; notifications in particular were fishy as there had
  no dependents at all and did not even show up in the graph
- ported tests to Jest, added more unit ones and two integration ones
- removed "config.onError" and now throws errors where appropriate
- disabled console statements in non-dev

:: test plan ::

- create a (old-school) quiz containing all types of questions
- as 3 distinct students, take the quiz and try to randomize your
  answers

at this point it's helpful to have a reference to compare the screens; I
replicated the quiz on my production sandbox for this

- go to /courses/:id/quizzes/:id/submissions/:id/log
  - verify it looks OK
  - click on a specific question in the stream and verify the question
    inspector widget works OK
  - go back to stream and push "View table"
  - verify the table and its controls are OK

- go to /courses/:id/quizzes/:id/statistics
  - verify it looks OK
  - click on ? in the discrimination index chart and verify it displays
    a dialog with help content
  - click on "X respondents" in one of the charts and verify it displays
    a dialog with the respondent names
  - verify the interactive charts do interact as expected (no logic
    changed here so just a quick glance)
  - link to "View in SpeedGrader" for essay-like questions works

Change-Id: I79af5ff4f1479503b5e2528b613255dde5bc45d3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256118
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>
2021-01-14 22:45:10 +00:00
Kyle Rosenbaum a4e1da3aea add the ability to run parallel rspec processes in container
refs DE-225
flag=none

By specifying RSPEC_PROCESSES, we can now run multiple
rspec processes in a single container. This change modifies
the existing database setup to create 1 database per rspec
process. This also impacts results.xml using a 1 results.xml
per rspec process.

Rename database key to db for redis configurations to match
current version of redis.

test plan:
- rspec runs as expected in single threaded mode
- rspec runs as expected in multi threaded mode
- results.xml contains valid results with no duplciate tests
- reruns only run for failing threads
- reruns work in single and multithreaded mode

Change-Id: Ib2e549d467e8a6d8fef9914f2733d9ddfa460e99
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255120
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-01-14 21:12:45 +00:00
Michael Ziwisky d39b927c3a update JS testing docs
flag=none

this commit also removes the phantomjs docker-compose service which has
been broken for years, ever since PhantomJS was removed from
karma.conf.js in https://gerrit.instructure.com/c/canvas-lms/+/102169

test plan:
 - follow the docs to ensure you can run a targeted JS test in docker

Change-Id: Ifa1647897a7a9605e097aeaf89e718c167d379fc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256179
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
2021-01-06 22:47:53 +00:00
James Butters da9fd405ff upgrade selenium to version 87
flag = none

Test Plan:
- Jenkins build passes with browser 87
- docker locally builds and runs selenium tests on chrome 87
- local install of canvas runs seleniums on chrome 87

Change-Id: Id1600e002c202a4dd90405d9b68a3ff092cbd764
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255045
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-12-15 16:24:37 +00:00
James Butters 34955e24ba add details for setting up selenium
flag = none

Test Plan:
-jenkins passes
-running steps locally

Change-Id: I1e67d0556a60bfc2a6667f0eec1aa71c134bb8be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255077
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-12-14 21:08:05 +00:00
Ahmad Amireh 45cb519d52 [node12] upgrade to node 12.19.1 (LTS)
fixes FOO-1116
flag = none

this upgrade was problematic mostly because of Node's support for ES
modules (ESM) that is still fairly recent and introduces some complexity
around packaging. This is also the reason for the considerable hack
related to @instructure packages (see inline documentation) that can be
removed once we fix things upstream

| test plan |
| --------- |

- install node 12 if needed (e.g. not on docker)
- purge your node modules:

    rm -rf {.,client_apps/*,gems/*,gems/plugins/*,packages/*}/node_modules

- make sure you can still build locally (native/docker)

    bundle exec rake canvas:compile_assets

Change-Id: If9605ac428f0ff228f8852f0becb9fbac750f1f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253166
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2020-12-11 03:45:31 +00:00
Kyle Rosenbaum d123b00089 add timeout parameter to wait-for-it script; refs DE-347
this parameter is added for easier testing of postgres spin up
timeouts.

flag=none

test plan:
* wait-for-it still behaves as expected and defaults to 60 seconds.

Change-Id: Iec8c704f68bf36941ffea043ed5c942b3e70d758
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251499
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2020-10-30 18:04:45 +00:00
Andrea Cirulli 375192ec94 use chromium instead of google-chrome-beta
Karma Dockerfiles are using the google-chrome-beta package.
The test should be executed using a stable version of Chromium.

refs DE-257
flag=none

test plan:
- Ensure specs pass
- Ensure Jenkins build pass
- Ensure 20 Karma tests pass

In the Karma Dockerfile is being used the google-chrome-beta package, we have to change it to google-chrome-stable for testing against a stable chrome version.

Change-Id: I8e51709326306d51c58e0c6d82fcc3f542865074
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247385
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-09-15 22:13:48 +00:00
Ethan Vizitei abdc6c7700 dynamo is optional for dev
Change-Id: I086db562073c62f0a4bc49664ae8cf18bedf831a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246553
Reviewed-by: James Butters <jbutters@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>
2020-08-31 19:05:02 +00:00
Ethan Vizitei 0d332e2dde some dynamo config for local dev with graphql auditors
Change-Id: Icdedc9d618f3207a16848d0a10c053a816dcbdf5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246398
Reviewed-by: Michael Ziwisky <mziwisky@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>
2020-08-28 21:57:08 +00:00
Michael Ziwisky 14682d6b1b tweaks to dynamodb docker-compose setup
- gets rid of container_name, as this explicit name breaks from the
   pattern used in the rest of the codebase.
 - gets rid of env vars for AWS creds as they're unnecessary, and could
   potentially interfere with other aws libs besides dynammodb.
 - removes `links` as its deprecated and redundant with `depends_on`
 - adds "VIRTUAL_{HOST,PORT}" for dinghy

also fixes a typo in an old data fixup

Change-Id: Ie5953d1ee89d9e40779fe8f3e6c56731f77684d2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246061
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-08-26 16:39:21 +00:00
James Butters 37b96514e2 update to use postgres 12
update to use postgres 12, removed some dupicate env vars, changed
to use the correct env vars to be in-line with canvas-builds.
skip failing specs for eval team to fix. EVAL-1104

flag = none
refs: DE-185

Test Plan:
-Jenkins main-canvas-postgres-12-ruby-2.6 build passes
-Jenkins main-from-plugin passes
-Jenkins FSC passes
-Jenkins peformance tests passes

Change-Id: Ied0b7bc3d894897fb673cf07e861f7d91bc9ed48
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244770
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-08-18 22:54:56 +00:00
Ethan Vizitei 86204f9671 local dynamodb config
refs FOO-781

TEST PLAN:
 1) run global lookups init script from console
 2) nothing happens, it's a stub.
 3) checkout MRA with global lookups
 4) init script works, new table for lookups in DDB

Change-Id: I09e705e6448fd791b2c17a44f7bcae94060ed46c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244182
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
2020-08-18 16:56:32 +00:00
Ethan Vizitei 617bbc1758 default auditors to postgres
Change-Id: I46b3a21e7459438f977e16d3ede2c0bc53e4d5e7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242014
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
2020-07-29 17:14:00 +00:00
Xander Moffatt 4e1a804b9f bump all docker-compose files to 2.3
refs DE-153
flag=none

test plan
* `dc up` works

Change-Id: I9e087a2c4c82a8dffd2fdb628cb9c9d45192ffa5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243673
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2020-07-28 20:44:44 +00:00
James Butters 102e009094 spec: uprade chrome to 84
Upgrade chrome browser to version 84 as part of browser.yml upgrade.
https://github.com/SeleniumHQ/docker-selenium/releases/tag/3.141.59-20200719

closes: DE-135

Test Plan:
-Jenkins builds pass
-chrome 84.0.4147.89 is used, verified in jenkins logs

Change-Id: I1fa8c552ca93dd0266058786ff69055f0e501c46
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243004
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
2020-07-22 21:05:34 +00:00
Derek Bender a09f6902ed Alpine canvas-lms based image
Drop-in replacement for existing Dockerfile

Closes: CCI-391

Change-Id: I9d21a74d72013be854631b2f77880eb0c47fded2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236853
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-07-15 17:21:56 +00:00
James Butters 5298bf7b9a add selenium version to jenkinsfile.selenium.fsc
flag = none

Change-Id: Iefd519cd2eedf9ada5a7756ded47b5040df4d713
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/241546
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-06-30 17:17:05 +00:00
Ethan Vizitei 96c6d38b1a auditors read path
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>
2020-06-09 16:10:33 +00:00
James Butters f67efbf768 spec: upgrade the selenium-chrome docker version
Test Plan:
- all builds pass

flag = none

Change-Id: I51963ba964928d6c86270a178435930a3977fb35
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/237237
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: James Butters <jbutters@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-05-14 02:32:38 +00:00
Rex Fleischer 8fc0a10688 add smoke test for using canvas-lms image as a consumer
fixes: CCI-309
flag = none

Test-Plan:
the build has to pass with the new smoke test stage and
the image should start on portal2

Change-Id: Id71846ed3aca5f6b260bd342c6ce2b2a56743b66
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/233716
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Rex Fleischer <rfleischer@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
2020-05-13 16:54:14 +00:00