Commit Graph

388 Commits

Author SHA1 Message Date
Aaron Ogata ddc875d672 move file change detection into own stage
refs DE-617

In order to properly split the stages for nospot removal, none of conditional jobs in Parallel Run Tests should directly depend on a heavyweight executor to know if they need to run.

Test Plan:
1. CDC Schema Check triggers when migrations change.
2. FSC triggers when specs change.
3. Local Docker Dev triggers when related files change.

[canvas-builds-refspec=3828a4bcd9f172fb6cec7046742cb678e3e489bf]

Change-Id: I578e4665d382aa27f03932d172604b20a8a1497d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262551
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-09 15:17:20 +00:00
Andrea Cirulli 87b5082958 move setup stage to new conventions
Move all the logic related to the setup stage to its own
groovy file.

refs DE-615
flag = none

Test-plan:
- Setup stage works the same way
- Main build passes

Change-Id: I32771f8a6262f3dad905ea71d8774cbdf96aac57
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262525
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: Andrea Cirulli <andrea.cirulli@instructure.com>
2021-04-08 21:27:10 +00:00
Andrea Cirulli 2bee2274a0 move dependency check stage to new conventions
Move all the logic related to the dependency check stage to its own
groovy file.

refs DE-615
flag = none

Test-plan:
- Dependency Check works simulating post-merge

Change-Id: I2164ab028b885cea0f8a72c6c6fb1d09360403c8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262514
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
2021-04-08 20:05:09 +00:00
Andrea Cirulli ffe67c6310 move linters stage to new conventions
Move all the logic related to the linter stage to its own
groovy file.

refs DE-615
flag = none

Test-plan:
- Linters works

Change-Id: I4b15b59bf7d76b16ce5f9773d8be4565f08849c0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262511
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2021-04-08 20:02:38 +00:00
Aaron Ogata d9c8be2b4a add missing license headers
Change-Id: I3992179bdefc988e1e4fcbc45044a14d9e50b1ca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262508
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-08 18:53:09 +00:00
Aaron Ogata 4a4172d7d7 move Run Migrations to new conventions
refs DE-615

Test Plan:
1. Run Migrations works

Change-Id: I47feba5c2be963882d03404f87b5e5e77abfcbeb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262505
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-08 18:30:35 +00:00
Andrea Cirulli 99ab71113f abstract rebase logic to its own rebaseStage groovy
In order to make the Jenkinsfile more readable move the rebase logic
to a self groovy file rebaseStage. This will also allow to create
unit test against it

[canvas-builds-refspec=fa26046c2b1382a956c3891debcd54eac7ed4166]

refs DE-615
flag = none

test-plan:
- Rebase stage should passes and behaves the same way

Change-Id: I7649346572b3ad6a0684dbdc75ae6ba4682fe5e0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262488
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: Andrea Cirulli <andrea.cirulli@instructure.com>
2021-04-08 18:26:17 +00:00
Aaron Ogata d6e8d7ad57 move Build Docker Image to new conventions
refs DE-615

Test Plan:
1. Build Docker Image works
2. Build Docker Image (Pre-Merge) works
3. JS Image build works

[canvas-builds-refspec=fa26046c2b1382a956c3891debcd54eac7ed4166]

Change-Id: I7bdcdb492b48c73316bc194216c0cd4c1fc3c6a0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262494
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-08 18:20:35 +00:00
Aaron Ogata b33dd6121f convert buildSummaryReport normal stage path to onStageResult()
refs DE-602

We need to reduce the different permutations of extendedStage() that live outside of that step. In order to do this, a handler can be registered that provides a pre-defined interface of functions that can be called.

Test Plan:
1. Jenkins main build passes.

[canvas-builds-refspec=0836fe0779bf81547ed1ea1c063ba806dc2a35e5]

Change-Id: I0cc268d09f10459b8417b0386383435b2ac74b74
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262402
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: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-04-07 21:58:19 +00:00
Aaron Ogata 2b4747c4b5 cache docker/dockerfile to allow flakey network script usage
Change-Id: Ide628034a970e2e6fded7c2971712d9dfed6391e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262253
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>
2021-04-05 15:39:21 +00:00
Cody Cutrer 103dce1f4a add frozen_string_literal comment to binaries
Change-Id: I4d0b95c1f22891772cfdc8a20adf0ff1e1bc8a8b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261819
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2021-03-30 18:14:03 +00:00
Andrea Cirulli 708709717b add end to end testing
Add the ability to test the local shared library groovy files
in canvas-lms, using the same framework used in canvas-builds

refs DE-443
flag = none

test-plan:
- Ensure build passes
- Ensure tests passes locally

Change-Id: I7957781206925c0a2fd75036f549187bdc95b1c1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256548
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2021-03-30 17:10:48 +00:00
Andrea Cirulli c81019a0b2 move rebasehelper to local shared lib
move rebaseHelper function into its own groovy file.

refs DE-587
flag = none

test-plan:
- rebase stage works as expected

Change-Id: I7919f849b2acb4294c666fc896b201fc5ddc8b0a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261653
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
2021-03-25 20:27:31 +00:00
Andrea Cirulli 3f2061ba56 Revert "Revert "add the ability to load local shared library""
[canvas-builds-refspec=84e5313a87dea47cc544ff1cb8fae728efa1af21]

refs DE-555
flag=none

This reverts commit 872961eb55.

Reason for revert: fixed issue in canvas-builds

Change-Id: Ia5d9232f1bec05724c0062fa6fdec31fd93e2ad4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260740
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: Andrea Cirulli <andrea.cirulli@instructure.com>
2021-03-24 21:30:59 +00:00
Andrea Cirulli 872961eb55 Revert "add the ability to load local shared library"
This reverts commit b4a90a4ffa.

Reason for revert: causing build issues

Change-Id: Icf4c6d0fe26ec073d7b7ad67d1670efdee761c16
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260738
Tested-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-03-24 16:07:08 +00:00
Andrea Cirulli b4a90a4ffa add the ability to load local shared library
move rspec and distribution into a library folder that
can be loaded as local shared lib to avoid the load code
in the jenkins files.

refs DE-555
flag = none

[canvas-builds-refspec=d4cf97caed1edf2c9c91c48460e94f99e58a4d0a]

Change-Id: Id947a389d22f04126a8654bd5e4957433cddd330
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261289
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: Andrea Cirulli <andrea.cirulli@instructure.com>
2021-03-24 16:02:38 +00:00
Aaron Ogata 4db066e5e4 rename timedStage => extendedStage
refs DE-338

[canvas-builds-refspec=c9a2defcf07854831310c015926d53a8894a31dc]

Change-Id: Ia6567b31d3b0e5b2579c7718f01fb010e15153da
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261285
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-03-22 18:03:07 +00:00
Aaron Ogata 28454e524d work around flakey starlord token issue
refs DE-579

Change-Id: I0889b9e34c27a667ffa0573982bb77a37f103dc3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261023
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-03-18 18:20:52 +00:00
Aaron Ogata 4cd931dd92 add skip-eslint flag
refs DE-565

Change-Id: Idbcc8ac2b4d780c6cf5cf26a4fcdcec85bc86eb3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260812
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: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-03-16 18:02:37 +00:00
Aaron Ogata 8b21e0daeb only run yarn linter if relevant files have changed
refs DE-562

Change-Id: I5a1f783666eea4f74c4c8883622b3c29edb94111
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260574
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>
2021-03-15 22:21:32 +00:00
Aaron Ogata 8ba5a59acf allow ENABLE_AXE_SELENIUM to be used as env var
refs DE-560

[skip-rebase]

Change-Id: Ida5d5433d477ab092468a81cbaf0cbb419cfd0a0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260547
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-03-15 15:11:09 +00:00
Cody Cutrer c0ff9592f1 use binstubs when possible when running specs
so that if spring is running, they'll boot fast

Change-Id: I35e972b6ad28664f4b4f1a349e2dc5f63a6ae13a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259794
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>
2021-03-12 00:21:22 +00:00
James Butters 3a1eb90728 remove common_build_steps
remove common_build_steps and move those functions into
script/common.sh where they can be reused in all scripts.
Fix the docker-smoke build to still work with the move.

flag = none

Test Plan:
-Jenkins passes
-Local-docker-dev build passes
-docker_dev_setup script still works
-docker_dev_update script still works
-rebase_canvas_and_plugins script still works


Change-Id: I0300b90d631701a36ede5bfa52fad7e2406bb209
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260384
Reviewed-by: Aaron Ogata <aogata@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>
2021-03-11 15:15:39 +00:00
Aaron Ogata af2422813c use spring for rspec loading
Change-Id: I1f1a5f02d26c68e5fc0bfa9e554d6b099be61d76
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253994
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-03-10 20:32:49 +00:00
Kyle Rosenbaum d41b62429f fix rerun log file numbering; refs DE-556
test plan:
-Rerun logs at /usr/src/app/log/spec_failures/Rerun_ are ordered
properly starting with 1 and incrementing up by 1 for each rerun

Change-Id: I7b777eed1975cbea24a51602bef5b00fc8fd58f9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260317
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: Aaron Ogata <aogata@instructure.com>
2021-03-10 19:41:33 +00:00
Aaron Ogata bc1a61ff84 improve failure report
refs DE-519

Test Plan:
1. Build successful
2. Build failure w/ no detected causes
3. Build failure w/ rspec failures
4. Build failure w/ intermittent failures
5. Buidl failure w/ stage failures

[canvas-builds-refspec=fa9df2ba5173b83b29c035460fb41d3d2eba8d65]

Change-Id: I55812ea5a82255d2d922817e7e641079d8d556a2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259854
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
2021-03-09 18:51:01 +00:00
James Butters e88fc72df0 refactor docker_dev_update with improvements
closes: DE-499

Improve the flow of docker_dev_update, incorporate new
rebase_canvas_and_plugins script.

Test Plan:
- Jenkins Passes
- Run docker_dev_update with no uncommitted changes
  -no command options; script updates docker containers
  -with --update-code; rebases repos, updates docker
  -try a variety of skip-plugins and skip-canvas
    -script skips repos as expected
-Run with uncommitted changes to canvas or a plugin
  -no command options; updates docker containers
  -with update-code; prompted to stash or skip
    -rebases correctly if stashed
  -use different combinations of skip-canvas and
   skip-plugins; script will skip as expected

Change-Id: I6cf96f2455ca798bc37d8b324190b955ab8bdaa1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259133
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2021-03-09 15:01:32 +00:00
Andrea Cirulli 599c677e5d add telemetry to docker-dev-setup
In order to gather telemetry data for local dev installation we are
adding a functionality that will report telemetry data only if
the end user enable telemetry in the local machine.

If telemetry is not enabled the docker_dev_setup script behaves the same
way it was before adding telemetry capabilties.

refs DE-478
flag=none

test-plan:
- Ensure docker_dev_setup succeeds with telemetry enabled
- Ensure docker_dev_setup succeeds with telemetry activation failed
- Ensure docker_dev_setup succeeds without telemetry snippet
- Ensure no sensitive data are sent to telemetry service
- Ensure docker_dev_setup succeeds if some telemetry requirements are
missing on the local machine
- Ensure input echo is hidden if telemetry is enabled
- Ensure input echo is enabled if telemetry is disabled

Change-Id: Ic14ce5fe251d580a50f7c5a20b5c145e9a68c1a8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257178
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-03-08 22:58:32 +00:00
Aaron Ogata 00d6488718 allow forcing linters job to fail
Change-Id: I3503dbe280f94efe72e38c640c330d19522297fb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260122
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-03-08 16:59:57 +00:00
Ethan Vizitei b33b74151b stage 1: audits engine extract
refs FOO-1644
[fsc-propagate=false]

  - create engines directory
  - put one empty-ish engine in there
  - add general engines dependency to
     gemfile construction
  - update build pipeline to run tests all engines
     just like gems
  - add engines directory to jenkins-cache build
  - get rspec running successfully with a dummy app
     inside the audit engine
  - stop failing with no message if environment
     unloadable in css config
  - generally set pattern in build artifacts and in
     code organization for pulling out an engine

Change-Id: I8650f5e0aa7d72556d2f02156886d2b503a111fb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258988
Reviewed-by: Jacob Burroughs <jburroughs@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-03-04 20:27:06 +00:00
Ahmad Amireh 6684592adf say PLEASE to npx when running yarn-deduplicate
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>
2021-03-02 21:58:31 +00:00
James Butters e7fcc698a3 skip yarn linter if plugin build
Change-Id: I20138f0b243501701f9f8314556ed90803a28a95
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259256
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2021-02-22 21:57:51 +00:00
Aaron Ogata 0d88b4b2ea actually delete all plugins before running yarn.lock check
Change-Id: Ia79bbbb27b8e57e1386a303ee0c997b83574105c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259226
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeff Largent <jeff.largent@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-02-22 17:34:34 +00:00
Cody Cutrer 62fb86ea50 raise bundler minimum requirement
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>
2021-02-19 22:49:02 +00:00
Aaron Ogata bb166ff784 reduce confusion around yarn.lock file linter errors
Currently, if the first error appears, then the second error is also guaranteed to appear, causing confusion. Fix this so that if the yarn.lock file is incorrect, we don’t check the dedupe condition as well.

Change-Id: I9e2c8abb1a3e85c07600cf8b18cb810b9753539f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259089
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-02-18 23:47:36 +00:00
Andrea Cirulli 4da7c8e29f fix find command not finding migrations file
refs DE-542
flag = none

test-plan:
- Ensure it will run migrations if a new one is present (canvas-lms)
- Ensure it will run migrations also for plugins

Change-Id: I2caf7ab8a32c0dd324c38de942ae2ceab10b76c5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259008
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>
2021-02-18 16:25:51 +00:00
Aaron Ogata 6816a822ce pre-load correct image for cache calculation
In a previous PS, we cached the ruby-passenger image on starlord and update it via a cron job to prevent cache disruption during the working day. Unfortunately, we forgot to update the image pulled for the hash calculations, causing it calculate the wrong hash if the dockerhub image has changed and the sync job hasn’t run yet.

Change-Id: I17bb91f7f08ca4352fc3f0ae88563867f3ece6f6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258833
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-02-18 16:21:45 +00:00
Aaron Ogata 9d703a261a allow JS image failure to be debugged
refs DE-541

Change-Id: I2392649a7f1144dd0a17df85a619c27928055ca8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258574
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: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-02-18 02:26:02 +00:00
Aaron Ogata 5d4b7a827a ensure plugin migrations are included in hash
refs DE-539

Change-Id: I2dbe96d0c581b7e113da6247b98cbf7731acb631
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258905
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-02-17 17:17:25 +00:00
Cody Cutrer f67d08e13f default to rails 6.0
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>
2021-02-08 23:32:22 +00:00
Aaron Ogata 7d73da5f3f disable translations for Jenkins build
refs DE-517

Disable locales on pre-merge Jenkins build in order to save ~25s on builds that require webpack to recompile. This also lets us clean up the code that builds the js-runner image. Pre-merge builds will still verify the i18n tasks in the Linters job, and post-merge builds will continue to build / run all tests using locales.

[build-registry-path=jenkins/canvas-lms/de-517]
[change-merged]

Change-Id: I8ded5d675b72d713738307403502f459adc79a73
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258197
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-02-08 16:03:06 +00:00
Aaron Ogata a8102ab205 cache JS runner image
refs DE-490

Change-Id: I83f15e273f0b6fa059ab259780db4f3ac026805f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257869
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: James Butters <jbutters@instructure.com>
2021-02-03 19:30:30 +00:00
Aaron Ogata 2eb6756a4b run linters against main-from-plugin build
refs DE-383

Change-Id: I9a4e413ae0e95167e43beb057bd6c54992c355e3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257621
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>
2021-01-28 15:03:52 +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
Aaron Ogata df7bd93b75 convert docker build to using remote tagging logic
refs DE-432

[build-registry-path=jenkins/canvas-lms-de-432]
[change-merged]

Change-Id: I1691d0a729abfd304eaad11a9e8aa0cc05874ac8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257003
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-01-20 18:59:03 +00:00
James Butters 9bcdf76bec fix parallel log generation
need unique logs for each process in a docker container

flag = none

Test Plan:
- Jenkins passes

Change-Id: Id673ae151aec404daca145dab0f08b3bfae911e3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256985
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2021-01-19 22:13:34 +00:00
Aaron Ogata 3740ac4267 add salt to migrations image tag
refs DE-471

[build-registry-path=jenkins/canvas-lms/de-471]
[change-merged]

Change-Id: I16df8f4bba4e71e0da16b4274b07fd02ea384395
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256874
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: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-01-19 21:59:43 +00:00
Aaron Ogata 8c602e04df convert docker build to using unique scope
refs DE-471

Change-Id: I5ed9b8506bc62aba7ac7004f0db3647ba482d415
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256976
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-01-19 19:01:56 +00:00
Kyle Rosenbaum 11168c53ec unbuffer parallel output
refs DE-468
flag=none

we now use run-and-collect-output.sh to buffer output based on thread.
as each command finishes in rspec-with-retries, the output is dumped.

test plan:
-cmd output is still buffered based on command, not on gnu parallel
process.
-test output is still readable by thread with distinct start and end
with all related output grouped.

Change-Id: I18d553fc83c04b5bc66a8f1b2ce8522f00bfb4f8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256906
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-01-15 22:44:00 +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