Commit Graph

310 Commits

Author SHA1 Message Date
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
Spencer Olson 0b7d4135a0 tweak docker_dev_setup script
Adds the dinghy tap before trying to install it.

Test Plan:
1. On a machine running OSX without dinghy installed, run the
   docker_dev_setup script. Verify dinghy is set up without issue.

Change-Id: I0479323aefd21554fb3bc2a8f00ced727b497496
Reviewed-on: https://gerrit.instructure.com/132850
Reviewed-by: Omar Khan <okhan@instructure.com>
Tested-by: Jenkins
QA-Review: Omar Khan <okhan@instructure.com>
Product-Review: Omar Khan <okhan@instructure.com>
2017-11-15 22:19:08 +00:00
Omar Khan b70b6b2936 Add docker_dev_setup.sh script
This script sets up a full docker development environment from scratch,
on mac and debian-based linux.

Test plan:

- On mac, run script/docker_dev_setup.sh
- Answer the prompts
- Check that the script completes successfully
- Run docker-compose up
- Open http://canvas.docker
- Repeat on ubuntu xenial

Change-Id: Ic1eb0bad791fcbfe3953691623f2fbfb40b9298b
Reviewed-on: https://gerrit.instructure.com/130857
Tested-by: Jenkins
Reviewed-by: Bryan Petty <bpetty@instructure.com>
Product-Review: Bryan Petty <bpetty@instructure.com>
QA-Review: Bryan Petty <bpetty@instructure.com>
2017-11-01 23:02:50 +00:00
Cody Cutrer 60ad30006b trigger consul event of HA Cache invalidation
refs CNVS-39528

Change-Id: Ib6025b893e31922724ef84de781ed98238d5d1b3
Reviewed-on: https://gerrit.instructure.com/127239
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-09-26 15:59:04 +00:00
Cody Cutrer 622ed3314a require yarn, not npm
Change-Id: I2dbb037d4cbb0de7952dde19196c6937d18924e9
Reviewed-on: https://gerrit.instructure.com/122554
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-08-14 15:27:14 +00:00
Jon Jensen 9a3ad8aa94 spec: don't let parallel workers stomp each others' cassandras
at some point we started loading/caching the cassandra config before
forking, which made every worker share the same keyspaces, causing
various specs to fail during the initial run

test plan:
* the build should be more stable

Change-Id: I804178152c165d72f3665ce1103c8af4736a9aa6
Reviewed-on: https://gerrit.instructure.com/122252
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-08-11 17:46:19 +00:00
Benjamin Porter ab1d21949e Copy yarn.lock in docker_pull_image.sh
Change-Id: I4d122b0384331663dddb9f58dacae12f2568619a
Reviewed-on: https://gerrit.instructure.com/119102
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: Brad Horrocks <bhorrocks@instructure.com>
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Tested-by: Jenkins
2017-07-14 20:19:15 +00:00
Benjamin Porter 50703292f5 Add some new installation steps to docker_pull_image.sh
Change-Id: I83e2791d6b6ac2f3f00cf6fdad428b365c2e0d01
Reviewed-on: https://gerrit.instructure.com/119072
Tested-by: Jenkins
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: Brad Horrocks <bhorrocks@instructure.com>
2017-07-14 19:45:50 +00:00
Benjamin Porter c7ec796804 Add volumes to nuke to docker_pull_image.sh
There were a couple more volumes that needed nuking.

Change-Id: I7450dd977955eaf65add72926585b1a98bcf1fa2
Reviewed-on: https://gerrit.instructure.com/119060
Tested-by: Jenkins
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: Brad Horrocks <bhorrocks@instructure.com>
2017-07-14 19:45:23 +00:00
Brad Horrocks 1fd429df4b Add script to assist those not wanting to build canvas :D
Change-Id: I597a91f4bf092729ee4d292b65fc5e65c6511247
Reviewed-on: https://gerrit.instructure.com/107876
Reviewed-by: Josh Orr <jgorr@instructure.com>
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2017-07-14 16:46:31 +00:00
Cody Cutrer f50f695176 upgrade to aws-sdk v3
Change-Id: I52ed6d98b70cac11f3004789fb750ace79c5a0d8
Reviewed-on: https://gerrit.instructure.com/110693
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-05-26 15:30:08 +00:00
Ryan Shaw fb41a8a46a rm …/vendor/{timezone,ie11-polyfill,fontface}
closes: CNVS-36805

I’m working towards turning on babel for public/javascripts
And so instead of having to worry about selectively adding excludes
For things in public/javascripts/vendor that we haven’t modified,
I’m just moving things out of there.

This commit just relies on gulp rev to put these files in
public/dist/* instead of having the intermediate artifacts
hanging around in public/javascripts/vendor/* that then
get copied/revved to public/dist by gulp rev.

This also minifies any gulp-revved js in production

Test plan:
* Nothing should change
* run compile_assets
* the javascript for your timezone data should load
  just fine like it did before
* the lato fontface observer should still be working
* go to the site in IE, there should not be any
  Js errors (like “Promise is not defined”)

Change-Id: I10b2e3f102276ab0ef5f58cbc0d981f5aa800522
Reviewed-on: https://gerrit.instructure.com/111251
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-05-19 18:21:14 +00:00
Ryan Shaw 444f6925c2 Make nuke_node handle gems/plugins/*/node_modules
refs: CNVS-36896

…since we just added the ability for plugins
to have their own package.json/node_modules

Change-Id: I963822a0c849c3bdf67faec9e77df16397a88d34
Reviewed-on: https://gerrit.instructure.com/112309
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-05-19 16:16:48 +00:00
Ryan Shaw 4c18ba1b20 make it so plugins can have their own package.json
closes CNVS-36896

test plan: 
check this out
check out g/108509 in gems/plugins/analytics
run `yarn`
you should see it install graphael for analytics

Change-Id: Iee6a2d8bb2ee46d1cddc596b972d447f9bb3b1d6
Reviewed-on: https://gerrit.instructure.com/111765
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-05-16 15:01:59 +00:00
Landon Wilkins 9f47ed9a91 copyright linter auto correct, refs SD-2295
test plan:
* create a new file "test.rb"
* add "AUTO_CORRECT_LINTERS=1" to your .env
* install the pre-commit hook:
  echo "bin/lint" >> .git/hooks/pre-commit
  chmod +x .git/hooks/pre-commit
* git add .
* git commit -m "this should fail"
* verify the commit fails
* add the auto-corrected test.rb
* try to commit again
* verify it commits successfully

Change-Id: I3d52d6b192ca3bd83266a3e58d594acc3c516782
Reviewed-on: https://gerrit.instructure.com/111088
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-05-11 20:06:08 +00:00
Landon Wilkins c83a8e8aa0 custom comment generation for script/tatl_tael, refs SD-2295
test plan:
* tatl_tael still works (see test commits)

Change-Id: I1854693bd665f4018d1f0475dc922ac360b8d8d8
Reviewed-on: https://gerrit.instructure.com/109783
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-05-04 20:13:55 +00:00
Jon Jensen 88df378ecb spec: check git_dir first
`wip?` depends on git working, so the current behavior goes 💥 for non-
plugin GERRIT_PROJECTs

Change-Id: I43fc95125add6afeb35c931305a60ffb2e754509
Reviewed-on: https://gerrit.instructure.com/109929
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-04-27 04:44:33 +00:00
Landon Wilkins 87ba5f0e90 cleanup tatl_tael, refs SD-2295
better foundation for more complex linters

test plan:
- tatl_tael still works (see test commits)

Change-Id: Iff463b69e7acf873418842883dbcab38c83b798b
Reviewed-on: https://gerrit.instructure.com/109373
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-26 15:27:44 +00:00
Clay Diffrient 679f1cb699 Add length exemption for revert commit messages
This will make it so revert commits can make it through
without needing truncation done on the original commit message

Test Plan:
  - Amend this commit and make the commit message really long
  - Run script/lint_commit_message
  - It will output an error message about length
  - Amend the commit again and put "Revert" at the beginning
    of the subject line.
  - Run the linter again
  - It will not print out the error now

Change-Id: Id2b57e202a0bbd46dbc8de29d9bcc984c9c5fe99
Reviewed-on: https://gerrit.instructure.com/109316
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-21 04:03:36 +00:00
Jon Jensen cf2f1d7510 spec: fix some oversights in re-run changes, refs SD-2387
ensure we pick up the other location style when queueing up reruns
and when deciding not to re-run changed files

test plan:
1. see examples that were rerun in selenium build on PS 2
2. see modified examples that were not rerun in rspec build on PS 2

Change-Id: I31e8f4b8cc0ef8a0cc6cb2d5e8b66d69d1e931c0
Reviewed-on: https://gerrit.instructure.com/109288
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-04-20 22:58:34 +00:00
Jon Jensen 072c71a90b spec: tweak rerun formatting slightly, refs SD-2357
include the line number of the not-rerunnable spec for easier tracking in
janky

test plan:
see intentional failures and rerun behavior in patchset 2

Change-Id: I3c381f94c71dc082a83f0f025794dc135b0336b4
Reviewed-on: https://gerrit.instructure.com/107760
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-04-06 19:40:01 +00:00
Jon Jensen a2e90cb51b ensure canvas_i18nliner uses the right coffeescript
just use whatever canvas uses, so we get the new hotness. also stop using
old jasmine since it brings along coffeescript

also tweak gem_npm stuff so they can have legit devDependencies

Change-Id: I39e3c6b96903dbbc9c4c38a886431d9b6f292616
Reviewed-on: https://gerrit.instructure.com/106476
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-03-27 19:39:24 +00:00
Derek Bender daa519130f remove script/eslint jsx glob
Change-Id: I8a7b72da8a5c6f97ad8c9a5540b3022436c270bc
Reviewed-on: https://gerrit.instructure.com/106463
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-03-27 18:26:38 +00:00
Jon Jensen 3141bcc65a spec: be less aggressive about resetting the test db, refs SD-2289
should speed up local testing a lot, and jenkins a little bit (mainly the
rerun phase right now). in a subsequent test repo commit we'll speed up
jenkins a lot, as we'll do a truncate right after we migrate, which means
the cost will be incurred in the post-merge build and not the patchset
build

* don't double truncate one of the shards
* don't randomize sequences unless an env var is set
* don't truncate unless it looks like we've never truncated
  (there are Accounts)
* remove some unnecessary switchmanning in rspec-queue

[ci verbose]

test plan:
1. run a spec on a freshly created/migrated test db
   1. confirm you see "truncating all tables"
   2. confirm you do not see "randomizing db sequences"
2. run the spec again
   1. confirm you do not see "truncating all tables"
   2. confirm you do not see "randomizing db sequences"
3. run the spec again with RANDOMIZE_SEQUENCES=1
   1. confirm you do not see "truncating all tables"
   2. confirm you see "randomizing db sequences"
4. in jenkins land on the initial run
   1. confirm you see "truncating all tables"
   2. confirm you see "randomizing db sequences"
5. in jenkins land on a rerun
   1. confirm you do not see "truncating all tables"
   2. confirm you see "randomizing db sequences"

Change-Id: Id24026e70afaa35abef4d02249be2c9ba27f1f21
Reviewed-on: https://gerrit.instructure.com/106043
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-03-23 19:36:56 +00:00
Jon Jensen dde8b3ca80 spec: stop linting for webpack topics
Change-Id: I8f3e0755de137a79fba477edeab23bd614e32c4d
Reviewed-on: https://gerrit.instructure.com/105458
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins
2017-03-16 22:48:12 +00:00
Ryan Shaw dae5c1d8ed Use es6 import/export syntax for everything in app/jsx
Closes: CNVS-34602

This makes it so we can use Jest to start testing things
as well as moves us forward to where everything will
use es2015 module syntax.

Webpack can handle import/export syntax natively.

Part of this was done by an automatic conversion tool
by running:
npm install ryankshaw/amd-to-es6
amdtoes6 --dir app/jsx --out app/jsx
but some of it had to be converted by hand since that tool
doesn't handle some es6 stuff like:
`...`, `static` or `import x {y, z} from 'foo'`

Test plan:
* webpack & selenium builds should all pass
* click around a couple pages to make sure things work

Change-Id: Id1b2bd55b4b7f27238754ceee720a77beca1df2b
Reviewed-on: https://gerrit.instructure.com/100536
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-03-16 15:38:39 +00:00
Simon Williams d625f63db2 don't `yarn install` from gems/ in parallel
there seem to be file system access collisions, and they are more
pronounced in the docker build.

test plan: `docker-compose build --no-cache web` should work

Change-Id: Ieeb734745846458eee4e689c3e98c384fe3b1f94
Reviewed-on: https://gerrit.instructure.com/105054
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Omar Khan <okhan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2017-03-14 22:29:24 +00:00
Ryan Shaw 5b88629fe0 Remove RequireJS support
closes: CNVS-31785

test plan:
all builds should pass

Change-Id: I2925934692a3d2f115f1289d7b50cb72d8cb907f
Reviewed-on: https://gerrit.instructure.com/104492
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2017-03-13 22:10:23 +00:00
Jon Jensen 0634e4d86c make xsslint handle import statements
do our own babylon parse and pass the ast into xsslint

test plan:
* use `import` in your jsx
* :cat_dance:

Change-Id: I6ea240e82143f44ea360240ada492e6cbbdaa853
Reviewed-on: https://gerrit.instructure.com/104107
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-03-06 19:29:39 +00:00
Jon Jensen ec1840b502 make xsslint not need js:generate, fixes SD-2160
this does make xsslint about 10x slower, since:
1. babel is slower than acorn
2. we now have to coffeescript everything on the fly

will revisit perf in another commit

Change-Id: I2ddad309d1921ba6a4e15cd79d3d8bd956a7e403
Reviewed-on: https://gerrit.instructure.com/103850
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-03-03 17:24:16 +00:00
Ryan Shaw 05f55c1c30 Deprecate `npm` client. Use `yarn` instead
Closes: CNVS-35152

This changes all our tooling that used `npm` to
Run scripts to use `yarn`. `npm` will still work
for now but if you have yarn installed, it will use
that.

Cheat Sheet:
old command      -> new command
npm install      -> yarn install (or just `yarn`)
npm run webpack  -> yarn run webpack
npm test         -> yarn test
See more at https://yarnpkg.com

Test plan:
* all Jenkins builds should pass
* without yarn installed:
* run script/nuke_node.sh
* it should work and warn you about how `npm` is deprecated
* now install yarn, e.g.: `brew install yarn`
* run script/nuke_node.sh again
* it should work and you should see silly yarn emoji
  in the output and it should be a lot faster

* the docker changes I made should work and docker should
  build correctly and use yarn.

Change-Id: I4aa31eeae3ecc504634a7c72a1ea0d3396f445e3
Reviewed-on: https://gerrit.instructure.com/102969
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-03-01 19:39:01 +00:00
Brad Horrocks bbfe35b108 update variable expanders
Add docs on how to update them
Update everytime we run doc:api

Change-Id: I3c7aa55d051fa5474e267897138ab01c3c7c3fb8
Reviewed-on: https://gerrit.instructure.com/102177
Reviewed-by: Jesse Poulos <jpoulos@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2017-02-27 23:15:19 +00:00
Jon Jensen c1dedb9304 spec: bump test-queue
dedicate more cores to background loading on the initial run ... sometimes
the workers are so fast they block on it

test plan:
see previous patchset w/ verbose output where `waiting time:` for all
workers was <= 1.3sec

Change-Id: I17188a0f5285ac7e8e3f03a0b954b760008246f6
Reviewed-on: https://gerrit.instructure.com/103115
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-02-23 23:58:12 +00:00
Jon Jensen ff8ffd9a14 spec: refactor error page-y stuff, refs SD-1815
reimplement it using formatters. notable changes:

1. the index page has separate sections for "Initial", "Rerun 1", etc.
2. you now get error pages for before(:all) failures
3. you now get error pages for non-selenium failures
4. you now get links to pages for failures prior to the current one
5. in addition to not capturing screenshots/videos on too-many-failures,
   we now stop making error pages if there are too many, so that we don't
   fill up the workspace on mass badness

test plan:
1. see build in repo-who-shall-not-be-named

Change-Id: I54f065f1515f2b639b3f90b471a19e434a17aece
Reviewed-on: https://gerrit.instructure.com/102002
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-02-16 19:48:56 +00:00
Ryan Shaw 84dc36d3e1 handle timezone data loading out-of-band from webpack
fixes:  CNVS-34796

emitting assets for each of these timezones adds a
non-trivial amount of time to the webpack build.
by making it so webpack doesn’t have to do anything
about them, it goes a lot faster since there is just
a lot less work to do.

this commit also uses npm to get `timezone` instead
of a git checkout

test plan:
in requireJS & webpack,
* load a few pages, make sure your timezone data loads
* automated specs should pass

Change-Id: Ice3b7b6d4c7ac53315d5cb238d4213afb9faddc5
Reviewed-on: https://gerrit.instructure.com/101116
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2017-02-10 23:42:48 +00:00
Ryan Shaw ea55fff788 fix xsslint to work with es6 imports
Change-Id: I97fa2ca9cada24d81a9ced7c8fa7d72997092673
Reviewed-on: https://gerrit.instructure.com/100836
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-02-09 23:50:46 +00:00
Nathan Mills 25154ed4ce nuke node so you can compile assets
Change-Id: Ifec01be0eb6534f7d4325c2761ee5a00d76d0dcc
Reviewed-on: https://gerrit.instructure.com/100510
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2017-02-06 19:53:29 +00:00
Jon Jensen 25d639dba1 spec: bump test-queue
* for specs w/ no description:
  * ensure they all run
  * ensure we can use stats for them
* ensure obsolete stuff falls out of .test_queue_stats

Change-Id: I576228f3adf88e4186d39f0a0bcf84b2b56aba8c
Reviewed-on: https://gerrit.instructure.com/100476
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins
2017-01-25 22:41:12 +00:00
Jon Jensen 3beaab5647 spec: bring test-queue rerun logic into canvas
Change-Id: I8b1cc0ed0c019eb67ee8d22df8e5f32b4b74cac2
Reviewed-on: https://gerrit.instructure.com/100475
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-01-25 22:29:41 +00:00
Jon Jensen f9bfcee677 spec: bring test-queue into canvas proper, refs SD-2029
deprecating the test repo, one piece at a time. still using a highly
forked test-queue

test plan:
1. jenkins should be happy

Change-Id: Ie5e5618150703c01e9d279959323e8b87b547552
Reviewed-on: https://gerrit.instructure.com/100344
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-01-24 18:56:52 +00:00
Landon Wilkins cf4a8f61f8 webpack commit msg linter, fixes SD-1860
test plan:
* should get a webpack comment on patchset 1

Change-Id: I3fcd5d22b2c9d1b1480958e0ea134e4fefaee714
Reviewed-on: https://gerrit.instructure.com/99354
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-01-13 02:26:07 +00:00
Landon Wilkins 5480e02eb2 lint: fix linter for eslint
Change-Id: I187bec5bd794d0e4d2469d1135b8552e10105d55
Reviewed-on: https://gerrit.instructure.com/99257
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins
2017-01-10 22:00:27 +00:00
Clay Diffrient fec3811d5c Make eslint avoid the campsite cleanup rule
closes CNVS-34242

This makes dr_diff have an option to avoid checking
lines surrounding changes.  It also sets up eslint
to take advantage of this rule.

Test Plan:
  - Automated Tests Pass
  - Eslint only flags errors on changed lines
    (when run through Gerrit/Jenkins/Gergich or
     via script/eslint)
Change-Id: I900430f21c4c925e8fd87bd62e75b271fa84d08e
Reviewed-on: https://gerrit.instructure.com/99048
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-01-10 20:44:24 +00:00
Landon Wilkins 65744119ca dry up linters
test plan:
* see test commit verifying linters still work

Change-Id: I406c218309e824618869c9b5f3841af8387bf836
Reviewed-on: https://gerrit.instructure.com/98329
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
2017-01-10 19:44:48 +00:00
Landon Wilkins 33bd46e368 compile_assets_dev in canvas_update
Change-Id: I7874114b5f24b7c0e3b94602ab9afd0c3d70911f
Reviewed-on: https://gerrit.instructure.com/98466
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2017-01-06 00:13:46 +00:00
Landon Wilkins 75af98699c use gergich in ruby instead of bash
fixes SD-1938

test plan:
* see that gergich still successfully comments on
  linter output on patchset 1

Change-Id: I3beecfab405e57ba0e8705821d6d297fe7423c3e
Reviewed-on: https://gerrit.instructure.com/98317
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-12-22 01:31:29 +00:00
Clay Diffrient aef1574fce [eslint] Get rid of extra build output
Change-Id: Ida3c34427a305b735ca4c3cb22912bc90a509184
Reviewed-on: https://gerrit.instructure.com/98313
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-12-21 22:33:51 +00:00
Landon Wilkins 16733a68a1 lint: whitelist UTF-8 for commit msg linter
Change-Id: If2a230b33ded44de52bc55cb5dd17622a53960fe
Reviewed-on: https://gerrit.instructure.com/97601
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2016-12-14 19:11:57 +00:00
Clay Diffrient 21f0c8a233 Remove console logging and fix warning
Test Plan:
  - Gergich works with eslint stuffs

Change-Id: Ib2cb7cee87bb6f1eec21433d579a939ff4ba710e
Reviewed-on: https://gerrit.instructure.com/97584
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-12-14 17:47:00 +00:00
Clay Diffrient 4d68ce45b9 Add gergich eslint script
refs CNVS-33837

Test Plan:
  - Run script/eslint
  - It works

Change-Id: I4ab0b5746633a535c85ce79e171a781f07fe9433
Reviewed-on: https://gerrit.instructure.com/97466
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-12-13 22:29:12 +00:00
Ryan Shaw 612637531a fix ie11-polyfill so Promise.all works in IE11
fixes: CNVS-33769

the file we were building with core-js was
not including an array iterator polyfill
so if you were using this polyfill in IE 11
and did `Promise.all([1,2])` it would fail
saying ‘1,2 is not iterable!’

test plan:
in IE11,
load a page in canvas
open the developer tools and type:
Promise.all([1,2]).then(function(o,t){console.log(‘it worked’, o, t)})
it should log:
“it worked 1 2”
and not throw an error

Change-Id: I49a6cd439c151b7703d77a7400856f438937443d
Reviewed-on: https://gerrit.instructure.com/97219
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-12-12 21:31:28 +00:00
Bryan Petty c76a9b6a79 add brakeman scanning for ci
refs: ENGSEC-1

Runs Brakeman security scanning on CI, reporting only on relevant
source changes, and only with Medium confidence for now.

Test Plan:
1. Brakeman runs on Jenkins aux builds.
2. Security warnings are only issued for changed files.

Change-Id: I5ce0d4ff47203a5df31ca30cdcb7e9b0cba32b0a
Reviewed-on: https://gerrit.instructure.com/96775
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2016-12-07 21:22:08 +00:00
Derek Bender e10520fa5a remove defunct scripts
fixes: CNVS-33321

test plan: N/A

Change-Id: Idf4b89314ffb7779c909b3a0ee009361349046c0
Reviewed-on: https://gerrit.instructure.com/95235
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-11-15 17:49:16 +00:00
Brad Horrocks 3c809153d1 docker-compose.yml v2
If you have a docker-compose.override file you'll want to
move it somewhere else.

mv docker-compose.override.yml docker-compose.`whoami`.yml

Once you've updated your override file to the version 2 syntax, you
should add it to the COMPOSE_FILE environment variable. Probably in a
.env file in the project root.

Test plan:

You'll need to remove your existing canvas containers and volumes to 
fully test this.

to do so run this **BEFORE** you checkout this patchset

```
docker-compose down
docker-compose ps -q | docker rm
docker volume ls -q | grep canvaslms | xargs docker volume rm 
```


then you should be able to get up and running using the following

```
cp docker-compose/config/* config/
dc build
dcr web bundle exec rake db:create db:initial_setup
dc up
```

You should be able to access canvas like normal

Change-Id: Ia7ff76cfdd4f46278fc1cb2a03969fdadaa4a434
Reviewed-on: https://gerrit.instructure.com/91008
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2016-11-15 17:06:37 +00:00
Chris Hart 6ea6cf4d2e Make Lato the default Canvas font
Fixes: CNVS-30278

The product design team wants to standardize
on Lato across all Instructure products. See
JIRA for more information.

With this change, we no longer have to use
font-weight: 300 etc to make the right
weight of Helvetica show up. We can go back
to simply using bold and normal, etc.; so
those rules have been updated in this
commit.

Test plan:
to accurately test this you need to set up your
canvas to use a CDN. there is a dev CDN that ops
has set up for us. you put the settings in
config/canvas_cdn.yml. slack ryan if you need help
setting that up or need to know what the values
are to use.
you also need to edit your config/environments/development.rb
file so it look like this:

config.action_controller.perform_caching = true
ENV['USE_OPTIMIZED_JS'] = 'true'

and then when you make any changes you need to run:
bundle exec rake canvas:compile_assets
bundle exec rake canvas:cdn:upload_to_s3
touch tmp/restart.txt

for the changes to be seen

- This change applies only to new UI. Legacy
  should be unchanged.

- Clear cache and cookies first.

- Go to Canvas. On the first page load only
  you should see a slight shifting of the text
  as Canvas loads the Lato font and falls
  back on the Helvetica system font.

- From that point on, Lato should be
  cached in the browser and load instantly
  when you move between views:
  http://screencast.com/t/hZhUZOhH

- Canvas should still work in all supported
  languages and browsers.

Not yet converted:
- TinyMCE textarea fiekd
- Mobile login

Change-Id: I861e609c01824f60ac38d3fc15e5b960a06e44de
Reviewed-on: https://gerrit.instructure.com/85737
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Kyle Follett <kfollett@instructure.com>
2016-11-11 22:09:26 +00:00
Jon Jensen fad7b8450d fix xsslint performance, fixes SD-1725
symlink into node_modules makes globby sad, so give it an explicit list
of files and directories

this is the workaround suggested in https://github.com/jenseng/globby-js/issues/2

Change-Id: Ic9fc04b1bedb4e28e38c5eea0a2f1b127e3b5e2f
Reviewed-on: https://gerrit.instructure.com/94371
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-11-04 01:06:00 +00:00
Cody Cutrer bd0792d40b convert tail_kinesis to aws sdk v2
Change-Id: Ia95ea52e094602137b5b591c7635852c70b35372
Reviewed-on: https://gerrit.instructure.com/93023
QA-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Eric Coan <ecoan@instructure.com>
2016-10-26 15:21:14 +00:00
Landon Wilkins 5cf57c5d14 fix stylelint, refs SD-1603
test plan:
* add an invalid hex code to a css file
  ex: app/stylesheets/pages/_rubrics.scss
  color: #YARRRRRRRR
* save the file
* `script/stylelint`
* verify you see an error for this hex code

Change-Id: Iee7a0bbdae032761a7e0f1c91f2d99d469c1cb3d
Reviewed-on: https://gerrit.instructure.com/93575
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2016-10-25 18:08:23 +00:00
Landon Wilkins 903c9a0a66 stylelint, refs SD-1603
test plan:
* add an invalid hex code to a scss file
  e.g. _variables.scss:
  color: #YARRRRRRRR
* run stylelint with: `script/stylelint`
* verify the colored output only returns your introduced error

Change-Id: Ia4f2adef3635f34154d50d61249b952a380208bf
Reviewed-on: https://gerrit.instructure.com/92229
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2016-10-25 00:21:16 +00:00
Ryan Shaw 8c0c20696a run gem_npm tasks concurrently
npm installing for some gem should not be affected
by npm installing for another gem. so by doing them concurrently,
we can speed up the build process.

test plan:
* run `npm install`
* it should be faster because the npm modules for 
  canvas_i18nliner and selenimum install at the same time
  instead of one after the other


Change-Id: I73d18db0fd3473e929ac1abff25206a929ab3a45
Reviewed-on: https://gerrit.instructure.com/84599
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-10-24 18:20:08 +00:00
Landon Wilkins e2f918a8fd update tatl_tael's user_config location
this portion of rubocop-canvas has been ported to dr_diff

Change-Id: I651b6a012dee93935f23358024dccd8e0df62694
Reviewed-on: https://gerrit.instructure.com/93001
Tested-by: Jenkins
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
2016-10-18 21:27:59 +00:00
Landon Wilkins 8500ac5cb9 incremental linting via dr diff, fixes SD-1521
test plan:
* verify rubocop still comments on canvas-lms errors
-- add "sleep 1" to a controller
-- `./script/rlint`
-- verify you see an error about sleeping
* verify rubocop still comments on plugin errors
-- add "sleep 1" to a plugin
-- run rlint on the plugin
   `./script/rlint --plugin custom_reports`
-- verify you see an error about sleeping

Change-Id: Id0df56c3adfcb6b673a0400e9f714ae22b78242c
Reviewed-on: https://gerrit.instructure.com/90657
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2016-09-22 20:06:57 +00:00
Ryan Shaw b9229e1abf fix so ie11 polyfill works in webpack land
fixes: CNVS-31887

test plan:
* using both webpack and requireJS:
* in ie11, load a page in canvas
* open the IE developer console
* type: Promise.resolve().then(function(){console.log('it works')})
* it should log 'it works' to the console

Change-Id: Ib76c39a5397ca2f28280ca5c108605c63266b38b
Reviewed-on: https://gerrit.instructure.com/90270
Tested-by: Jenkins
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-09-22 16:44:40 +00:00
Ryan Shaw 96d4ee9af5 polyfill Promise & a few other methods for ie11
closes: CNVS-31621

every other browser supports these features.
this will just make it so we can count on things
like Promise, Object.assign, [].includes etc  (see
FEATURES_TO_POLYFILL at the top of
script/make-ie11-shim.js for full list)

what do people think of this? what do you think of the
approach, I don't want to include a polyfill in the
common bundle and force every other browser to download
this stuff they aren't going to need. but I still want
it to be performant as possible for those using ie11

Is there anything else people think we should polyfill?
the one I thought of is window.fetch, what do others
think about that?

test plan:
* in ie11, load a page in canvas
* open the IE developer console
* type: Promise.resolve().then(function(){console.log('it works')})
* it should log 'it works' to the console
* (that already works in other browsers, but you can
  check to make sure that it still does there too)

Change-Id: Ie9c99a59631a13535903174a5e575427dbfeac4f
Reviewed-on: https://gerrit.instructure.com/89626
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-09-12 19:09:48 +00:00
Ryan Shaw 61fac3281d fix missing quotes in rubocop message
Change-Id: I8940ce1091e8498d4d3e96dc379dada6c88fa8db
Reviewed-on: https://gerrit.instructure.com/89218
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-09-07 15:46:49 +00:00
Ryan Shaw cd03c7f8b6 Add helpful gergich suggestion about ERB warning
Change-Id: Id158bac164b3fdb989ed27faef085f4600ccabf6
Reviewed-on: https://gerrit.instructure.com/88425
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins
2016-08-22 20:47:31 +00:00
Jon Jensen ef8d56076a avoid duplicate chdir, fixes SD-1442
test plan:
1. lint_commit_message should run and pass on this commit
2. it should lint a plugin commit if you set GERGICH_GIT_PATH and
   GERRIT_REFSPEC and not blow up on linting failures

Change-Id: I7349eb0885038ac11660b95a7e528735048be2bc
Reviewed-on: https://gerrit.instructure.com/88104
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-08-18 15:58:27 +00:00
Ryan Shaw a22aec3be0 update gglobby npm dep
refs: CNVS-29725

test plan:
* run `node script/xsslint.js` 
* it should work
(this is ran by jenkins so reall if it passes, it is good)

Change-Id: Ib9b68e486c32c91e3c430cea095a628daf51db2b
Reviewed-on: https://gerrit.instructure.com/87181
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-08-09 20:19:03 +00:00
Landon Wilkins 31e90c0ce6 allow jsx tests for coffee changes, fixes SD-1261
test plan:
* test commit

Change-Id: I9e3da787a56467c886d1e70f107b3abb916c6d1e
Reviewed-on: https://gerrit.instructure.com/82842
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2016-06-17 17:28:43 +00:00
Cody Cutrer 5f870d7f85 use correct class for delayed jobs CLI
Change-Id: I27faf1de0538f0d8907935ab105a2acc4c56a3df
Reviewed-on: https://gerrit.instructure.com/81897
Tested-by: Jenkins
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-06-08 16:33:41 +00:00
James Williams 0622fb51e9 enhance tatl_tael user experience
Change-Id: I793ce5d14a3da5ff153fc60ad52f2d567bdc2137
Reviewed-on: https://gerrit.instructure.com/81017
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-06-01 12:52:29 +00:00
Landon Wilkins 216ab2181f improve tatl_tael for public/javascripts changes, fixes SD-1196
test plan:
* test commit

Change-Id: Iba8695913f05876dc076e2bb7b1e6d0584ad0710
Reviewed-on: https://gerrit.instructure.com/80944
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2016-05-27 23:36:27 +00:00
Landon Wilkins 9244598c91 make tatl_tael lint on Lint-Review, fixes SD-1176
test plan:
* test commit

Change-Id: I834581ac16c7ccaee07e1c5e02aff74da1ad30c2
Reviewed-on: https://gerrit.instructure.com/80518
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2016-05-24 20:11:14 +00:00
Landon Wilkins c332022162 tatl_tael suggest type of spec, fixes SD-1080
test plan
* test commit

Change-Id: I09e55588027cd609d00e5066c6de04f1c2018a25
Reviewed-on: https://gerrit.instructure.com/79692
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-05-23 20:38:20 +00:00
Landon Wilkins b7f3541edf tatl_tael linter ignore wips, fixes SD-1094
test plan:
* see test commit

Change-Id: I63d6df91bc4636f9cfd91fca6bcb8ec33d2776f1
Reviewed-on: https://gerrit.instructure.com/79020
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2016-05-13 16:26:20 +00:00
Brad Horrocks f51cefcc67 Better LTI Variable Substitution Docs
Generate LTI Variable Substitution Docs from the code
Uses YARD's plugin hooks to generate the markdown.

I couldn't find a good way to do this with YARDs builtin generation
stuff. So I hacked together. No pretty, but gets the job done.

You can update the generated markdown by running this
```
script/generate_lti_variable_subustition_markdown
```

Our yard templates, dont process markdown files like YARD is supposed
to.i Not sure why? 🤷

Fixes https://github.com/instructure/canvas-lms/issues/592

Change-Id: If0728d357dc745d81381e818ed62d087d76f0e66
Reviewed-on: https://gerrit.instructure.com/74312
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2016-05-02 19:15:46 +00:00
Landon Wilkins 6e4838856e lint: discourage new .erb files, fixes SD-871
test plan:
* specs
* see test commit

Change-Id: Ia8084890312b674cc30a60077e9b2643d769cd4b
Reviewed-on: https://gerrit.instructure.com/78425
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-05-02 16:16:53 +00:00
Landon Wilkins 9dc6299c38 lint: encourage specs, fixes SD-1024
test plan:
- change a file w/ a path that matches:
/(app|lib|public)\/.*\.(coffee|js|jsx|html|erb|rb)$/
but not:
/(bower|mediaelement|shims|vendor)\//
- ./script/tatl_tael
- verify you see:
  [error] => Your commit does not include specs. Please add some to
             verify your changes.

Change-Id: I725daf72c14180bb29c440f9867244a43dc5169d
Reviewed-on: https://gerrit.instructure.com/77579
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-05-02 16:16:44 +00:00
Cody Cutrer 21561f5180 don't whine about no ticket when it's a github issue
Change-Id: I2b73964c64ece3b98a1809771402c53ea21e7621
Reviewed-on: https://gerrit.instructure.com/75653
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-03-29 20:43:26 +00:00
Jon Jensen b3e0fc8309 tighten up commit message linting
in spite of the only_report_errors list, this should be something everyone
can agree on

test plan:
* spec-only commits and commit messages should be linted whether or not the
  commiter is in the only_report_errors list

Change-Id: I077173db60f9f537d14f66b7acd396823e10a395
Reviewed-on: https://gerrit.instructure.com/65830
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-03-29 19:29:11 +00:00
Brad Horrocks d32b139459 Helper scripts for setting up docker
Change-Id: I9a4916e4e41d7405775cfde79688598be596e9fd
Reviewed-on: https://gerrit.instructure.com/71750
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
QA-Review: Brad Horrocks <bhorrocks@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2016-02-11 23:17:00 +00:00
Jon Jensen 556a0d13d9 fix commit message linting for plugins
test plan:
1. set GERGICH_GIT_PATH to a valid plugin gem path
2. script/lint_commit_message should lint according to the plugin's HEAD,
   not canvas-lms'

Change-Id: I0976c39ca8278d8241c37ed464b24fcdf7cd9e58
Reviewed-on: https://gerrit.instructure.com/71928
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-02-10 19:31:55 +00:00
Cody Cutrer 1b7ce8aacb don't include plugin dir in gergich output sent to jenkins
it's useful locally, but causes mismatches for Jenkins

Change-Id: I2606b1a0d15bafc5f6f9ad90735d4207dcc8bddf
Reviewed-on: https://gerrit.instructure.com/70502
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-18 22:08:19 +00:00
Cody Cutrer 29e65e1723 spec: don't choke on non-existent plugin
Change-Id: Id5913bb605daa8fb223d6fd7e268027efc473e8f
Reviewed-on: https://gerrit.instructure.com/70504
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-18 22:07:10 +00:00
Cody Cutrer 86ee3aaae2 enable rubocop for plugins
locally, pass `--plugin PLUGIN` to script/rlint

Change-Id: Ib5944c25ef25c2142340e40ceda5ff24948b05c2
Reviewed-on: https://gerrit.instructure.com/70470
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-18 18:11:29 +00:00
Cody Cutrer fb8d78584a switch to Syck earlier in the boot process
particularly, before canvas-jobs loads

Change-Id: Ib80215bd971bad2b4ba53aa8ac65301becf4b572
Reviewed-on: https://gerrit.instructure.com/69244
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
2015-12-19 01:40:06 +00:00
Jon Jensen ee57027349 looser test plan check
test-plan:
* put an unnecessary hyphen there ^
* gergich should not complain

Change-Id: Id092e5e9430bd6d7cb95b3f583f3bd1a5b1e82b3
Reviewed-on: https://gerrit.instructure.com/65749
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2015-10-26 20:42:44 +00:00
James Williams 9fab373292 extend gergich opt-out to lint_commit_message
sorry, not sorry; it's better than cloak'n'daggering

Change-Id: I641167cb402a616601e9c95499bec474947f4c66
Reviewed-on: https://gerrit.instructure.com/65719
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-10-23 15:29:19 +00:00
Jon Jensen 5d5af5827d allow # prefix for tickets
the # is not necessary, but now you won't get misleading linter messages
if you do one, e.g. refs #PROJ-123

test plan:
1. the linter should not complain about this commit message

Change-Id: I3eb9e5de093a5b8948c2892bd3ecdec8c3ea4add
Reviewed-on: https://gerrit.instructure.com/65225
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2015-10-15 17:10:24 +00:00
Jon Jensen b57ee36b1f make linter match jira_ref_parser behavior
now you can have a colon between refs and the ticket, e.g.
refs: FAKE-123

test plan:
1. this commit message should pass the linter (even though that's not a
   real ticket)

Change-Id: I32776d59c3ee2d7935c20caba759e0bd0b2596e9
Reviewed-on: https://gerrit.instructure.com/65208
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2015-10-15 14:53:55 +00:00
Jon Jensen 3c022771b0 selinimum: the saga continues
Now with full js/jsx/coffee/hbs/scss goodness \o/

If your commit ONLY touches js/jsx/coffee/hbs/scss/views/controllers or
specific whitelisted things, and doesn't touch global-y bundles or
layouts, then your commit may** be selinimized. That means it will only
run the selenium specs that care about those files.

If you touch lib, or gems, or models, or any global-y stuff, all the specs
will still run.

Also add the ability to override what we selinimize against when testing
changes to selinimum.

**Note that actual selinimization depends on a post-merge build having
succeeded for the parent (or a near ancestor). If the post-merge build
failed, or your build starts before it finishes, or there are
unselinimizable changes between your commit and the nearest ancestor with
selinimum stats, then your commit will not be selinimized :'(

See 4a83f6b6 for the full story.

Test Plan:
* Specs should pass on this commit
* It should not be selinimized because we touch package.json
* See dependent test commits where selinimization happens

Change-Id: I62c78c316876aaff07514a0f460ff4d608dac494
Reviewed-on: https://gerrit.instructure.com/65082
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2015-10-14 18:58:49 +00:00
Jon Jensen 6a3c12b883 add a commit message linter
ruby port of the useful pieces of bridge's bash linter

test plan:
1. run it on this commit
2. it should complain that there is no ticket :P
3. feed it a commit message via stdin, e.g.
   `echo -e "yay\n\na commit"|script/lint_commit_message --stdin`
4. confirm it behaves sensibly

Change-Id: I6bdd6db53e178c4d5d7372aafba47b60c4b9f076
Reviewed-on: https://gerrit.instructure.com/65124
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2015-10-14 18:58:19 +00:00
Ryan Shaw 8a5cb75d66 fix script/canvas_update to work with brandable_css
we no longer use `npm run compile-sass` to do css.

also, css must happen before handlebars.

besides, all the js, css, styleguide and docs stuff
is handled by rake canvas:compile_assets already.
and in a way that whatever can run concurrently, 
will. 
(although, admittedly, the syntax to pass arguments 
to a rake task, e.g.: [0,0,1,0] is pretty lame)

Change-Id: I83c8ceb21b476456f47f3ec37d4ba6088ca68088
Reviewed-on: https://gerrit.instructure.com/57768
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2015-07-07 20:41:28 +00:00
Ryan Shaw 84a7192a36 A new way of doing css/sass & New Canvas Theme Editor
what this does:
* Changes the way we generate css so we are able to generate custom
  css for people that use the theme editor.
* Sets everything up so we can push all of our static assets
  (js, fonts, css, images, etc) to s3 pre-deploy and serve them
  from cloudfront. Yay! faster canvas for everyone!
* as part of that, this enables the rails asset pipeline just so we
  can use it to put md5s in our urls.  we don't use it for any of the
  coffeescript/sass/sprockets transformer stuff.
* adds a new "Theme editor" functionality (only for people that have
  have the use-new-styles feature flag turned on) where an admin for
  an account can pick their own colors/images for all the users
  at their account/school.
* when the user is done saving things in theme editor, it will,
  in a delayed job, generate all the css with against the variables
  that user specified and push it to s3 so it will be available to
  anyone else that requests it.  (the delayed job will shell
  out to a node.js executable called `brandable_css`).
* ability to pick an existing shared theme and to reset to
  blank theme. closes: CNVS-19685
* gets rid of jammit.

test plan:
(this is exaustive, so not every person has to do every step
but we should make sure at least someone does each of these things.
maybe as part of the review add a comment if you have done one of these
bulletpoints)

* before you check this out, compile all css and copy the
  public/stylsheets_compiled directory somewhere. after you check out
  this code and regenerate all the css. make sure there are no
  significant changes to the css output. (we updated the versions of
  node-sass and autoprefixer that we use so we want to make sure they
  don't change things in a way we weren't expecting)

* make sure the way we load css for handlebars templates still works.
  eg: if there is a handlebars template at
  app/views/jst/some/template.handlebars
  if there is also a scss file at
  app/stylesheets/jst/some/template.scss
  then that stylesheet should get loaded when that template is rendered

* check out the code and run migrations. browse around canvas,
  make sure css and js files load correctly as before.

* cody, jacob, or someone on queso: look at the db migrations and
  make sure everything looks good and that I am handling sharding
  correctly.
* verify that both rake canvas:compile_assets and guard, works as well
  as `node_modules/.bin/brandable_css` (note: if you have
  "node_modules/.bin" in your PATH (which you should), it will also
  work with just `brandable_css`)

* verify that passing the --watch option to
  `.bin/node_modules/brandable_css` works and picks up changes to
  sass files, images, fonts, or any other resource that goes into
  a css file. and that it only recompiles the css files that actually
  depend on that file.

* go to https://github.com/ryankshaw/brandable_css and check out the
  code there. that is what is actually doing the sass compiling

* create a config/canvas_cdn.yml file and add aws access creds and
  an s3 bucket and cdn hostname (for testing, you can use the credentials
  for instructure_uploads_engineering from
  https://gollum.instructure.com/OtherServiceTestAccounts ). for a test
  cdn hostname you can use https://diu0rq5m1weh1.cloudfront.net. that
  is a cloudfront bucket I set up on my personal account that points to
  instructure_uploads_engineering

* run rake canvas:compile_assets again, this time, at the end, you
  should see it run the assets:precompile task that puts md5s in filenames
  and, gzipps them, and copys them to public/assets.
  then you should see it run canvas:cdn:upload_to_s3
  (look at log/development.log for progress),
  which pushes everything to s3.
  closes: CNVS-17333 CNVS-17430 CNVS-17337

* try out the theme editor: turn on new styles, go to accounts/x
  (where x is the @domain root acount you are testing from) and click
  the "theme editor" button on the right side of the page.
  that should take you to a page that has the ability to pick colors/images
  on the left side and preview your changes in an iframe on the right
  closes: CNVS-19360 CNVS-20551

* test the "preview", "save", "reset", and "choose existing" functionality
  closes: CNVS-17339 CNVS-17338 CNVS-19685

* make sure that the themeeditor works both if you have
  config/canvas_cdn.yml set up and enabled as well as if you don't.
  if it is enabled, you should see it push the css for just that new
  brand config to s3 when you hit preview, and the css
  should be accessible from the cdn you configured.

Change-Id: Ie0a812d04f5eeb40e7df7e71941ff63ea51a4d22
Reviewed-on: https://gerrit.instructure.com/53873
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2015-07-02 22:42:18 +00:00
Ryan Taylor 42bbe4c7f3 Remove migration_lint
Change-Id: Icccf89cb2aec1961d6f4967bad9f25068c0d5126
Reviewed-on: https://gerrit.instructure.com/53297
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
2015-05-04 15:28:34 +00:00
Cody Cutrer a623afaa38 gergich tweaks
* pass additional arguments to script/rlint --heavy -- --additional-args
 * disable a rails cop
 * lower style cop to info severity

Change-Id: I5cbc94bfc503ae48c635ccb77f66b60f564e1b08
Reviewed-on: https://gerrit.instructure.com/52867
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-04-27 18:18:34 +00:00
Ethan Vizitei 7a07985ba1 Don't let rlint bail on files that don't exist anymore
also start moving the more complicated logic
from the rlint script into tested helper
classes

Change-Id: I5c3916b0c7e695389b552dc1a6b4353aaaeba290
Reviewed-on: https://gerrit.instructure.com/52743
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-04-23 19:08:19 +00:00
Ethan Vizitei 937244a8e9 skip comment building on diff if no ruby changes
Change-Id: Idcf6a213ea05f016d646829561aed3dd8baef95e
Reviewed-on: https://gerrit.instructure.com/52309
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
2015-04-15 21:20:51 +00:00
Ethan Vizitei 6c77127375 don't rubocop everything if there are no ruby changes
Change-Id: I5807e19353cce8374796f4ff97814821bf95b248
Reviewed-on: https://gerrit.instructure.com/52271
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
2015-04-15 20:39:21 +00:00
Ethan Vizitei e9e659d990 add boyscout mode for rlint
also back off the hash syntax rule

Change-Id: Ib5daec82b013cb5ca3abeec7705f3838cc438d06
Reviewed-on: https://gerrit.instructure.com/52023
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
2015-04-11 15:13:26 +00:00
Ethan Vizitei 1329e71c53 colorize rlint output
Change-Id: I357a15e38c454991efd556491cd8f047a07f701a
Reviewed-on: https://gerrit.instructure.com/52008
Reviewed-by: Braden Anderson <braden@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
QA-Review: Braden Anderson <braden@instructure.com>
Tested-by: Jenkins
2015-04-10 20:13:36 +00:00
Ethan Vizitei 13f8256e92 add heavy mode and INFO on only touched lines
lets rlint only run with local changeset unless you specify "--heavy"

Also checks for whether you actually touched a line
or not before deciding an INFO comment is relevant

Change-Id: I4a960c72644dfc46aca7a51d04321711cef0850c
Reviewed-on: https://gerrit.instructure.com/51992
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
2015-04-10 16:59:07 +00:00
Ethan Vizitei f8e4b93f37 make script/rlint faster
on jenkins this was taking up to 9 minutes.

By removing the file I/O and batching
the georgich commits, this ran locally on my
sentry patch set in 15 seconds.

Change-Id: I23b0df9b9396829de4b8ff084f4f92df6e698da2
Reviewed-on: https://gerrit.instructure.com/51987
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-04-10 16:53:19 +00:00