Commit Graph

212 Commits

Author SHA1 Message Date
Jon Willesen 3715a08bb5 upgrade instUI to 6.17.0
Change-Id: Ic73e4a4ecbcb98b2638b2247adfff998971021f8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224878
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
2020-02-04 01:00:33 +00:00
Frank Murphy a5270786ef Add configuration and scripts for replication.
References OUT-3442

Test Plan
:qa-cr:

Change-Id: Icd4bb2a80e9133196ee4d760f6fc1084ac7a438e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221319
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Frank Murphy <fmurphy@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
2019-12-20 22:21:12 +00:00
Rex Fleischer 20a0aedd0f add link in commit message linters for release flag format
fixes: CCI-159
flag = none

Test-Plan:
dont add a flag here and make sure it links in builds.

Change-Id: I7c424cc66c17de33982639650ed9167a1c762b7d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220944
Tested-by: Jenkins
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Rex Fleischer <rfleischer@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
2019-12-20 17:17:21 +00:00
Steven Burnett 0dd1a45d95 add warning for migration review
fixes KNO-140
flag=none

Test Plan:
- commit or modify a migration file
- notice gergich -1 your commit and leaves a comment
- tests still pass
- celebrate

Change-Id: Ic5b353c1750f65c7de988fc6ce9ed68f16db352f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/219997
Tested-by: Jenkins
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2019-12-10 00:10:25 +00:00
Rex Fleischer 7b55861c04 add linter for checking flag is set in a commit message
fixes: CCI-73

flag=none

Test-Plan:
push the commit without a flag, then do it with and
ensure the gergich messages are correct

Change-Id: I28b6691482e01547f7ffdc50c70123a329e195b5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/219403
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Rex Fleischer <rfleischer@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
2019-12-04 19:16:34 +00:00
S. Jacob Powell 248482a351 Add docker-compose.override.yml to .gitignore
This is in an attempt to
1. Prevent unpredictable behavior when
running docker-compose without specifying
docker-compose files (intentionally or
unintentionally *This is exactly a problem
I found that caused issues, running the defaults on accident)
2. Follow more closely what other projects
are doing, they don’t have the override committed
3. Follow typical industry standard,
from what I’ve seen, such as
https://blog.sentry.io/2019/02/28/exception-perceptions-docker

test plan:
Running ./script/docker_dev_setup.sh with no
docker-compose.override.yml
in the root directory will print the message
"Copying default configuration from
docker-compose.override.yml.example to
docker-compose.override.yml" and copy the file in.

Running ./script/docker_dev_setup.sh with an existing
docker-compose.override.yml will simply print
"docker-compose.override.yml exists, skipping
copy of default configuration"

Also check that the documentation changes
sufficiently explain the new
process and what to expect.

The file shouldn't be in the root of the
directory in the repo anymore,
in order to prevent unwanted default behavior
(requires explicit naming
of docker-compose files)
There should be a
docker-compose.override.yml.example in the config
folder for reference.

• Add `docker-compose.override.yml` to `.gitignore`
• Leave a copy of the current
`docker-compose.override.yml` in
`config/docker-compose.override.yml.example`
• Delete `docker-compose.override.yml`
from the root directory

fixes CORE-3409

Change-Id: I9cffeb52f2cc233061f78de10fcb240c09743542
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/214116
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
QA-Review: S. Jacob Powell <spowell@instructure.com>
Product-Review: S. Jacob Powell <spowell@instructure.com>
2019-11-15 20:48:08 +00:00
Cody Cutrer b41beedec5 use plain redis, not redis-store for consul event consumer
closes CORE-3420

Change-Id: I978a34f115bac967471b4af679eea717d3b75654
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/215102
Tested-by: Jenkins
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2019-10-30 15:56:00 +00:00
Derek Bender e44e95d1df warn if docker-machine has less than 8GB of memory
test plan:

- shutdown dinghy if already running:

    $ dingy down

- backup ~/.dinghy:

    $ cp -r ~/.dinghy ~/.dinghy.bak

- delete existing config:

    $ rm -rf ~/.dinghy

- setup a different machine name in preferences.yml:

    $ cat ~/.dinghy/preferences.yml
    ---
    :preferences:
      :create:
        # 'virtualbox' if you are not using docker-machine-driver-xhyve
        provider: xhyve
      :machine_name: dinghy-memory-test

- create the dinghy vm (outside of the docker_dev_setup.sh script):

    $ dinghy create

- set temporary shell variables:

    $ eval $(dinghy env)

- verify ram is less than 8GB

    $ docker-machine inspect dinghy-memory-test | ruby -r json -e 'puts JSON.parse(ARGF.read).fetch("Driver").fetch("Memory")'
    2048

- verify the script exits before setting up canvas and clarifies that 8GB of
  memory is required:

    $ ./script/docker_dev_setup.sh

    <snip>

    Canvas requires at least 8GB of memory dedicated to the VM. Please recreate
    your VM with a memory value of at least 8192. For Example:

        $ dinghy create --memory 8192

- remove the tempory dinghy vm:

    $ dinghy destroy

- restore dinghy configuration files

    $ rm -rf ~/.dinghy
    $ mv ~/.dinghy.bak ~/.dinghy

- open a new shell to restore previously set shell environment variables

Change-Id: I63fbd486b276b653bbcec017cfabb354b746bbe2
Reviewed-on: https://gerrit.instructure.com/213110
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Tested-by: Jenkins
2019-10-15 16:43:28 +00:00
Landon Gilbert-Bland 8596433ff7 Add support for javascript optional chaining
Per https://github.com/tc39/proposal-optional-chaining

Test Plan:
  - Jenkins passes

flag = none

Change-Id: I7b9fde7e91a9bd00a85397bcf791b8eccd528a5b
Reviewed-on: https://gerrit.instructure.com/209826
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2019-09-17 17:33:46 +00:00
Ryan Shaw bf446dd05f Now that i18nliner can understand it, turn back on fragments
The previous commit makes it so i18nliner can understand <> instead of
<React.Fragment>, so this turns back on the eslint rule we had to turn
Off

Test plan:
* run bin/rake i18n:generate_js (or let the Jenkins builds run)
* it should pass

Change-Id: Ia3204cd6c3147eb52ca612adbb3b20b2df8c6921
Reviewed-on: https://gerrit.instructure.com/205378
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-20 14:06:41 +00:00
James Williams bb6bd0aeac add permissions variable expansion
also keeps it undocumented for now

test plan:
* test an lti launch in a course using a variable
 in the format:

 $Canvas.membership.permissions<permission1,permission2,..>

 with a comma-separated list in between the brackets
 corresponding to course-level permissions
 (see doc/api/roles.html#method.role_overrides.show), e.g.

 $Canvas.membership.permissions<read_forum,moderate_forum>

 these are the list of permissions to check
 when the variable is expanded it should substitute it with a
 comma-separated list of permissions filtered to those
 that the user has been granted within the course

closes #PLYT-1796

Change-Id: I1c039e04318fcfe8ca5ee450e608bd3fb2affe6b
Reviewed-on: https://gerrit.instructure.com/194797
Tested-by: Jenkins
QA-Review: Nathan Mills <nathanm@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
2019-06-12 12:13:28 +00:00
Mysti Lilla cf95581a60 Remove retry on ChromeDriver worker crash
Change-Id: Icbb772a76748a7c640ce0b6655fea839ecf898a2
Reviewed-on: https://gerrit.instructure.com/190122
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
Tested-by: Jenkins
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2019-04-29 21:19:05 +00:00
Keith T. Garner 3c7da25148 add json version of javascript coverage report to build
This adds the creation of the coverage summary to the javascript build
for easy sub-report generation.

Change-Id: I6a5df7496d2ce32733a64f1cb2a8115dd5556495
Reviewed-on: https://gerrit.instructure.com/182785
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-02-26 16:34:58 +00:00
Jon Willesen 32a74f2278 upgrade instUI to 5.38.0
refs ADMIN-2277

test plan:
- Do some spot checking all around, esp. on newer stuff written with
  InstUI
- Do some specific spot checking on:
  - Assignments edit page. Esp. with moderated grading
  - Gradebook late policies
- Check the original bug (ADMIN-2211)

Change-Id: Iaaaeb9d86dc2d59cb2c9ccca2a8764a5adb0896b
Reviewed-on: https://gerrit.instructure.com/176912
Tested-by: Jenkins
Reviewed-by: Anju Reddy <areddy@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2019-01-07 21:24:50 +00:00
Mysti Sadler e2a6aae42a Check last status on Chrome crashes
refs QA-567

Change-Id: Icebef61f594703629b64c8f7625c3f225d8a38f7
Reviewed-on: https://gerrit.instructure.com/173362
Tested-by: Jenkins
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
QA-Review: Mysti Sadler <mysti@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
2018-12-10 19:48:07 +00:00
Clay Diffrient 93a6d18046 Add precommit hook for auto fixing files
This only affects javascript files and only affects things
from the prettier whitelist

This will run slowly if you don't have node_modules installed
locally (e.g., in Docker), but it will gladly attempt to
run things in Docker for you.

This adds a new githook_installer image that will install
the githook whenever a docker-compose up happens in the
repo.  It will also install the hook whenever a `yarn`
occurs locally (as a postinstall hook).

This commit should also not fail things.  For example
having unused variables is an ESLint error, but it isn't
autofixable.  It will log the error, but will otherwise
continue.  However, it will make this pretty with prettier
as well as fix any other autofixable ESLint errors.

closes CORE-2118

Test Plan:
  - Run `yarn`
  - Add some semicolons to something from the whitelist
  - git add that file
  - git commit and it will strip semicolons
  - In a dockerized Canvas:
     - docker-compose up
     - Add semicolons to a file
     - git add that file
     - git commit, it will take forever (~60s)
     - It should have stripped out semicolons

Change-Id: Id9198aa008808e898f29acb9ed64dd14ff843222
Reviewed-on: https://gerrit.instructure.com/171510
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2018-11-27 21:07:31 +00:00
Mysti Sadler fca0d0c3bd Attempt one retry one unknown worker crash
refs QA-567

Change-Id: Icb8ce583315f2a612b5421c9ed92d73db311a579
Reviewed-on: https://gerrit.instructure.com/172645
Tested-by: Jenkins
QA-Review: Mysti Sadler <mysti@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
Reviewed-by: Robert Lamb <rlamb@instructure.com>
2018-11-20 18:29:34 +00:00
Mysti Sadler 75ac7c0b26 Add more error status logging for unknown failures
refs QA-567

Change-Id: I6f2e9abce68fa749ac5e578344278f5aaac0c291
Reviewed-on: https://gerrit.instructure.com/172206
Tested-by: Jenkins
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Mysti Sadler <mysti@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
2018-11-13 22:32:50 +00:00
Mysti Sadler a6ad7d2efb Add error status logging for unknown failures
refs QA-567

Change-Id: Ib8c5daa6c2eb2145ba1cc08fd11aaf006d690f5c
Reviewed-on: https://gerrit.instructure.com/171759
Reviewed-by: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
Tested-by: Jenkins
2018-11-12 19:25:10 +00:00
Clay Diffrient 02fde29575 Fix up xsslint to work
This also moves us temporarily to a git branch version of xsslint until the
official package gets a new release with the appropriate fixes in place.

closes CORE-2125

Test Plan:
  - Automated tests pass
  - xsslint output shows that it linted many files

Change-Id: Id87e872dd2b7a08f11c0ddfaebdfc3f44e86c724
Reviewed-on: https://gerrit.instructure.com/171702
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-11-12 16:42:28 +00:00
Ryan Shaw d86d69015c Opt our js build tooling dirs into prettier
I guess since our team owns these we can opt them in now


Test plan:
* nothing should change

Change-Id: Ic7207e1033869ef60644c41bd5c80a3e8532a6dd
Reviewed-on: https://gerrit.instructure.com/171471
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-11-07 22:46:16 +00:00
Derek Bender 07baf6b655 spec: log postgres connection problems in test
closes: QA-630

Change-Id: Iabe15645e9ecfba5b7e17efa8649f4f7a90bd9ba
Reviewed-on: https://gerrit.instructure.com/169986
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
2018-11-07 22:36:50 +00:00
Clay Diffrient 67c0cb161b Use set -e to force failure of generate_js_coverage
Test Plan:
  - Introduce a failing JS test
  - Run `COVERAGE=1 RUN_TESTS_FIRST=true yarn run test:coverage`
  - It should fail

Change-Id: I27c6c876c68ce76be2da85e0e573e2051ade1951
Reviewed-on: https://gerrit.instructure.com/169389
Tested-by: Jenkins
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2018-10-24 21:10:53 +00:00
Clay Diffrient 100f4da654 Make sure failure is reported when tests fail
Test Plan:
  - Introduce a failing JS test
  - Run `COVERAGE=1 RUN_TESTS_FIRST=true yarn run test:coverage`
  - It should fail

Change-Id: I26de85fac89a0091c7348abc45df3032b09f85ed
Reviewed-on: https://gerrit.instructure.com/169133
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-10-23 14:06:35 +00:00
Michael Hargiss 058d9a59a6 create log files for scripts
This addresses "No such file or directory" for first-time users
of script/canvas_update and script/prepare/prepare .

Test Plan:
  - qa-cr

Change-Id: I65373682830c7cfb169b6d0b5436dc24542cd446
Reviewed-on: https://gerrit.instructure.com/167770
Tested-by: Jenkins
Reviewed-by: Brian Watson <bwatson@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Michael Hargiss <mhargiss@instructure.com>
2018-10-11 16:23:54 +00:00
Michael Hargiss 3cfbdf31ac add selenium doc and prepare script
We have no documentation in Confluence or this repo for running
Selenium tests natively. This commit adds a doc for that.

We're also migrating the "prepare" script from the qa_tools repo
to this one.

Test Plan:
  - follow the instructions in doc/testing_with_selenium.md to
  verify it's accurate
  - run script/canvas_update to verify it still works
  - follow the setup instructions in script/prepare/README.md and
  verify it works

Change-Id: I11d63e60dc1faa8be1dfacfc9bebfcbea55c31f1
Reviewed-on: https://gerrit.instructure.com/167300
Tested-by: Jenkins
Reviewed-by: David Tan <dtan@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Michael Hargiss <mhargiss@instructure.com>
2018-10-10 18:22:06 +00:00
Ryan Shaw 85d9e19eb8 add packages/*/node_modules to nuke_node script
Change-Id: I218c77b289ae8f179db74edfabd2d7bb5c5e3ba7
Reviewed-on: https://gerrit.instructure.com/164045
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-09-12 04:12:29 +00:00
Ryan Shaw d49c379e85 put version number in instUI auto-upgrade commit message
test plan:
when you run `yarn run upgrade-instructure-ui`,
it should put the version number it upgraded to in the commit message.

Change-Id: I8b463a12994b31d9c2ae80458b51c24d183de9ee
Reviewed-on: https://gerrit.instructure.com/161314
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-08-21 22:48:46 +00:00
Ryan Shaw e8a88cceea A script to just update instUI
Closes: CORE-1709

This is what our Jenkins job to pull in every instui RC commit will use

Test plan:
* run `yarn upgrade-instructure-ui`
* it should make a commit that has new entries in yarn.lock for all the
  instUI packages that uses the latest rc version on the npm registry
* it should not affect anything else besides yarn.lock

Change-Id: I78cce6e801015819c4e4b27e26ede352deceebb9
Reviewed-on: https://gerrit.instructure.com/160435
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-08-15 20:21:10 +00:00
Frank Murphy 4159e09bc0 Match services docker workflow.
Fixes OUT-2367

There are now two scripts:
- docker_dev_setup.sh: will create / recreate the service
  and all databases locally
- docker_dev_update.sh: can be used to migrate the local
  master branch. Will also pull plugin changes and run the
  relevant migrations.

Both scripts now directly use parts of canvas_update under the hood,
which will hopefully make future workflow changes less painful.

Test Plan:
- With docker:
  - optional: create a new canvas checkout
    (you can use a different directory name to avoid destroying your
     current database)
  - git fetch
  - check out this gerrit, and use `git checkout -b 2367` to
    create a branch for it
  - git checkout origin/master~200
  - git checkout 2367 -- script
  - ./script/docker_dev_setup.sh (follow all prompts)
  - docker-compose up -d
  - login, accept the terms of use
  - docker-compose down
  - git checkout master
  - ./script/docker_dev_update.sh -n code
  - docker-compose up -d
  - login, verify you are not asked for terms of use and the school name
    is the same as before.
  - docker-compose down
  - ./script/docker_dev_setup.sh again (nuke the old database,
    change the root account name)
  - docker-compose up -d
  - login, accept the terms of use, verify the new account name

Change-Id: Ie40600d7ea1e90633d9139b4cc1cf853695ac8f8
Reviewed-on: https://gerrit.instructure.com/151547
Tested-by: Jenkins
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2018-08-14 17:08:58 +00:00
Steve Kacsmark 9b07536047 Don't overwrite local docker installs on linux
If a user has installed docker via other means, checking for docker.io
will cause apt-get to install over it and break the existing docker
installation. Since docker-compose will install docker.io recursively,
this is safer for users that have things configured already.

Change-Id: I6c45c70fbcdcdb8597310372fa331d764b1dd859
Reviewed-on: https://gerrit.instructure.com/158944
Reviewed-by: Omar Khan <okhan@instructure.com>
Product-Review: Steve Kacsmark <skacsmark@instructure.com>
QA-Review: Steve Kacsmark <skacsmark@instructure.com>
Tested-by: Jenkins
2018-07-31 13:30:28 +00:00
Clay Diffrient 2dc1d7fa86 Add a way to generate better js coverage
This should pick up coverage from both karma and jest
in Canvas proper.  It should also pick up coverage from anything under
packages/*

closes CORE-1265

Test Plan:
  - Run `COVERAGE=true yarn test`
     - Coverage reports (coverage-final.json) should generate in all
       packages such as (canvas-planner) as well as in coverage-karma
       and coverage-jest
  - Run `yarn run test:coverage`
     - coverage-js folder should be generated.  Opening index.html
       should show the full coverage report
  - Remove coverage-{js, karma, jest} and
    packages/canvas-planner/coverage as well as .nyc_output to get back
    to a clean state
  - Run `RUN_TESTS_FIRST=true yarn run test:coverage`
     - All tests should run and generate the appropriate report just
       like the last time in coverage-js

Change-Id: I50744b8977e0683e079af5bdd2865dbcd6ad9066
Reviewed-on: https://gerrit.instructure.com/146098
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-07-17 14:19:03 +00:00
Dariusz Dzien cb38a9e3a8 Use --no-deps in docker_dev_setup and install gems in parallel
Test plan:
 - `./script/docker_dev_setup.sh` still works

Change-Id: Id2021e3870cbd3d8645ecadff3034f3f2b0cfe08
Reviewed-on: https://gerrit.instructure.com/155306
Tested-by: Jenkins
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Dariusz Dzien <ddzien@instructure.com>
2018-06-29 16:37:00 +00:00
Han Ngo f9a75654a1 Warm fix broken API Token Scopes file
Fixes PLAT-3550

Test Plan:
- Verify there is no 'API Token Scopes' under OAuth2
- Verify there is only one link 'API Token Scopes' under Resources
- Verify there is no code left related to generating the 'API Token
Scopes' table under OAuth2

Change-Id: Ib00a4aeec102eafc22169ac5322b581fef797a0b
Reviewed-on: https://gerrit.instructure.com/155247
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2018-06-27 17:38:28 +00:00
Omar Khan 6fb94bdd22 Build assets before running migrations
The migrations now fail with `BrandableCSS::DefaultMD5NotUpToDateError`
if you try to run them before building assets. This commit updates the
docker_dev_setup.sh script to build assets first to avoid this error.

Also updates the script to use the correct docker package: `docker` in
the Ubuntu package repos is actually some kind of system tray thing. We
want the `docker.io` package:
https://packages.ubuntu.com/xenial/docker.io

Refs gh-1300

Change-Id: Iba9a6f9bffe1a9e60bd715f1214caaab0394d37e
Reviewed-on: https://gerrit.instructure.com/150865
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Omar Khan <okhan@instructure.com>
QA-Review: Omar Khan <okhan@instructure.com>
2018-06-26 20:52:49 +00:00
Ryan Shaw 74d17ccf3e rm script/remove-packages-from-yarn-integriry
closes: CORE-1497 (along with the other that has already been merged)

I missed this with the rest of my yarn workspaces commit. Don’t need it
anymore

Change-Id: I1608b8056699a563a81b3b97e7c54ae7ebbc7c09
Reviewed-on: https://gerrit.instructure.com/152453
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-06-06 20:08:02 +00:00
Ryan Shaw e415eaa961 Use yarn workspaces
Run `script/nuke_node.sh` to clean everything up
Run `yarn install` it should install everything for everything
Run `yarn build` and `yarn test` they should work exactly as before

Change-Id: I11a27ff2d705c6cbb3b3f9029dd8b32138706146
Reviewed-on: https://gerrit.instructure.com/151356
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-06-04 20:02:02 +00:00
Derek Bender 0d77c3278f add --pure-lockfile to local-yarn script
test plan:
- docker build succeeds
- specs pass

Change-Id: Ie60f52a9e8f473454544a0aa67e1cce0197a2776
Reviewed-on: https://gerrit.instructure.com/151938
Reviewed-by: Bryan Petty <bpetty@instructure.com>
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2018-05-30 21:52:49 +00:00
wdransfield 8b0740be29 Add API Token Scope Docs
Closes PLAT-3394

Test Plan:
- Run the `doc:api` rake task
- Navigate to /doc/api/index.html and verify there
  are two new links in the OAuth2 section ("Developer
  Keys" and "API Token Scopes")
- Verify both links work
- Verify the token scopes documentation has a table
  for each scope group and includes all Canvas
  scopes
- Verify "Resources" documentation pages now display
  the scope along with each API endpoint

Change-Id: I2fea0ff531744dbaf63d24619b3c0e9655a25a7a
Reviewed-on: https://gerrit.instructure.com/151010
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2018-05-29 18:21:57 +00:00
Brent Burgoyne e1ab28f0ef don't delete linked packages with yarn install
Change-Id: I95e2fd1695c111fe153c9cdb91637a095333293a
Reviewed-on: https://gerrit.instructure.com/149676
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
2018-05-09 19:22:17 +00:00
Ryan Shaw 680693256e Fix script/uncache-packages to work on macs
Test plan:
Run ‘yarn’
You should see output like:
Clearning cache for packages/canvas-rce
And not
usage: dirname path

Change-Id: Ida820eebf6811959e831b525ee8c0293df0c910b
Reviewed-on: https://gerrit.instructure.com/148780
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
2018-05-01 18:59:10 +00:00
Brent Burgoyne f91658d4bf move canvas-rce to canvas-lms/packages/canvas-rce
closes CORE-994
refs RECNVS-398
refs CORE-1224
closes CORE-1237

test plan:
- yarn install
- smoke test rce
- tests pass

Change-Id: Ieaff024fa89879fac3e7edf99381f46de921cce2
Reviewed-on: https://gerrit.instructure.com/145671
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2018-05-01 13:46:18 +00:00
Mysti Sadler 77171b991e Use "build" script for packages pre-install
refs ADMIN-761

When we added canvas-planner to the packages
directory, we set up a prebuild script to
build everything we needed for Canvas that
would run during yarn install.  This causes
canvas-planner to have to do a lot that it
doesn't need to do when we just want the npm
packages to be installed (for the sync-
translations build or for other purposes)
so we're setting a specific build step
instead

Test Plan
- Specs pass

Change-Id: I72a0dc52cd9be1255985d69921d9910ba12e9ffe
Reviewed-on: https://gerrit.instructure.com/147565
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
QA-Review: Mysti Sadler <mysti@instructure.com>
2018-04-20 18:02:34 +00:00
Stewie (Nicholas Stewart) 5fa6bb57b9 Add copyright message to remaining .rb files
Update: Copyright years now reflect the year that the file was first
committed.

Refs: PLAT-3200

Test Plan: jenkins is still happy and specs pass!!

Change-Id: Ic26463defe41fc52cf4da8020976394c641f51d5
Reviewed-on: https://gerrit.instructure.com/143545
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Stewie aka Nicholas Stewart <nstewart@instructure.com>
2018-03-19 13:38:50 +00:00
Ed Schiebel 553105aa48 Get eslint working again
Wwhen files change in canvas and under packages/canvas-planner, eslint
bombs out.
When files hange in package/canvas-planner alone, they aren't linted
using planner's rules

fixes ADMIN-830

test plan:
  this isn't going to be easy.  While including the changes here:
  - commit a change to a canvas-lms .js file with an eslint error
  > expect gergich to log it in the jenkins output in gerrit
  - commit a change to a canvas-lms/packages/canvas-planner .js file with
    an eslint error
  > expect gergich to log both the above file eslint errors
  - revert the change to the canva-lms file so only planner has a lint
    errror
  > expect gergich to log it

Change-Id: I337ee0ff3025875a8faf427e2fb749d76ae09bed
Reviewed-on: https://gerrit.instructure.com/142470
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2018-03-09 14:03:38 +00:00
Leo Abner 1239a57fcb Fix initial setup migration issue
Test Plan:
 - N/A

Change-Id: If1503d1f640b9506762095185232d4e1c1732efc
Reviewed-on: https://gerrit.instructure.com/141715
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Leo Abner <rabner@instructure.com>
QA-Review: Leo Abner <rabner@instructure.com>
2018-02-23 06:21:16 +00:00
Ed Schiebel ec05f824fc Put finishing touches on planner under canvas
- update README with new instructions
- update how canvas runs sub-package tests
- remove planner's test server

closes ADMIN-742

test plan:
  - when jenkins runs, check to see that planner's tests run too

Change-Id: I2493b65f580c76b28f225f1330e99e1ceb1378b4
Reviewed-on: https://gerrit.instructure.com/139882
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2018-02-21 17:49:03 +00:00
Ed Schiebel 40b876493e Move planner under canvas-lms
closes: CORE-949

this also upgrades us to use what was on canvas-planner master
as of 1pm on 2/1/2018 (specifically 9569cc1)

test plan:
* canvas planner should work
* all automated builds should pass

Change-Id: Iecce81d640c8aacb79189e2b26946613a03d25f2
Reviewed-on: https://gerrit.instructure.com/135947
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-02-02 23:58:48 +00:00
Ryan Shaw abf158f09b remove line only needed by yarn 0.x
Change-Id: I51510fd066c981bac32ce6cb153647119fe3a39b
Reviewed-on: https://gerrit.instructure.com/136368
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-12-21 23:00:25 +00:00
Ryan Shaw c11e737980 force using yarn 1.3.2
closes: CORE-674

test plan:
* while running yarn 0.27, try to run `yarn`
* it should give you an error about how you need to upgrade yarn
* brew install yarn (or upgrade to yarn 1.3.2 however else you do that)
* run `yarn` 
* it should work and should not make any changes to your yarn.lock or 
  node_modules

Change-Id: I916febab60755c93d3f2591c9067c1c8d8903674
Reviewed-on: https://gerrit.instructure.com/133501
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-11-22 16:38:47 +00:00