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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>