Change-Id: I1e6aae06c904d2fd57f2720057c7a1f1629680f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/295294
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@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>
refs DE-523
Test Plan
1. Ensure CANVAS_RAILS override works
2. Ensure file override works
3. Ensure consul override works
Change-Id: I6eea63bba5c401428c02179a3d6187c8265ce33e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287849
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
in preparation for migrating qti_migration_tool to python 3
once that migration is complete, we can remove the python 2 version
refs DE-993
Change-Id: Iea25e7418c6e4bc87e639cc1883b216eea94ca6c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282813
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@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>
At the top of the docker file we decale the bundle directory to be
different then the one we mkdir. Since its an environmental variable,
let's use that when we mkdir.
Change-Id: Ib3fdba5ccc475a0b10d7b05287f6975cde161f49
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281211
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
We're back to makign installing pulsar the default again. Later test
builds broke without it.
Change-Id: Icb994b5dc5a566537c4c9ad513ab0f0b2ca2893e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281209
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
In earlier attempts to make pulsar optional for our docker builds, the
dockerfiles that need to be in sync got out of sync. This returns them
to being in sync, and makes the pulsar gems optional which is better for
open source users.
Change-Id: Id8a02878bb61cf589670526da0626a90da530a58
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281101
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
pulsar is on hold, so this patchset doesn't remove it from our docker
build, but makes it so you have to knowingly add it add it at docker
build time and at install_assets.sh time.
Change-Id: I1866191073b271b9309f96fb5363dc1f73e663a8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281091
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>
This patchset adds the ability to not install the pulsar library and
gems when building canvas in docker by adding an argument to the
Dockerfile and a command line argument to install_assets.sh.
Pulsar pre-built libraries are currently x86 only. ARM64 users will want
to do the following:
- When building canvas docker images do: --build-arg WITH_PULSAR=0
- When installing assets: script/install_assets.sh -p
Change-Id: I738c9172050c1eff4648531b62456199673ae691
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281070
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
with the recent upgrade of the ruby version in our Jenkins build
we need to make our Dockerfiles match that version 2.7
[canvas-builds-refspec=2427eaa818279a3b95f5ae0169d4896ba0cb5f7d]
flag = none
Test Plan:
-Jenkins passes
-local docker dev setup still works, no regressions
Change-Id: I4a87aa401df1c8c58b733990aba619aeed2e6347
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/268900
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>
defaulting to Production causes both prod and dev webpack
to get built taking up more space. default to Dev for the
local dev docker setup.
flag = none
Test Plan:
-Jenkins passes
-compiling assests only builds dev webpack
-after container is built, can build prod webpack and change
RAILS_ENV
Change-Id: If9e8ff419043ae718f67b0943946806022b015ee
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/268119
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>
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>
because simply asking it to run yarn-deduplicate is no longer good
enough, you must now be polite when doing it[1]:
To prevent security and user-experience problems from mistyping
package names, npx prompts before installing anything. Suppress
this prompt with the -y or --yes option.
we will also be updating npm to the latest to catch such issues in the
future
== test plan
running "rake canvas:compile_assets" using npm > 7 completes
without hanging indefinitely at the "install dependencies" stage
[1]: https://docs.npmjs.com/cli/v7/commands/npx#compatibility-with-older-npx-versions
Change-Id: I81e044d20143991cf6103084f44ce8d4c9011f5b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259662
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
because of nokogiri, we rely on multi-platform gem caching, which
only works right in bundler 2.2
Change-Id: Id207278946e849abec3418807c71e4650506a0cf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259142
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
you can switch back to rails 5.2 one of these ways:
* ENV CANVAS_RAILS6_0=0
* consul key rails6.0 with value `false`
* touch config/RAILS5_2
Change-Id: I811884b2250b865220a1a9d84c7254f42d79e18f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257587
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@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>
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>
Add a ruby 2.7 build triggerable by a comment on gerrit
refs DE-387
flag = none
test-plan:
- Build passess
- Local dev builds
- Ruby 2.7 build uses the ruby2.7-passenger image for
building the application
Change-Id: I512df9344dbd77e4c592270ef260325f95d8f666
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255797
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
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>
refs DE-411
Now that we don’t share much less code between local docker dev & Jenkins, there is no need for a complicated template to generate these files.
Change-Id: I13ef071b7e468dc04bc8d47a1c55e8d2920e09f6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254810
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
remove redundant compiling of assets. Add setup for selenium tests with
info on how to get that setup. Reduce number of times attempting to
run migrations.
flag = none
closes: DE-364
Test Plan:
- Run docker_dev_setup.sh on clean environment
- Run docker_dev_setup.sh on linux machine
- Jenkins docker build passes
Change-Id: I0b553a820d8e472f40f1d9a71d282dac79f67027
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252024
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
flag = none
refs: DE-203
Test Plan:
- Jenkins build passes
- Local docker build works same as before
Change-Id: I297bd187a74e823bd1c4612ea58c3c94d26bbc92
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254116
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
refs DE-212
If a user isn’t changing any front-end related files, we can get a significant time savings by not re-building webpack. In order to do this, we have to remove the multi-layer dependencies image due to poor docker support for multi-layer caching. The dependencies build is an artifact of the ruby-only image that no longer exists, so no behavioural changes are expected.
Test Plan:
1. Ensure that the post-merge / pre-merge caches are used on post-merge build.
2. Ensure that the pre-merge cache is used on a pre-merge build.
3. Ensure that both above work on specifically the same / different nodes.
[change-merged]
[build-registry-path=jenkins/canvas-lms/de-212]
[skip-rebase]
Change-Id: I659db8f201bfe5e4fa6d20d802a639f5a55685df
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245976
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
We originally experimented with an Alpine image for reduction in image size. However, a number of issues with Alpine have appeared that were unanticipated.
1. Alpine uses a different memory allocator
2. Alpine package manager deletes old versions once new ones are published.
The first issue is the potential root cause behind random segmentation faults in our tests and we are reverting the Alpine change to eliminate the memory allocator difference as the cause.
Test Plan:
1. Ensure that Jenkins image caching works correctly
2. Ensure that local docker build scripts work correctly
Change-Id: I02b13d8c7117495d825a92e0a4be4e70b0e78caf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247283
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: Ryan Norton <rnorton@instructure.com>
refs DE-209
[change-merged]
[build-registry-path=jenkins/canvas-lms-de-209]
Test Plan:
1. Ensure that `docker-compose build` works locally
2. Ensure that yarn is cached on Jenkins when run on a separate node
Change-Id: Icadf02b9e999eafd14f493ae1c0649ed0ffe58bf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245336
QA-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
refs DE-187
[change-merged]
[build-registry-path=jenkins/canvas-lms-de-187-test]
Test Plan:
Ensure that the cache is used for bundle install when a gem changes and the build is run on a different node.
Change-Id: I43f83338a25a0774030495904b75d0825abcc5bb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244748
QA-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
refs DE-187
Caching intermittently fails due to the intermediate layer in the multi-stage build. We don’t have any consumers of this image for now, so let’s work around this problem by removing it, until we can prioritize investigating why the multi-stage build isn’t using the cache for the intermediate layer.
[change-merged]
[build-registry-path=jenkins/canvas-lms/de-187-drop-ruby-layer]
Test Plan:
1. Cache is used on a build with a file changed on a separate node.
Change-Id: I8d771ac532bcd0bacc554f02f6b129294bcfedf9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244848
QA-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
refs DE-161
Test Plan:
1. Ensure that JS sourcemaps are skipped on pre-merge
1. Ensure that JS sourcemaps are run on post-merge
3. Ensure that Linters catch bundle size increase limits on pre-merge
Change-Id: I59607d902b191169a0415fc7673cb3a3a06dba68
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243619
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
refs DE-183
Test Plan:
1. Run the command at the top of the newly generated Dockerfile and ensure there are no changes.
Change-Id: Ice28ad169be94c39efb07d014a6bbc37e2f6c7f8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244651
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Prepare for splitting pre-/post- merge webpack builds by splitting yarn into its own stage so it can continue to cache correctly
refs DE-161
Test Plan:
1. Pre-Merge Build Passes
2. Post-Merge Build Passes
3. Pre-merge build uses cache from post-merge build
Change-Id: Ib07c8934d8691b0cf7866afd56043aee503f666b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244606
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>