flag=none
test plan:
- Update your .env to include docker-compose/rdebug-ide.override.yml
in the COMPOSE_FILE variable
- Start your Docker environment
- Configure remote debugging in VS Code or RubyMine
(see https://instructure.atlassian.net/wiki/x/BACP-w)
- Launch the remote debugger and set a breakpoint somewhere ubiquitous
(e.g. in `ApplicationController`)
- Navigate to your local Canvas and confirm
that your breakpoint
Change-Id: I87d7bed838e7a593201a4bfd21f911216329343b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270409
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Jon Scheiding <jon.scheiding@instructure.com>
conditional gemfiles are generally discouraged (yes, we do it
for rails version switches, but we also redirect the lockfile
when we do so). and this shouldn't be needed anymore
Change-Id: I63839eee119a4e4c8d65bcd28e2d2f194e56656f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270161
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
refs FOO-1219
flag = none
test plan: specs pass
Change-Id: I44b3d4f6c5883fbc90d2aca3ec838475e675c90b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252868
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Change-Id: I74a20cb3d22a9377942daf50cbff03a9475ef20f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227282
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Change-Id: Iaa1ef635c9ef7f30dc7cccf6a219cdcfe1d481c9
Reviewed-on: https://gerrit.instructure.com/145617
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
The AMI packer build runs bundle install for the rails test
environment, and tatl_tael uses the 'colorize' gem in the
canvas__linters-and-js build.
Change-Id: I51061ccc5ea8a61b8f5d4c9c16d20c8d26a23905
Reviewed-on: https://gerrit.instructure.com/144510
Tested-by: Jenkins
Reviewed-by: David Tan <dtan@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
Change-Id: Iec20adc10df865aab9facff8693395027b438857
Reviewed-on: https://gerrit.instructure.com/144463
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Change-Id: Ice1b2100ed6d8d99e9d12fafd7aaa7a6d2e04813
Reviewed-on: https://gerrit.instructure.com/139864
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Change-Id: I7fb2ef758d2aac1066b4e3ba8e5e8b9a563a9229
Reviewed-on: https://gerrit.instructure.com/139860
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Change-Id: If914c89e87beb7d20ce171064db20bd72c5721a5
Reviewed-on: https://gerrit.instructure.com/131137
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
This re-enables better_errors with an opt in policy for
binding_of_caller (which powers the browser REPL) to safeguard
by defautl against RCE with tools like ssh, ngrok or localtunnel
The key for enabling the console is BETTER_ERRORS_ENABLE_CONSOLE
and the key for disabling better_errors altogether is
BETTER_ERRORS_DISABLE.
Docker users: set your TRUSTED_IP address in your environment
variables to access better errors in you web container.
fixes: GRADE-156
test plan:
- by default, no live REPL console should be present when the
error page is present (e.g. /accounts/0)
- given BETTER_ERRORS_ENABLE_CONSOLE=true
- the live REPL console is now present
- given BETTER_ERRORS_DISABLE=true
- the better errors page is not displayed (e.g. /accounts/0)
Change-Id: Ia259bc466136d678aa0b33047dda5f2aa0b3c28d
Reviewed-on: https://gerrit.instructure.com/95120
QA-Review: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
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>
this also upgrades our custom guard plugins to watch the correct
directories for plugins files. they were never updated after plugins
moved from vendor/plugins to gems/plugins.
Note: there is a small inconsistency between the latest guard and latest
thor gems resulting in a warning being printed on guard startup:
"Expected string default value for '--listen-on'; got false (boolean)"
I have a pull request open to fix this here:
https://github.com/guard/guard/pull/862
refs CNVS-34084
test plan:
- run guard
- change files
- guard should do the right thing
Change-Id: Iffc0297a458f6261130e12c151d37ecbc38ee0ec
Reviewed-on: https://gerrit.instructure.com/98657
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
This reverts commit c0e20beb55.
Change-Id: Ic8663b4c50ff15e535e3cb27af7a002502314111
Reviewed-on: https://gerrit.instructure.com/94946
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
To turn off, set DISABLE_BETTER_ERRORS ENV variable:
export DISABLE_BETTER_ERRORS=true
To re-enable, delete or unset the DISABLE_BETTER_ERRORS ENV var.
Setting the key to false will not work.
Change-Id: Icfe3985365d7fb3c3f2d005e998807bb9614fba1
Reviewed-on: https://gerrit.instructure.com/84383
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
QA-Review: Keith T. Garner <kgarner@instructure.com>
Using remote byebug means you don't have to alter the configuration of
your docker containers to get a byebug session. Also makes it possible
to byebug a running job.
This will only run byebug when the process is started outside of a TTY,
ex: in a docker container, so that we're sure we don't interfere with
byebug when running locally instead of in docker.
Also add some notes on how to use pry-remote if someone prefers pry over
byebug.
Change-Id: I38b4365ce2ab7536bf16548f26a37b951273b792
Reviewed-on: https://gerrit.instructure.com/80772
Reviewed-by: Mark Severson <markse@instructure.com>
Tested-by: Jenkins
Product-Review: Ben Rinaca <brinaca@instructure.com>
QA-Review: Ben Rinaca <brinaca@instructure.com>
Expand object by default
Version 6.0.2 had the following problem:
https://github.com/deivid-rodriguez/byebug/issues/177
This means that in previous to this patch objects like [nil]
would print as blank lines in byebug.
Change-Id: I4ba20becd4e145dfa4f7d461dd380b72373a0898
Reviewed-on: https://gerrit.instructure.com/66724
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
this will do a check to make sure all the node_modules
from our package.json are up-to-date before
running rake canvas:compile_assets or guard
there have been a lot of devs lately that have
been tripped up not knowing what to do because
they needed to `npm install`
Change-Id: I7c9d0896a6d7611bf9d89672a96cb9505099fa2c
Reviewed-on: https://gerrit.instructure.com/58580
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
I think the problem that we were getting was because
we added guard-gulp to our development gemfile
and it maybe require's mkmf, which adds the
.with_config scope.
test plan:
* go to conversations in dev mode, it should work
* run `bundle exec guard`, it should work
* with guard running, change a coffee/js file
* guard should see the change and regenerate the appropriate file
and you should see gulp 'rev' run.
Change-Id: Ia43e9436e19b32eb3959f6f2d9c2d8d7674aa109
Reviewed-on: https://gerrit.instructure.com/57777
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
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>
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>
we have them in the gemfile to lock them to a specific version,
but normal behavior doesn't auto-require them
also, use 1.9 hash syntax in gemfiles (_except_ _before.rb)
Change-Id: I549c2775c65d48ff23ba1358b43713965df97813
Reviewed-on: https://gerrit.instructure.com/51636
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
force users to auth google drive when the plugin is enabled
Add support for google drive in collaborations and homework submissions
Everything still looks like google docs to the user.
fixes PLAT-892
fixes PLAT-893
fixes PLAT-894
Test plan:
create a google docs integration
and enable the google drive plugin
when you visit the colaborations page it should ask you to authorize canvas to use google drive
Regression test homework submissions with google doc and drive
Regression test collaborations with google doc and drive
Change-Id: I79bdbdcae915b08a19cc9a078a64b49ef5f34796
Reviewed-on: https://gerrit.instructure.com/48583
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
fixes CNVS-13306
fixes gh-453
MySQL refuses to change columns that have a foreign key on them
Test plan
- Run the polling migrations on MySQL
- They should migrate the database correctly.
Change-Id: Ib781c5237c0973b254043096e536ac094dd809cf
Reviewed-on: https://gerrit.instructure.com/35511
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
sometimes it's needed to debug stuff in 2.1, cause it
fixes SystemStackError
bundler doesn't support it yet, so we have to use conditionals
instead of platform options
Change-Id: I88614634d24f36d7c18c999c1dc65eb91df65a32
Reviewed-on: https://gerrit.instructure.com/37010
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
so that it will use https
Change-Id: I6414d8ee064a98d6726ce5633ec1a960c3804b2e
Reviewed-on: https://gerrit.instructure.com/36722
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>