We originally experimented with an Alpine image for reduction in image size. However, a number of issues with Alpine have appeared that were unanticipated.
1. Alpine uses a different memory allocator
2. Alpine package manager deletes old versions once new ones are published.
The first issue is the potential root cause behind random segmentation faults in our tests and we are reverting the Alpine change to eliminate the memory allocator difference as the cause.
Test Plan:
1. Ensure that Jenkins image caching works correctly
2. Ensure that local docker build scripts work correctly
Change-Id: I02b13d8c7117495d825a92e0a4be4e70b0e78caf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247283
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>
refs DE-209
[change-merged]
[build-registry-path=jenkins/canvas-lms-de-209]
Test Plan:
1. Ensure that `docker-compose build` works locally
2. Ensure that yarn is cached on Jenkins when run on a separate node
Change-Id: Icadf02b9e999eafd14f493ae1c0649ed0ffe58bf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245336
QA-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
refs DE-187
[change-merged]
[build-registry-path=jenkins/canvas-lms-de-187-test]
Test Plan:
Ensure that the cache is used for bundle install when a gem changes and the build is run on a different node.
Change-Id: I43f83338a25a0774030495904b75d0825abcc5bb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244748
QA-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
refs DE-187
Caching intermittently fails due to the intermediate layer in the multi-stage build. We don’t have any consumers of this image for now, so let’s work around this problem by removing it, until we can prioritize investigating why the multi-stage build isn’t using the cache for the intermediate layer.
[change-merged]
[build-registry-path=jenkins/canvas-lms/de-187-drop-ruby-layer]
Test Plan:
1. Cache is used on a build with a file changed on a separate node.
Change-Id: I8d771ac532bcd0bacc554f02f6b129294bcfedf9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244848
QA-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
refs DE-161
Test Plan:
1. Ensure that JS sourcemaps are skipped on pre-merge
1. Ensure that JS sourcemaps are run on post-merge
3. Ensure that Linters catch bundle size increase limits on pre-merge
Change-Id: I59607d902b191169a0415fc7673cb3a3a06dba68
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243619
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
refs DE-183
Test Plan:
1. Run the command at the top of the newly generated Dockerfile and ensure there are no changes.
Change-Id: Ice28ad169be94c39efb07d014a6bbc37e2f6c7f8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244651
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>
Prepare for splitting pre-/post- merge webpack builds by splitting yarn into its own stage so it can continue to cache correctly
refs DE-161
Test Plan:
1. Pre-Merge Build Passes
2. Post-Merge Build Passes
3. Pre-merge build uses cache from post-merge build
Change-Id: Ib07c8934d8691b0cf7866afd56043aee503f666b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244606
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
refs DE-164, DE-154
Test Plan:
1. Jenkins uses the ruby cached images
2. Local docker building works
Change-Id: Id78da711b69510e7b93ed67fe872432dfcabb50a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244426
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
refs DE-164
Test Plan:
1. Ensure that the pre-merge, no-cache path works.
2. Ensure that the post-merge, no-cache path works.
3. Ensure that the cache path works.
4. Ensure that local docker setup scripts still work.
Change-Id: I1ecb6d7c37346b29816a2202e27ef1e662a3ac60
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244290
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
docker_dev_setup.sh broke with a recent change to how we build
our docker image. Adding the ruby docker build into the script,
then passing that image as an arg to the main Dockerfile.
Removed the default of the arg to pull from starlord since
it's not available to public.
fixes: DE-153
Test Plan
- Run docker_dev_setup.sh in a clean environment
- script will build canvas-lms-ruby image
- script will build alpine image using ruby image
Change-Id: Ia607f72717580bc808616f5483bb5c26342241ad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243614
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
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>
Change-Id: I16ee71af83dc3efac7b5bfec03e28de13725c3a9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/231987
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Benjamin Christian Nelson <bcnelson@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
Closes: CCI-292
flag = none
Test Plan:
- rebuilding the web image uses 2.4-xenial
Change-Id: Ia601c83767e0317ad0dbee21e54755413571c44a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230371
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
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>