Commit Graph

399 Commits

Author SHA1 Message Date
Jacob DeWar 9a6a5e7892 Force by_role linter to give -1 and not -2
flag=none

Test Plan:
 - Add or modify a byRole query in a jest test
 - Commit and push
 * Verify linter leaves a -1, not a -2

Change-Id: I1722cdcab0d38f0f09de17b75fb2445d446cd78d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/349055
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
Reviewed-by: Paul Gray <paul.gray@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Jacob DeWar <jacob.dewar@instructure.com>
2024-06-03 21:14:39 +00:00
Jacob DeWar 278c52daed Add warning for new uses of byRole
flag=none
closes RCX-1848

Test Plan:
- Check out PS
- Add/Remove uses of byRole
- Make and push new commit
  - Or run script/tatl_tael locally
* Verify comments only in files in /__tests__/
* Verify comments only on new uses of byRole
* Verify no comments on existing uses of byRole

Change-Id: I931f70a6fa2df94fe85b0d210a4888ff062e5113
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348071
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Jacob DeWar <jacob.dewar@instructure.com>
2024-06-03 13:51:50 +00:00
Cody Cutrer 42f30e69d4 ensure using the correct version of bundler for script/delayed_job
Change-Id: Iefeed24f9ef69ba53594cdafbd965f6d178c22dd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/347850
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-05-22 21:26:43 +00:00
Aaron Shafovaloff 1c4d77c850 remove --ignore-optional flag
I ended up needing to remove this with webpack -> rspack

Change-Id: I047c84b7355b89455f1df57a783dbcbfa5fd11a6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337968
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-01-17 23:34:02 +00:00
Aaron Shafovaloff b980ed6839 move $.raw to independent function
also adds jsdoc comments to @instructure/html-escape

closes FOO-4193

flag=none

Change-Id: Iff1779c18320d84f43d39c0bca5f91410c77ec0d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336857
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-01-06 05:43:58 +00:00
Cody Cutrer 3e27ddeae0 bundle update rubocop-performance, rubocop-rails
[skip-stages=Flakey]
[skip-crystalball]

99% of fixes are Performance/StringIdentifierArgument, but one or
two instances of each of Performance/Count, Performance/MapCompact,
Rails/Pluck in safe navigation chains

Change-Id: Ibd2292fb9e7c1e9162068021073c3c0f4b0d65df
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335489
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-12-18 20:28:02 +00:00
Aaron Shafovaloff ecceff10e3 Remove use of InferType
Also:
 - Remove some unnecessary use of @instructure/ui-themeable
 - Remove use of TsMigrationAny
 - Remove some instui-related module declarations
   (no longer needed)
 - Remove old upgrade-instructure-ui script
 - Upgrade typescript and babel-plugin-typescript-to-proptypes in RCE

Test plan:
 - Build passes

flag=none

Change-Id: I734183ed8bdf68422e4eb46285909c30bc31ee33
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334667
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-12-07 18:39:51 +00:00
Evan Battaglia 2392899b1f Ignore internal variable expansion for docs
flag=none
Test plan: n/a

Change-Id: If03404625c0e92da20923e6a4142d60e220bb5a6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334587
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2023-12-05 22:49:30 +00:00
Steve McGee a4e2b03da7 update the lint commit message
why: we decided that the lint severity level should be "warn"
and that it also should inform that the warning could be ignored
if you knew what you were doing.

refs: INTEROP-8268
flag=none

test plan:
- wip commit that modifies the variable expander file but not
  the docs should cause lint warning message

Change-Id: I3f997cfa2b3da733bf4bf6cea06fb5e75ae95d9e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332836
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-11-15 16:30:39 +00:00
Steve McGee a186461908 linter catches missing variable exp doc updates
why: when adding or editing an LTI custom variable expansion,
changes to the comments are not automatically synced to the
API docs unless `rake doc:api` is run. This often gets missed.

fixes: INTEROP-8268
flag=none

test plan:
- wip commit that modifies the variable expander file but not
  the docs should cause lint warning message

Change-Id: Ibe331322a135f697fa115fb8e12f81ff32fd0fe5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332325
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Steve Mcgee <steve.mcgee@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-11-09 20:49:05 +00:00
jake.oeding eaa5b23e17 restart stopped containers after update
update script prompts you to stop containers,
but previously it never restarted them

Change-Id: Id93d128755ea0ad176b429857b24fa15ec2649c7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332200
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
2023-11-06 22:25:14 +00:00
Charley Kline 2848197c93 Upgrade Canvas to InstUI version 8 (second try)
Refs FOO-3190
Refs FOO-3708
Refs FOO-3913
flag=none
[fsc-max-nodes=30] [fsc-timeout=60]

Uprevs InstUI and addresses all post-uprev tasks. Also now that
InstUI is fully TypeScript, a bunch of type errors appeared
which needed to be addressed.

It builds against the commit of MRA that will have to merge
concurrently with this.

Still to do: theme -> themeOverride which is a separate commit
off of this one that is ready to go.

Test plan:
* cross your fingers
* (this will need some extensive review before merging)

Change-Id: I45a1138530d415398b019cfedcf8a3b57a051912
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/329443
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Ryan Norton <rnorton@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
2023-10-06 03:07:44 +00:00
Charley Kline 3c5e316883 Revert "Upgrade Canvas to InstUI version 8 (frd)"
Refs FOO-3862
flag=none
[pin-commit-multiple_root_accounts=9d1698853e352f7e023e196e80cc195215a2b98c]

This reverts commit 448f1eebef.

Reason for revert: downgrade to InstUI 7 per engineering leadership

Change-Id: I89c607d09c29885da77b4474b757c7f205e51f01
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328102
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-09-22 01:35:06 +00:00
Cody Cutrer 450d78155b switch to extracted bundler-multilock gem
well, somewhat. it's vendored for now, bugfixes and improvements
have been going into that gem, and we'd like those fixes in
Canvas.

Change-Id: Ib4f30926acddb364779b9f91b1ee129ba6b17ff0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327463
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-09-18 21:25:15 +00:00
Aaron Shafovaloff 448f1eebef Upgrade Canvas to InstUI version 8 (frd)
Refs FOO-3190
Refs FOO-3708
flag=none
[fsc-max-nodes=30] [fsc-timeout=60]
[pin-commit-multiple_root_accounts=03b5f961bbaa28af3d43b0a6a2ab072654cc6468]

Uprevs InstUI and addresses all post-uprev tasks. Also now that
InstUI is fully TypeScript, a bunch of type errors appeared
which needed to be addressed.

NOTE:

This is an amalgam of g/314136 and g/326557 which will get abandoned
once this passes Jenkins and is merged.

It builds against the commit of MRA that will have to merge
concurrently with this.

Still to do: theme -> themeOverride which is a separate commit
off of this one that is ready to go.

Test plan:
* cross your fingers
* (this will need some extensive review before merging)

Change-Id: I860c3dc04d34237e32aeaa138f6c377a016ceeae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327683
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Paul Gray <paul.gray@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-09-14 14:34:45 +00:00
Cody Cutrer 38f902c055 use the rubocop gemfile for script/rlint
instead of an inline gemfile. this ensures the same lockfile is used as well

Change-Id: I885c6af20950ca331992e3ba0a0c06ef5ec673d5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327177
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-09-11 16:00:00 +00:00
Jeremy Stanley 13b00464df bump gergich for script/rlint
because of course there are three places for this (ノಠ益ಠ)ノ

Change-Id: Icc8e6dd9c4f35685a282af70162e1a911c9a6eca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326821
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2023-09-05 15:12:43 +00:00
Cody Cutrer ee00998199 update bundle_update ignored gems config
* don't ignore gems if they're part of another dependency group
 * nokogiri got updated
 * aws-partitions and sorbet-runtime are frequently updated;
   we don't need latest

Change-Id: I91b53a833c4fd12a05c154a6f507ae03cb19d4e0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326055
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>
2023-08-28 16:00:14 +00:00
Cody Cutrer 7c6068acc9 don't commit if the bundle update failed
Change-Id: Icaa682e215760e311acf492ad3d50d7d552824f8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325275
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>
2023-08-15 23:30:52 +00:00
Cody Cutrer eb4b135c5a add a script to easily update outdated gems individually
Change-Id: I4062505e44be3d9cf6f7235bb0cc29d8bbb515e7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324929
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>
2023-08-14 16:34:36 +00:00
Cody Cutrer aa7041d2c1 update rubocop, and apply new cops
[skip-stages=Flakey]

Change-Id: I2d3ffbeb652a6668941125a8a2afe87f104c8d0a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321953
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-07-03 22:11:42 +00:00
jake.oeding ad55f0b5d5 add script that alerts when webpack completes
this functionality existed for 'local' canvas
instances, but this now adds it for dockerized
setups

flag=none
qa risk: low

test plan:
-run the script: `node docker_webpack_monitoring.js`
-start webpack logs: `docker compose logs -f webpack`
-trigger webpack by altering some front-end code
-monitor the logs manually
>confirm you get a MacOS notification shortly after
 webpack ceases processing

Change-Id: I4877d411c271058b7544bbe8c2dd0e888396ba0d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321140
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
2023-06-26 16:48:27 +00:00
Jacob Burroughs 7dcc507d0a Rubocop for ruby 3.1
[skip-stages=Flakey]

Change-Id: I6abefdfa9fed6dd4525c8786e93efa548b3710f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319603
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-06-06 16:44:26 +00:00
Cody Cutrer 1c15214a63 keep lockfiles in sync as part of `bundle` commands
closes AE-283

this eliminates script/sync_lockfiles.rb and integrates its
functionality directly into `bundle install`, `bundle check`, etc.
it also generalizes a few pieces so that the same approach is used
for all use cases:
 * syncing versions between the main Gemfile and gems in gems/
 * maintaining separate lockfiles for no plugins/including
   private plugins
 * maintaining separate lockfiles for multiple Rails versions
   (crossed with the previous bullet)

The differences between them are just small variations on how strict
versions must match between lockfiles, and requiring pinning of
versions not in the default lockfile.

For full details, checks the docs on BundlerLockfileExtensions

This does change the strategy for filtering private plugin dependencies
out of the committed lockfile(s) - instead of filtering based on hash
of source, simply don't even include private plugin gems in the gemfile
when building the filtered lockfile (i.e. dynamic Gemfile, rather than
monkeypatching bundler to filter out -- semi-succesfully -- private
plugins from the Definition).

It also changes the "default" lockfile for Canvas that gets checked
in to be Gemfile.lock, so that other tools that are not
multi-lockfile aware can find it (such as rubocop, dependabot, and
others). This will be the lockfile corresponding to the current
default rails version for Canvas, and without private plugins.

Change-Id: I7ba398381974acbc4445f34fa3b788e8a07c5ce6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317888
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-05-16 18:39:21 +00:00
Cody Cutrer 2ad4ea5d18 fix lockfile syncing from canvas lockfile to sub-gems
Actually use Bundler to write them out. this ensure that all
constraints are checked with the gem's Gemfile. Had to resolve
several issues with gems along the way.

also removed RedCloth from canvas_stringex, because it's never
used

Change-Id: I614be19e147bdfd3e351e7f032fd6f9b0c1926be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317781
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-05-09 22:57:42 +00:00
Cody Cutrer fdf5a03c4d rubocop: inherit config from rubocop-inst
and remove now-duplicated config

also fix a few offenses that snuck in due to code review race conditions

as part of this, Rubocop was loading the lockfile, so our "clever" rubocop
binstub had to be adjusted to use a lockfile. this allows us to commit the
lockfile, which I then also updated the sync_lockfiles script to handle
this one as well

flag = none
test plan: N/A

Change-Id: I20ee2672c5219a40e90bc1138f8900a8d2ce08ee
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317373
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-05-02 17:24:47 +00:00
Cody Cutrer 502aa068da rubocop: Layout/Multiline*LineBreaks
[skip-stages=Flakey]

Change-Id: I24912809267088bc19a4082c49bc5f78ca7b76bb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317302
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-05-01 19:31:42 +00:00
Aaron Shafovaloff 7ba6ceea12 remove coffeescript from webpack config
also: remove vestiges of CoffeeScript

test plan:
  - existing tests pass

closes EVAL-3071

flag=none

Change-Id: Ic52024efd7d16e9a5ee550d7ad9a406950ec4b51
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316570
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2023-04-20 19:49:42 +00:00
Aaron Shafovaloff e644394e48 add packages to tsc script file_regex
test plan:
  - existing tests pass

flag=none

Change-Id: I38f04b64f4608da3f6a25d9d3c1f229a4106595f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316291
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
2023-04-18 22:20:23 +00:00
Antônio Augusto 539b2fb2be Update URL of docker desktop documentation
where ir refers to increasing the memory needed to run Canvas.

closes gh-2180
flag=none

Test Plan:
- specs pass

Change-Id: I63ea90221625bf95f4587bea59d68b0a0e3a5049
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316202
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-04-17 21:59:05 +00:00
Cody Cutrer 64c4308714 commit lockfiles for sub-gems
still need to ensure gem dependencies are consistent, but this should
prevent unexpected breakage during tests

Change-Id: I39420479fd3fe4f7e49a12a418eca033fcdc7564
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314979
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>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-04-14 14:07:43 +00:00
James Butters 5a89713b86 remove bundle check and just bundle install
the bundle check was falsely reporting as dependencies met
with updates to Gemfile.rails70.local.partial. Remove the bundle
check and just run bundle install, if there are not updates
it's still fast and doesn't cost any time

Test Plan:
-with a clean state
  -downgrade a gem in Gemfile.rails70.lock.partial
   e.g. strscan (3.0.6) -> 3.0.5
-run docker_dev_setup.sh
-confirm gem version in Gemfile.rails70.lock
-restore the gem in Gemfile.rails70.lock.partial
-run docker_dev_update
  -the gem is updated in Gemfile.rails70.lock to match
   Gemfile.rails70.lock.partial

Change-Id: Ide32d45667502df7882b374de4773b63f687d153
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315997
Reviewed-by: Andrea Cirulli <andrea.cirulli@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>
2023-04-13 22:22:25 +00:00
Cody Cutrer 1d3d9ed499 rubocop: fix miscelleneuos violations in prep of bumping rubocop
Change-Id: I9d37303737f00d6e022cb8fc08726e293a7336ab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315166
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>
2023-04-12 19:26:13 +00:00
Cody Cutrer b2b0bff902 rubocop: Style/TernaryParentheses, Style/RedundantParentheses
[skip-stages=Flakey]

Change-Id: I8d860eedd8b199ed3adf0e2bf9162b43096c5347
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315130
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-04-12 14:56:48 +00:00
Aaron Ogata f6f64fddba stop using yarn install —pure-lockfile
Change-Id: Ice56cf252908b40572d5c00de59ed0ac06eddf34
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315660
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>
Build-Review: Aaron Ogata <aogata@instructure.com>
2023-04-11 17:12:54 +00:00
Jacob Burroughs eaa46de65c Make brakeman pass on current master
This adds 88 ignores and removes 32, and with more careful review
we could probably shrink the ignore list, but this will allow
brakeman to become more manageable/useable and therefore actually
useful

Change-Id: I65514b4fe5fa046560a92415db0b3d3403aa20f3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315511
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-04-10 18:08:26 +00:00
Cody Cutrer c1a8612e12 rubocop: Style/RedundantRegexpEscape
Change-Id: Idf4e1cee69240eebcbeab56f909c7aa21eea6f62
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315122
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-04-10 14:12:01 +00:00
Aaron Ogata 3162a7649b remove not needed fix_inst_esm script
Change-Id: Ic108727cffd8771ac7566191707accb649d432d2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315056
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2023-04-04 13:22:12 +00:00
Christian Gravatt 72f993ed90 Evaluation of docker-compose version outputs multiple lines with multiple matches to the regex pattern
We only want the docker-compose version which is first so pipe it to head. This fixes the syntax error.

closes gh-2169

 Test Plan:
  - On linux and mac, run the script with and without the change. Confirm funtionality still works and syntax error is removed.

Change-Id: Ief1a69947f93a1aa4ce2039ab2734474e0a6dc7c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314123
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-03-24 20:39:36 +00:00
Spencer Olson dcd7dfc914 use rails7 option for brakeman
flag=none

Test Plan:
- specs pass

Change-Id: I081f5a545b0f0d21f0206bef0ef5ec61f71745c8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/311974
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2023-02-24 22:19:44 +00:00
James Butters 2b7fc11650 remove code to delete Gemfile.lock
we no longer need to remove the Gemfile.lock, remove the code that
does this as part of setup.

Test Plan:
- Jenkins docker smoke passes
- running docker_dev_setup.sh locally passes

Change-Id: Ic8807497f0f7489028ae474f0774cc5f871cb0f9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/311951
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2023-02-24 18:00:53 +00:00
Aaron Shafovaloff 9665762078 Use Gergich output for TypeScript errors
Test plan:
  - See that TypeScript errors are reported in Gergich for prior
    failing build
  - Tests pass for latest build for this commit

flag=none

Refs DE-1519

Change-Id: I3cd7e8fc43d24932fdd60b296e9015d76d3671ac
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310278
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-02-02 23:34:05 +00:00
Jason L Perry 9754665479 Update how we check for Docker on mac
flag=none

Test Plan:
Run setup script on a Mac.

Change-Id: I2adec5712d1afa0d7ad102bfb6a5605736ee1ea4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/309008
Product-Review: Jason Perry <jason.perry@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Dustin Cowles <dustin.cowles@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
QA-Review: Dustin Cowles <dustin.cowles@instructure.com>
2023-01-31 15:50:47 +00:00
Isaac Moore d6584b490a Remove unnecessary require statements
closes AE-30

flag=none

test plan:
- verify Canvas boots in CD
- verify no influx of new errors in CD

[fsc-timeout=30]

Change-Id: Ifa04bebe1b09f01c6d3b8b2d8f3bb424759730f5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/308067
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Build-Review: James Butters <jbutters@instructure.com>
2023-01-04 21:38:21 +00:00
Jacob Burroughs 6fd442cf8b Complete ruby 3.1 support
Change-Id: I954402cb7016c1590748f149279865db967272a3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/308110
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2023-01-04 18:02:40 +00:00
Jon Scheiding fb837343e0 docker-compose config to build:watch es packages
Adds an override file you can use to run build:watch on the packages
that have es builds (since main webpack build is getting them from there
instead of watching the src directly)
Currently this is canvas-rce and canvas-media, but more can be added

flag=none

test plan
- Remove the canvas-media and canvas-rce volumes from your
  `docker-compose.override.yml` file
  (see changes to docker-compose.override.yml.example)
- Update the `COMPOSE_FILE` variable in your .env file to include
  `docker-compose/watch-es-packages.override.yml`
  (make sure it's after your main override file)
- `docker-compose up -d` to recreate your containers
- `docker-compose logs -f webpack`
  Observe that the canvas-rce and canvas-media builds happen before
  webpack starts
- Wait for the initial webpack build to complete
- Make a change to some JS file under canvas-rce and/or canvas-media
  Observe in your webpack container logs that webpack rebuilds
- Go to https://canvas.docker and make sure the change you made is
  reflected

Change-Id: Id08d52cc35bf120723b6ed05817ea01644ebec23
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/300091
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
QA-Review: Jon Scheiding <jon.scheiding@instructure.com>
Product-Review: Jon Scheiding <jon.scheiding@instructure.com>
2022-12-15 22:18:24 +00:00
Aaron Ogata 9713403131 fix eslint slowness
refs DE-1446

Change-Id: Id25e72c78703177b2692f62267c8d910b0dfb8d8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304798
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-11-29 20:53:21 +00:00
Jon Scheiding 319fd4bada Accommodate local.inseng.net in dinghy setup
Update this script so that you can call it with a `--domain-tld` option
This accommodates local setups that want to use SSL certs provisioned
against `local.inseng.net`, or other local setup variations

flag=none
test plan
- `docker rm -f http-proxy`
- `. script/common/utils/dinghy_proxy_setup.sh`
- `setup_dinghy_proxy`
* Expect that the `http-proxy` container is created
- `docker inspect -f '{{json .Config.Env}}' http-proxy`
* Expect to see `DOMAIN_TLD=docker`

Repeat the above, but with
`setup_dinghy_proxy --domain-tld local.inseng.net`
Expect to see `DOMAIN_TLD=local.inseng.net`

Change-Id: I9d13ec497cf087e9db174ac98a793933afcb20ce
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304582
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Jon Scheiding <jon.scheiding@instructure.com>
2022-11-14 15:56:40 +00:00
Aaron Shafovaloff ee5c925f0e Don't fail builds on ESLint errors in packages/
Test plan:
  - All existing tests pass

Refs DE-1426

flag=none

Change-Id: Ia809f1cd4f3ee6c8da3d14e266caf340e1ba627a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304334
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2022-10-28 19:57:59 +00:00
Aaron Shafovaloff d37333bf63 Trigger Linter-2 upon ESLint errors
Test plan:
  - All existing tests pass

Refs DE-1426

flag=none

Change-Id: I56f21e083482dd1d1cbf28c111e3d9257baf1908
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304063
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sean Scally <sean.scally@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2022-10-27 21:54:31 +00:00