Commit Graph

175 Commits

Author SHA1 Message Date
James Butters 563240666b remove postgis and upgrade postgres to 14
[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>
2022-08-26 16:15:34 +00:00
Aaron Ogata 6988472a2a upgrade node from 14.x to 16.x
refs DE-1264

Change-Id: If8b9d73a487b1914b19070a2249394e5116eb8d3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/295892
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
2022-07-12 12:41:09 +00:00
Jon Scheiding d75fc71b9d Fix rdebug-ide to not confuse dinghy/dory proxy
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>
2022-07-06 19:26:23 +00:00
Aaron Shafovaloff 73a7fb0827 No more mutagen
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>
2022-06-27 15:33:24 +00:00
James Butters 145c0c5764 move packages/babel-plugin-themeable-styles/lib/ down one line
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>
2022-06-24 19:55:17 +00:00
James Butters 67608cef10 add packages/babel-plugin-themeable-styles/lib to mutagen
flag = none

Change-Id: I83c7d2a108628fe58508d3e011dacd67a57136f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/294759
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
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>
2022-06-24 16:57:12 +00:00
Ahmad Amireh 14faf088c0 (i18n-js:4) use i18nliner-canvas from npm
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>
2022-06-23 18:42:23 +00:00
James Butters 1432d3e72a Revert "Replace old config ymls with newer mutagen ymls"
This reverts commit d3fc54655d.

Reason for revert: broke M1, non-mutagen setup

Change-Id: Iddcfa0b086312b4ed22f400a61637ee248fd647d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/288011
Tested-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-03-28 17:38:37 +00:00
James Butters d3fc54655d Replace old config ymls with newer mutagen ymls
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>
2022-03-25 15:38:49 +00:00
Brian Watson c8523e3233 Additional selenium 4 cleanup
flag=none
Test-plan:
- Jenkins jobs pass
- verify no references to docker-compose build context build/docker-compose
  or docker-compose/selenium-*

Change-Id: Ia11e2564490a5713256a70e9b1f3e88d6ebc78e5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285944
Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
2022-03-14 15:02:37 +00:00
Brian Watson 2f2a27d91b Upgrade to Selenium 4
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>
2022-03-09 15:28:31 +00:00
Xander Moffatt 7bf9664bd7 add postgress password env var to mutagen spring
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>
2022-02-02 23:14:43 +00:00
James Butters d8d1078abf update docker_dev scripts to work with latest mutagen release
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>
2022-01-27 19:57:22 +00:00
Brian Watson 2526686089 Add selenium-edge support for docker
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>
2022-01-26 20:50:15 +00:00
jake.oeding 8bc29a2249 fix RCE sync issue between host os and web container
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>
2022-01-20 15:28:58 +00:00
Bobby Buten 8be4bb35c3 purge pulsar from canvas
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>
2022-01-03 20:37:22 +00:00
Keith T. Garner 91e7e2fa0b make postgres/gis verions in docker configurable
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>
2021-12-13 18:21:23 +00:00
Keith T. Garner 843698cccc add another common ignore path to mutagen config
Change-Id: I889f5c0e2b34612e803866e3ea585ff68b0e2ffa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277189
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Dustin Cowles <dustin.cowles@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2021-12-13 15:30:09 +00:00
Keith T. Garner d2768c9c2a fix name of bundler dir for mutagen docker compose
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>
2021-12-13 15:29:45 +00:00
James Butters 27214d2f51 update chrome version and cleanup SELENIUM_VERSION
[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>
2021-12-07 14:18:47 +00:00
Jon Scheiding a2b5634d3d Fix RCE docker-compose configuration to work right with Dory
flag=none

test plan
- none

Change-Id: Ibbc54592f91afc8db49eb40f0f5cd58b8a5001aa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276932
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Jon Scheiding <jon.scheiding@instructure.com>
Product-Review: Jon Scheiding <jon.scheiding@instructure.com>
2021-11-04 14:56:53 +00:00
Jacob Burroughs 38566c51f2 Read credentials from rails credentials for access token
Change-Id: I2ad702b12fca205a5b6c0279832e40502f9c6454
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276552
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2021-10-22 14:50:48 +00:00
Jon Scheiding 1d688efeb0 Add configurations to enable remote IDE debugging with rdebug-ide
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>
2021-09-16 18:33:11 +00:00
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