Commit Graph

112 Commits

Author SHA1 Message Date
Cody Cutrer 1cf722a6bc ignore if someone decides to bundle cache
Change-Id: I056942c6d24a97c0c942829de45c599d8b701321
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265687
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-05-27 16:20:08 +00:00
Jacob Burroughs da025a9773 Make the login page load on rails 6.1
Change-Id: Ifaf6e66ab3c56d66f7f5cbe28f85bfc187d15be3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265769
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-05-26 18:01:15 +00:00
Ahmad Amireh fd8a4aebd8 remove plugin symlinks
fixes FOO-1824
flag = none

[pin-commit-analytics=7f2f049830a11e43f4a5d0031e3c4ecc3145ccdb]
[pin-commit-instructure_misc_plugin=9b505159130c0724ce6bcbb75d07d40ff16a1961]

read directly from gems/plugins/* instead of symlinks

- dropped dead brandable_css config property "all_sass_files"
- webpack test runner now generates a file that runs all plugin spec
  files (from spec_canvas/coffeescripts)

test plan: you can remove your symlinks and still survive!

Change-Id: I0206c2d827aa9f59b0374b21f0863443dff3be0f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262346
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2021-05-20 17:21:08 +00:00
James Butters e38b3a49be add support for mutagen setup and update.
flag = none
closes: DE-529

Test Plan:
Test All On Linux and Mac
-docker_dev_setup without mutagen
  -test with dinghy not created, down, missing
-docker_dev_setup with mutagen
  -with docker desktop not running
  -with and without dory
-docker_dev_update with and without mutagen
  -with update-code option and without
-update_canvas for local is not broken
-following Next Steps, all works for mutagen

Change-Id: I7690dc2d919cf1b9d8af86200ec8439da9135d16
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262293
QA-Review: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2021-04-27 19:46:36 +00:00
Evan Battaglia 55dd0b3d79 Revert "MicrosoftSync: move creds from vault to consul"
This reverts commit 8704d83a37.

Reason for revert: Vault is not ready for prime time

Change-Id: I37c41be5345aa2ee362df4e7831cf64d2729668d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261952
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-04-13 22:02:14 +00:00
Evan Battaglia 8704d83a37 MicrosoftSync: move creds from vault to consul
Test plan:
- From a rails console, run:
  MicrosoftSync::GraphService.new('ourtenant').list_education_classes
- There should be an error telling you where to put the creds
- Follow the instructions, hopefully they are self-explanatory.
- Run again and and the education classes should be listed

Change-Id: I4a8cf6f788178345bac375b8be6aa31b04bc4a24
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262423
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-04-07 21:06:51 +00:00
Jacob Burroughs 088cbb4cd5 Introduce release notes data model
Single dynamo table for all release notes data.  Should support active-record
style patterns (mostly) for CRUD operations, plus querying the latest N visible
records by role and environment.  Also supports paginated listing of *all* notes
for administrative purposes

fixes FOO-1752

Change-Id: Ic1e7e204e93e263479a738af18daf312c801269c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261548
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2021-04-05 16:09:59 +00:00
August Thornton 9d2ff22e1b don't exclude /gems/plugins/ and implicitly everything under it
refs DE-496
flag = none

The pattern dir/ excludes a directory named dir and (implicitly)
everything under it. With dir/, Git will never look at anything
under dir, and thus will never apply any of the “un-exclude”
patterns to anything under dir.

The pattern dir/* says nothing about dir itself; it just excludes
everything under dir. With dir/*, Git will process the direct
contents of dir, giving other patterns a chance to “un-exclude”
some bit of the content (!dir/sub/).

Test plan:
 • Adding a new file under /gems/plugins/account_reports/
   gets picked up by Git version control as an unstaged change

Change-Id: I5e2e04426f224032301594237a67887e005b1285
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259440
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2021-02-24 23:39:40 +00:00
James Butters cd0a7e1781 create rebase_canvas_and_plugin script
create rebase_canvas_and_plugin script to improve how we handle
rebasing code, and extract to a standalone script.

closes: DE-496
flag = none

Test Plan:
-Jenskins passes
-Run script, no options, no uncommitted changes, no merge conflicts
  -script rebases canvas and all git plugins
-Run script with skip-canvas
  -script does not rebase or stash canvas
  -successfully rebases all git plugins
-Run script with skip-plugins
  -script rebases canvas
  -no plugins get rebased or stashed
-Run script with 'skip-plugins <name-of-plugin>'
  -script rebases canvas
  -script will rebase git plugins except for the one listed
-Run script with uncommitted changes to one or more repos
  -script will prompt to stash changes and list the repos needing stash
  -Allow script to stash
    -script will stash then rebase those repos
  -Do not allow script to stash
    -script will exit with message saying to stash then re-run script
-Run script with merge conflicts with master on any repo
  -script will fail to rebase that repo, but continue to rebase all other
   repos.
  -Ending message will inform of failed rebase and which repo

Change-Id: Id6a6efafc38f6363e853ccda1264d39cc070cf52
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258351
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2021-02-17 18:31:41 +00:00
Ahmad Amireh 46f8efd61f modernize canvas_quizzes
fixes FOO-1409
flag  = none

no more client_apps, canvas_quizzes now lives as part of canvas-lms
proper inside app/jsx/, which makes the build leaner and leaves us with
one less thing to reason about

logical changes:

- converted from AMD to ES modules
- upgraded to recent react + react-router
- dropped RSVP in favor of native Promises
- used CanvasModal instead of home-grown Dialog
- removed dead code; notifications in particular were fishy as there had
  no dependents at all and did not even show up in the graph
- ported tests to Jest, added more unit ones and two integration ones
- removed "config.onError" and now throws errors where appropriate
- disabled console statements in non-dev

:: test plan ::

- create a (old-school) quiz containing all types of questions
- as 3 distinct students, take the quiz and try to randomize your
  answers

at this point it's helpful to have a reference to compare the screens; I
replicated the quiz on my production sandbox for this

- go to /courses/:id/quizzes/:id/submissions/:id/log
  - verify it looks OK
  - click on a specific question in the stream and verify the question
    inspector widget works OK
  - go back to stream and push "View table"
  - verify the table and its controls are OK

- go to /courses/:id/quizzes/:id/statistics
  - verify it looks OK
  - click on ? in the discrimination index chart and verify it displays
    a dialog with help content
  - click on "X respondents" in one of the charts and verify it displays
    a dialog with the respondent names
  - verify the interactive charts do interact as expected (no logic
    changed here so just a quick glance)
  - link to "View in SpeedGrader" for essay-like questions works

Change-Id: I79af5ff4f1479503b5e2528b613255dde5bc45d3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256118
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2021-01-14 22:45:10 +00:00
Jeffrey Johnson 408999d667 Introduce Storybook to Canvas + i18N Canvas Inbox fixes VICE-947
This story contains work to move Canvas Inbox and Storybook to `app/jsx` inside our Monolith. Storybook should now be enabled for all of `app/jsx` and works with our existing I18n code after updating webpack to load translations correctly.

Test Plan
1. Install node modules with `yarn`
2. At Canvas-LMS root, run `yarn storybook`
3. Storybook should open, test that Canvas Inbox components work as expected

Change-Id: Iccd2b103164a2da4e37b5746f4d9d2b5faf5f29d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253024
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
2020-12-02 18:44:09 +00:00
Aaron Ogata 468671bd10 remove need for api_scope_mapper.rb to be committed
refs DE-362

Change-Id: I222120ad51421fa690c053d9c06a5ef0642f2c5b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252033
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-11-06 17:50:59 +00:00
Chrystal Langston c1a991177a Added Improved Outcomes Management feature flag
closes OUT-3977
flag=improved_outcomes_management

test-plan:
- qa-cr

Change-Id: I2ed788cb735d1cf063110a5f3a1684d9bcf01061
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250777
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Evan Francis <efrancis@instructure.com>
Reviewed-by: Pablo Gomez <pablo.gomez@instructure.com>
Reviewed-by: Brian Watson <bwatson@instructure.com>
Product-Review: Jody Sailor
QA-Review: Brian Watson <bwatson@instructure.com>
2020-10-23 21:46:47 +00:00
Aaron Ogata df07c10075 only build api docs for post-merge build
refs DE-324

Some tests require lib/api_scope_mapper.rb to be generated by the doc:api task, and this is a slow operation that all builds run before starting tests. Generated changes to this file are relatively rare, so let’s require developers to commit their changes to it to save time on all builds. In addition, install a linter to verify that matching changes are pushed.

[change-merged]
[build-registry-path=jenkins/canvas-lms/evaluate-webpack-docs]

Change-Id: Iaa6ebb1ba8cbb008191f6bee14b3bf2f413168e7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250801
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
2020-10-22 18:24:05 +00:00
Derek Bender a09f6902ed Alpine canvas-lms based image
Drop-in replacement for existing Dockerfile

Closes: CCI-391

Change-Id: I9d21a74d72013be854631b2f77880eb0c47fded2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236853
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-07-15 17:21:56 +00:00
James Butters bf5a8f5a2a use parallel_tests for more parallelization
Using the parallel_tests gem allows us to parallelize more
and a bit simpler. Removes headless stuff now that we don't
use it anymore, comments out video recording code since it
doesn't work, removes all knapsack code.

flag = none
Test Plan:
Jenkins rspec and selenium builds pass
rspec and selenium builds copy results to html publisher
rspec and selenium have nodes split into processes

Change-Id: Ibd00eba77f8193be5eadd41aef1e0617c9ae470c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227677
Reviewed-by: Jacob Powell <spowell@instructure.com>
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-03-30 21:38:47 +00:00
KC Naegle f405bf200c Revert "Generate app/jsx/fragmentTypes.json on demand"
This reverts commit 70db0fda72.

Reason for revert: <INSERT REASONING HERE>

Change-Id: If59cd2a1e4eeff9fec177715788a9fa0c31ec7b6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224704
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-02-13 21:23:38 +00:00
Landon Gilbert-Bland 70db0fda72 Generate app/jsx/fragmentTypes.json on demand
Test Plan:
  - Jenkins passes

fixes USERS-243

flag = none

Change-Id: Ie047faf8ce1219b1cb0162c9382ef545068e8c70
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224951
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Landon Gilbert-Bland <lbland@instructure.com>
2020-02-03 19:15:47 +00:00
Landon Gilbert-Bland f45ab202a3 Generate schema.graphql on demand
This will fix some issues with jenkins builds failing if the
patchset is behind some newer graphql changes, as well as allowing
us to include content defined in our plugins in the graphql.schema
file.

Test Plan:
  - Jenkins passes

fixes USERS-210

flag = none

Change-Id: Ic44849ee57955e0b90395661a66f6d5840a38e87
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222029
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Steve Shepherd <sshepherd@instructure.com>
Product-Review: Landon Gilbert-Bland <lbland@instructure.com>
2020-01-06 21:12:42 +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
James Williams 2768dda033 use knapsack in new jenkins rspec build
closes #CORE-3292 #CORE-3293

Change-Id: Id54c8568bd1ca45929f35926e0eebdd558e68a58
Reviewed-on: https://gerrit.instructure.com/207602
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
2019-09-13 15:19:34 +00:00
Cody Cutrer 4f267c41b9 various rails 6 fixes
Change-Id: I9a2da0fe619170e6a297ad5d1b9dd3e11daf3782
Reviewed-on: https://gerrit.instructure.com/206054
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-08-21 19:47:32 +00:00
Steven Burnett 1f7bf02c4d add canvas media package
fixes COMMS-2290
flag Assignments 2

Test Plan:
- create a media upload assignment
- in a2 as a sutdent go submit an assignment
- notice a video upload button
- click button
- notice the modal is shown and you can drag and drop video files
  or record yourself
- close modal
- notice no console errors or crashes

Change-Id: I9a6184efb99aa05d0d634d2744cca00abf5ae26e
Reviewed-on: https://gerrit.instructure.com/204375
Tested-by: Jenkins
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
2019-08-13 20:17:06 +00:00
Jeremy Neander 95247e5f80 allow packages to commit lib files
test plan:
 * Verify Jenkins passes

Change-Id: Ic809a1e456a3d326a3cb115a7743e40109b1022f
Reviewed-on: https://gerrit.instructure.com/200808
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
2019-07-17 15:27:09 +00:00
Steven Burnett cd3e069919 print canvas-rce errors in linter-js
Change-Id: I95410a3d5fc02fe0d0ad1e16180110d6a7dd32cc
Reviewed-on: https://gerrit.instructure.com/194947
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2019-05-23 19:41:26 +00:00
Ryan Shaw 50cb8d8388 Fetch things sooner on the dashboard
closes: CORE-2904 CORE-2905 CORE-2906

This will send the XHR requests for the dashcards and for all the stuff
in the planner dashboard sooner. As in, as soon as the html document 
comes back from the server, instead of waiting until all the js bundles
have downloaded and executed. This should remove a round-trip from
the dashboard page and you should notice the planner and dashcard
dashboards complete loading a lot faster. By sending the requests
sooner, our app servers can work on them while the browser is 
downloading all the rest of the JS that it needs to run the page. And 
by having our app servers work on that at the same time the browser 
works on the JS, the entire page will complete loading faster.

Test plan:
* go to the planner dashboard
* you should see 4 requests with the type “fetch” in the network panel
  in the waterfall right at the same time the html document is returned
* you should not see any more XHRs sent from axios on page load for the
  planner dashboard (it should use the prefetched ones)
* in a prod environment, where you have multiple app server processes
  handling requests, the planner dashboard should complete loading a lot
  faster

* In that same prod like environment, go to the dashcard dashboard
* same thing, it should issue a “fetch” request right with the html
  document comes back from the server and not issue an second
  XHR once the JS is loaded.
* it should be complete loading significantly faster too.


Change-Id: I0503c1a4d913fd1baa4dad22b9a88333ff747c0d
Reviewed-on: https://gerrit.instructure.com/192161
Tested-by: Jenkins
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
2019-05-17 15:55:59 +00:00
Ryan Shaw 1f02d86f68 Upgrade canvas-planner & rce to not use ui-presets
This gets canvas planner and canvas-rce on babel 7, which is a 
prerequisite to canvas doing the same. Also, by not depending on the
Kitchen sink of ui-presets, it cleans a ton of unused stuff from our
node_modules/yarn.lock. It was originally 2 different commits but
in order to get the yarn.lock right, we have to do them all as one.

This also made it so we needed to have less “resolutions” in our
package.json since the newer versions of those things work fine with
the newer version of babel

So there are 2 test plan areas:

1. Canvas-planner
Closes:  CORE-2575

Test plan:
* smoke test to make sure everything in canvas-planner still works/looks
  like it used to in the canvas ui
* make sure the translation task (yarn check-transifex) still works

canvas-rce: upgrade to babel 7 & @instructure/ui-babel-preset

2. canvas-rce
Closes: CORE-2576

Test plan:
* smoke test the RCE editor
  * theming should still work/look exactly as before
* make sure all the various build tasks (eg yarn test, test:coverage,
  debug, lint, extract, etc) all still work as before

Change-Id: Id896687e3905f4df4627b181cad3f67ffe4417a5
Reviewed-on: https://gerrit.instructure.com/183877
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-03-18 20:48:42 +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
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
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
Nathan Mills ec4f61746f add lookup class for scope resource names
fixes PLAT-3311

test plan:

* run the rake task "doc:api"
* request the scopes from api/v1/accounts/:account_id/scopes
  - you should get back a json object that includes the localized name
* request the scopes from api/v1/accounts/:account_id/scopes passing
  the query param "group_by=resources_name"
  - you should get back a json object with the scopes grouped by
    localized resource_name

Change-Id: I2cab1822baef7cdda6471096153d60d4f7fe1e2b
Reviewed-on: https://gerrit.instructure.com/150233
Tested-by: Jenkins
Reviewed-by: Marc Alan Phillips <mphillips@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2018-05-23 16:09:12 +00:00
Michael Hargiss 8568525f24 consolidate contract tests
Test Plan:
  - follow the instructions in spec/contracts/README.md to run
  the live events contract tests locally
  - follow the instructions in
  spec/contracts/service_providers/canvas_lms/README.md to run
  the "Generic Consumer" Canvas API contract tests locally

Change-Id: I316747f53731f411ab82432587596e335c2fd059
Reviewed-on: https://gerrit.instructure.com/149766
Reviewed-by: Tucker McKnight <tmcknight@instructure.com>
Tested-by: Jenkins
Product-Review: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
2018-05-18 22:34:20 +00:00
Cody Cutrer 616b2dbb47 drop rails 5.0
Change-Id: Ic374d543a7ba00f660efccb287513c5f80232196
Reviewed-on: https://gerrit.instructure.com/144178
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2018-03-20 19:50:23 +00:00
Ryan Shaw 97510022cd don’t cp all of canvas-planner’s node_modules dir
this is to prevent canvas from copying everything in canvas-planner’s
node_modules dir into /node_modules/canvas-planner/node_modules

this will mimic the exact same behavior that pushing it to the npm
repository and pulling it from there in canvas’s package.json

test plan:
* do `ls node_modules/canvas-planner/node_modules/jest*`
* you should get: ls: node_modules/canvas-planner/\
  node_modules/jest*: No such file or directory

Change-Id: Ie428b3d0a5d6cc1d9bec89ae00adb3d451dfc916
Reviewed-on: https://gerrit.instructure.com/139907
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-02-05 22:13:31 +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 6a517e1058 rm brand things that don’t exist from .gitignore
Change-Id: I9005fbf21cd5fb34aaa575510b3ebd4eae995f39
Reviewed-on: https://gerrit.instructure.com/136370
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2017-12-28 22:34:40 +00:00
Graham Ballantyne a6a1801ece Ignore yarn-error.log files
Change-Id: I4be3baa5418debaf4026417c5ba0a62871493d50
Reviewed-on: https://gerrit.instructure.com/128069
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2017-10-02 16:55:29 +00:00
Cody Cutrer 7876daa99b update .gitignore for rails 5.1 flag file
Change-Id: I921ff20d7bbafd4df3e5fc99b39a49a9bdaf1775
Reviewed-on: https://gerrit.instructure.com/120826
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-07-28 16:27:55 +00:00
Cody Cutrer a8112aa0f9 update .gitignore for rails 5.1
Change-Id: I690f48fa4975ce7c1f8cbe92ae7fbcea221400a2
Reviewed-on: https://gerrit.instructure.com/120758
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-07-27 22:03:05 +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 e65e404a56 remove ember_bundle magic, refs SD-2097
just check in main.coffee, it pretty much never changes (especially since
the ember srgb will diaf soon)

this is (hopefully) one of the last pieces of the webpack puzzle

test plan:
* webpack and requirejs builds should be happy
* srgb should boot up in both

Change-Id: Icc1a6ad811cffca5ef18a6858d9103c9bbccf037
Reviewed-on: https://gerrit.instructure.com/103352
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-02-28 00:34:24 +00:00
Ryan Shaw 0b6a281397 clean up some cruft from .gitignore
Change-Id: I5879e3944d64eb67eb73e885174c83c808abc323
Reviewed-on: https://gerrit.instructure.com/103029
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-02-23 16:56:53 +00:00
Cody Cutrer c7d6e8345e ruby 2.4 has been tested
closes CNVS-34793

don't warn about it anymore, don't bother with a separate lockfile
(just make people suffer through installing rails via git), and
bump the rails branch a bit to pick up a deprecation warning fix

Change-Id: I430e5c97adf2f7db5a9badc2a13ba4d8b4161e5c
Reviewed-on: https://gerrit.instructure.com/101275
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-02-07 18:35:12 +00:00
Cody Cutrer dc348ee072 keep a separate lockfile for ruby 2.4 for now
Change-Id: If8ebd836905c389422fb06e3e2f5d7ce153ea832
Reviewed-on: https://gerrit.instructure.com/100608
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-01-27 17:17:10 +00:00
Derek Bender ef42472deb remove .ruby-version and add to .gitignore
Change-Id: Ib18c321f3cd3576242225b7048d4d9a34a039a75
Reviewed-on: https://gerrit.instructure.com/99921
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2017-01-18 21:19:20 +00:00
Ryan Shaw e116bb0d90 Webpack: better handling of chunks and cdn stuff
fixes: CNVS-31779 [webpack] bundle file size
test plan:
* using webpack, look at the network panel in
  the chrome developer console.
* the total ammount of javascript loaded for any
  given page should be much less than before this commit
  and about on par with what requireJS loads for the same page.
* use chrome network panel to throttle to "Regular 3G"
* from both a clean cache and a primed cache:
* make sure that the total time to render the page
  is about on par with requireJS

first change: load webpack chunks from CDN

fixes: CNVS-32261

test plan:
* run `npm run webpack-production`
* check your page, it should load js files and chunks
  from the same hostname the page is served from.
* now set a host: in config/canvas_cdn.yml
  (for testing locally, I just set it to http://127.0.0.1:3000,
* restart rails and reload the page, now the scripts and
  chucks should come from that new hostname

second change:include fingerprints in webpack bundle and chunk filenames

closes: CNVS-28628

with this change we don't need to run `gulp rev`
after running webpack and we can load both the bundle
and chunk files safely from the cdn, since they will
have content-based fingerprints so we can tell
browsers to cache them forever. (we set those
http caching headers in lib/canvas/cdn/s3_uploader.rb:53)

test plan:
* for both dev and production
* run `npm run webpack` (or `npm run wepack-production`)
* with a cdn configured in canvas_cdn.yml, run:
  RAILS_ENV=<dev or prod> bundle exec rake canvas:cdn:upload_to_s3
* check to make sure that the page loads the webpack js,
  that there are no errors, and it all came from the cdn

third change: properly handle moment locale & timezone in webpack

test plan:
 (see application_helper_spec.rb)
 * set a non-default user timezone, context timezone
   and locale
* dates should show up in your timezone and and
  the date helper strings should be in your language

better handling of moment custom locales

closes: CNVS-33811

since we now have hatian and maori, we need to do this in
a way that is not just a one-off for maori

test plan:
* set your locale to maori
* in webpack & requireJS make sure dates show up right

Change-Id: I34dbff7d46a1047f9b459d5e1c0d141f435d42fb
Reviewed-on: https://gerrit.instructure.com/95737
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2017-01-03 22:50:31 +00:00
Brad Horrocks 8f733528ce ignore .env
Change-Id: I37d1f798e6ba6827b10ebb6db804974b120eddfe
Reviewed-on: https://gerrit.instructure.com/95942
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: Brad Horrocks <bhorrocks@instructure.com>
2016-11-28 17:31:18 +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
Jon Jensen 1c60698f56 spec: get plugin and ember js specs running, remove cruft
fixes SD-1724

in previous refactorings, plugin and ember js specs stopped running, and
regular specs started running twice

test plan:
1. confirm that ember specs run and pass now (110 of them)
2. confirm that more regular specs run than before (cuz plugins)
3. confirm that the regular specs don't run twice (unless it does the
   retry thing)
4. `sudo -u clay test it every which way`

Change-Id: I24ac56b9d3082e25d15f06193c9a9e5c4313b7a7
Reviewed-on: https://gerrit.instructure.com/94305
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-11-08 23:15:39 +00:00
James Williams f23f3b0ff2 remove rails 4.0 support
Change-Id: Id1900160375644ea33badaa9d9f9185fab6b81ac
Reviewed-on: https://gerrit.instructure.com/92726
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-10-25 17:17:22 +00:00