Fixes: CCI-61
Creating a test plan for this patchset requires more effort than
monitoring the builds requires to see if there are any issues.
Change-Id: I4734b5ea370bf349631ea3a06fca8baa3bbdbaf5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/215509
Reviewed-by: S. Jacob Powell <spowell@instructure.com>
Tested-by: Jenkins
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
Fixes: GRADE-2257
It appears that several `yarn build:canvas` scripts in
packages/ open files with `rw` permissions that they
don't have at an early enough stage in the Dockerfile.
We were previously making all the directories writeable
but this wasn't going far enough since it was ignoring
files. I have a hunch that the files don't need to be
opened with `rw` permissions but that might be a problem
with babel or something else upstream. Since we eventually
make all files owned by docker:docker might as well do it
sooner with `COPY --chown=docker:docker`.
A follow up patchset should do add this feature to all
the other COPY directives.
Change-Id: I6a09161a34d6895284a87750091de3f82aa44e15
Reviewed-on: https://gerrit.instructure.com/197837
Tested-by: Jenkins
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
In order for the `yarn build:canvas` task to work in
`packages/js-utils` canvas’s root babel.config.js needs to exist
on the filesystem.
Because our docker file didn’t do something with it in its cached
build layer steps it wasn’t there by the time docker ran that step.
Test plan:
* the docker build should not fail with:
@instructure/js-utils
| `yarn build:canvas` failed with exit code 1
…
| { Error: Babel was run with rootMode:"upward" but a root could not
be found when searching upward from "/usr/src/app/packages/js-utils"
Change-Id: I5bd4b45ca25493768a867d1662bca059c9b056cd
Reviewed-on: https://gerrit.instructure.com/194403
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes CORE-2329
There were some tests that were expecting a snapshot-like value
where it expected `new Date().toLocaleDateString()` to give something
Like “2016-7-11” but that was actually wrong. If you do
`new Date().toLocaleDateString()` in a browser it will give you
something like “7/11/2016”. And this new version of node matches what
a real browser would have done, so I just updated the specs so they
are looking for the correct format. This change does not actually
reflect a change in what a real user would see. Just what
jest/jsdom/node formats it as.
Test Plan:
- check to make sure that the assignments 2 availability dates
component produces markup exactly as it did before
- Automated tests pass
- Build canvas locally, everything passes.
- Build canvas with docker, everything passes.
Change-Id: I74285cd6d9b251ca60ab79396e332cc3a419bcee
Reviewed-on: https://gerrit.instructure.com/177198
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
test plan:
- docker-compose down # take down existing containers
- docker-compose build
- docker-compose run --rm web yarn install
- docker-compose run --rm web bundle exec rake canvas:compile_assets
- docker-compose up
- Ensure canvas loads
Change-Id: I47862fdbacc7414bf39e86344deb082667736e35
Reviewed-on: https://gerrit.instructure.com/171513
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
if you are having problems after this commit you need
to either: `brew upgrade yarn` or` apt-get install yarn`
or rebuild your docker container or do whatever else you
use to manage software versions
Change-Id: I5c163baa8c4c814eeabca9a46501d508736a4ca1
Reviewed-on: https://gerrit.instructure.com/167252
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Dan Minkevitch <dan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
if you are having problems after this commit you need to either:
`brew upgrade yarn` Or `apt-get install yarn` or rebuild your docker
container or do whatever else you use to manage software versions
Change-Id: Ie338a24544bd4677f68222b69cfa178c0ef21ca9
Reviewed-on: https://gerrit.instructure.com/160616
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
if you are having problems after this commit you need to either:
“brew upgrade yarn”
Or
“apt-get install yarn”
Or
Rebuild your docker container
Or do whatever else you use to manage software version
Change-Id: I8428112b4a44c28edd2608124bff9e01a8e960d9
Reviewed-on: https://gerrit.instructure.com/151423
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
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>
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>
I just missed this in my other commit that upgraded node to 8.9.4
Change-Id: I34808eeb4854a7439e4943d0529d962164c52d8f
Reviewed-on: https://gerrit.instructure.com/136847
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
postgres' deb repo is busted for now, so we'll use http so we can carry
on with our projects.
Test Plan:
- build a docker image
- it should succeed
Change-Id: I63369f690fa7bf96b6b18d537f40eec790c95873
Reviewed-on: https://gerrit.instructure.com/132621
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Commit a0e14364b8 upgrades the postgres image to 9.5, but the Canvas
Dockerfile does not install a corresponding client version. This leads
to errors like this on setup:
pg_dump: server version: 9.5.9; pg_dump version: 9.3.19
pg_dump: aborting because of server version mismatch
rake aborted!
failed to execute:
pg_dump -s -x -O -f /usr/src/app/db/structure.sql --schema=public canvas
This commit fixes this issue by updating the Dockerfile to use
postgresql-client-9.5.
Test plan:
- Use a fresh dinghy VM
- Run through the docker development setup instructions
- Verify that there are no pg_dump errors
- Verify that Canvas starts and runs as expected
Change-Id: Icafbe4f280a2c40b839c36717ebe7ee133ee9b3c
Reviewed-on: https://gerrit.instructure.com/130146
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Omar Khan <okhan@instructure.com>
test plan:
docker-compose build works again \o/
Change-Id: I2d599a9463cdcca7d48e8d310c658f040b42c6a3
Reviewed-on: https://gerrit.instructure.com/125573
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
bring the development docker image down from 3.6GB -> 2.4GB
add a production docker image that weighs in at 1.2GB, which should speed
up end-to-end tests
template-ize web Dockerfiles so that common stuff stays consistent, volume
dirs are set up properly, etc.
test plan:
1. docker-based builds should pass
2. docker image should be usable (docker-compose up, etc)
Change-Id: I41ebb155090f66e346bdc285ca5c613ee5793127
Reviewed-on: https://gerrit.instructure.com/112859
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
this makes it so building the web container succeeds without having to
tweak the Dockerfile. i.e. no more:
Error: ENOENT: no such file or directory, scandir '/usr/src/app/node_modules/node-sass/vendor'
i'm still not sure why the extra yarn install causes that, but it does 🤷
test plan:
`docker-compose build web` should succeed
Change-Id: I5120dd0ea6168d7d373364bccd02bfa990df54d5
Reviewed-on: https://gerrit.instructure.com/111953
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
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>
Test plan:
* `docker compose build` works and updates bundler version
Change-Id: I4268eb3a5ae9b70a36263362763166bb29b3d0ae
Reviewed-on: https://gerrit.instructure.com/104181
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
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>
this will prevent root from owning the volume mount point
Change-Id: I43cb62311cddfbeca537bbfe2329daa6dfece9bd
Reviewed-on: https://gerrit.instructure.com/102818
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
fixes CNVS-35005
Test Plan
1. run: docker-compose build
2. run: docker-compose run --rm web bundle exec rake db:migrate:redo VERSION=20120502190901
3. Visit: /accounts/1/users
4. Create users with the names: Jalapeno, Jalapeoo, Jalapeño, JalapeЖo
5. Refresh the page and verify they are sorted:
Jalapeno, Jalapeño, Jalapeoo, JalapeЖo
6. Create an assignment
7. Give each of the students created above a grade
8. Visit: /courses/1/gradebook/history
9. Click on the assignment name to display the hidden table.
10. Verify the table of students / grades is sorted:
Jalapeno, Jalapeño, Jalapeoo, JalapeЖo
Change-Id: I9743c559a20a3d50600bcbc7e4a310105ec638cf
Reviewed-on: https://gerrit.instructure.com/102465
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
Running NPM install as root was causing the pre-install hook to fail due
to the privilege drop. Additionally, the script wasn't actually in place
anyway compounding the sadness. Now we're switching to the docker user
for installing dependencies and copying the scripts directory into the
image first.
Change-Id: Ieaf38d9cd9947e7f809796e38340e10033ae1eb7
Reviewed-on: https://gerrit.instructure.com/101437
Tested-by: Jenkins
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
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>