[canvas-builds-refspec=5bdd0f9fb485ef9501bd0f34f8f669b36fa02c30]
[postgres=14]
[skip-cache]
postgis appears to be unused, so removed. Upgrade to use pg14
to match production.
Test Plan:
- Jenkins passes
- docker setup scripts work for amd and arm
Change-Id: I57e87b6a0d800d9574b2d1b7042d9b7939dc8b73
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/299570
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Build-Review: James Butters <jbutters@instructure.com>
The dinghy_http_proxy will see the port binding to :1234 and assume
that's the port it should be talking to in the container, so we need to
use the VIRTUAL_PORT variable to tell it no, use :80
test plan:
- Make sure your main `docker-compose.override.yml` DOES NOT include a
`VIRTUAL_PORT` environment variable setting for your web container
- Update your `.env` to include `docker-compose/rdebug-ide.override.yml`
in your `COMPOSE_FILE` variable
- `docker-compose up` to recreate your containers
- Go to http://canvas.docker
* VERIFY: it works
Change-Id: I395c253a68619dfa861916362d432947b13e4ac2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/295213
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jon Scheiding <jon.scheiding@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Joe Hernandez <joe.hernandez@instructure.com>
macOS and docker desktop's support of virtiofs is a better path forward
Test plan:
- Docker setup script works on MacOS
Closes FOO-2982
Change-Id: Ibb64390420bfa7ade82f00d962282db41917a89a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/294699
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
flag = none
Change-Id: I30adbe9bd1c5238528ab939aae4f04f93330dd75
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/294810
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
refs FOO-2801
flag = none
[change-merged][build-registry-path=jenkins/canvas-lms/foo-2801]
gems/canvas_i18nliner is now a package @instructure/i18nliner-canvas and
lives in the same repo on github along with the 3 other i18nliner
libraries.. this was done to make it easier for maintainers to deal with
this code, since changing one part may break the other due to how
they're architected
the source on github: https://github.com/instructure/i18nliner-js
~ test plan ~
build is still OK, this only affects the generation of files, and those
i manually verified to be identical before and after
Change-Id: I78afa8a808f1699c10aced8466cfade066848bc9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/294209
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
flag = none
Test Plan:
-Jenkins passes
-running docker_dev_setup works from fresh machine
-running docker_dev_update works
Change-Id: I7852189b035683d7cb538b2a04319dd9659e2752
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287799
Reviewed-by: Bobby Buten <bobby.buten@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@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>
Switches from standalone containers to explicit node+hub config
Selenium 4 has some differences in handling stale elements that we
should be aware of moving forward
closes OUT-4988
flag=none
[skip-stages=Flakey Spec Catcher]
Test-plan:
- make sure screenshots can happen for failures
- retrigger a few times and make sure things pass
- verify build summaries are intact
- verify FSC can still run seleniums
- verify local selenium running still works
- firefox / chrome / edge where applicable
- verify docker selenium running still works
- firefox / chrome / edge where applicable
Change-Id: I8f2fe5a34d712b5ccd7191bae7a9aeeb6f1f473d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284811
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
why:
* without this, the spring container can't run any rake tasks
like specs or the console
flag=none
test plan:
* with mutagen running, include this compose file in your .env
* `dcr web bash` (I have dcr as an alias for `mutagen-compose run --rm`)
* `env | grep HOSTNAME` and note the host name
* `rails c` should work, not error
* in the rails console, `ENV.fetch('HOSTNAME')` should return a
different hostname than above, showing that this is running
in the spring container
Change-Id: I2c9c1755482b52623d6cee05feb9e54d102726ee
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284262
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: Ben Rinaca <brinaca@instructure.com>
update docker_dev script to use mutagen 0.13.0, new dependency
mutagen-compose, update commands to use mutagen-compose.
closes: DE-1014
flag = none
Test Plan:
-Jenkins passes
-docker_dev_setup passes with all required dependcies
-with beta version of mutagen
-docker_dev_setup fails, alerting to missing dependency
-with mutagen 0.13.0, without mutagen-compose
-docker_dev_setup fails, alerting to missing dependency
-with docker desktop installed to Docker/Desktop.app
-docker_dev_setup does not fail
Change-Id: I3e18403912ee2a362c306da2df88eb58faa39db1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283663
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
flag=none
Test-plan:
- For docker
- in config/selenium.yml, change browser to 'edge'
- in docker-compose.selenium.yml (or equivalent), uncomment
out new edge service definition. It may have to be copied from
docker-compose/selenium.override.yml if using a copy
Change-Id: I7d60dcec9d70d63ce5b5efb2e686cdabdb49dae8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281697
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
update docker compose override file to correct
local file system sync issue with the web container
that prevented local changes to the RCE from reflecting
in Canvas without manual intervention
Change-Id: I10dd190cb76ab8a9364ff830a5d71103c7306968
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283165
Product-Review: Jake Oeding <jake.oeding@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
refs DE-966
flag=none
TEST PLAN:
ensure build completes and all tests run successfully
Change-Id: I82ef402eb790fafce53393b17b4695c9151e1745
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281489
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ben Rinaca <brinaca@instructure.com>
QA-Review: Bobby Buten <bobby.buten@instructure.com>
Product-Review: Bobby Buten <bobby.buten@instructure.com>
This adds some more buildtime args to allow you to pull postgres from a
different version and different image altogether. The defaults are fine
for current x86 builds, but for those building on ARM64 platforms,
they'll want to do add arguments to the build like:
--build-arg POSTGRES=13 --build-arg POSTGIS=3.1
--build-arg POSTGISIMAGE=ghcr.io/baosystems/postgis
Change-Id: Ied9f16ffdc0e63306fb7d102f5740f5865a1288c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281063
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
The mutagen example files had the wrong directory name for bundler and
were not persisting bundler configuration.
Change-Id: Ia484dccfe024cde2010d618323b91be98fef33f1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/280990
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
[ignore-stage-results=Flakey Spec Catcher]
update chrome version to run tests against. A few small
fixes to work with new chromedriver.
closes: DE-930
Test Plan:
-Jenkins passes
-FSC build passes
-Run test local docker dev setup
-Run test local dev setup
Change-Id: Ie2d5dd918f85cbcc01d0f8b572efa8aab71c1803
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279959
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
flag=none
test plan:
- Update your .env to include docker-compose/rdebug-ide.override.yml
in the COMPOSE_FILE variable
- Start your Docker environment
- Configure remote debugging in VS Code or RubyMine
(see https://instructure.atlassian.net/wiki/x/BACP-w)
- Launch the remote debugger and set a breakpoint somewhere ubiquitous
(e.g. in `ApplicationController`)
- Navigate to your local Canvas and confirm
that your breakpoint
Change-Id: I87d7bed838e7a593201a4bfd21f911216329343b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270409
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Jon Scheiding <jon.scheiding@instructure.com>
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>
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 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>
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>