Commit Graph

13 Commits

Author SHA1 Message Date
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
Jon Scheiding 3f10c924f7 Make package-translations build fail when it fails
Includes:
- Take `git status` command out of condition so failure is detected
- Guards in the `sync-strings.sh` script so it can run locally
- Dockerfile change for better cache usage when iterating locally

test plan
- `export SSH_KEY_FILE=./nonexistent`
- Run the script
  `build/new-jenkins/package-translations/sync-translations.sh`
- Verify that the value of `$?` is non-zero

Alternatively, observe the differences between these two builds
 - https://jenkins.inst-ci.net/job/Canvas/job/package-translations/1166/
   run against the master branch
 - https://jenkins.inst-ci.net/job/Canvas/job/package-translations/1167/
   run against this PS

Change-Id: Ifa74770f2ff1ac7526577587abfc1e5a128fbde0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/303133
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: Joe Hernandez <joe.hernandez@instructure.com>
Product-Review: Jon Scheiding <jon.scheiding@instructure.com>
2022-10-21 13:29:29 +00:00
Aaron Ogata 6988472a2a upgrade node from 14.x to 16.x
refs DE-1264

Change-Id: If8b9d73a487b1914b19070a2249394e5116eb8d3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/295892
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
2022-07-12 12:41:09 +00:00
Ahmad Amireh 6059f00fad babel independence: k5uploader & js-utils
refs FOO-2697
flag = none

those two packages were relying on canvas's babel.config.js but no more

test plan: the build phase of the CI is enough as there were no logical
changes

Change-Id: I7814796f36f1e30b4dd494a12f768f9dbafb4f1f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286759
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
2022-03-11 21:00:09 +00:00
Jon Scheiding 68b5d63142 Update commitTranslations (properly this time)
- Actually add the auto-submit parameter
- Handle Slack send failures
- Deal with Jenkins environment causing ignored files to get committed
- Add some parameters to make local testing simpler

flag=none

test plan
1. build the package-translations build Docker image
  `docker build -f Dockerfile.package-translations -t package-translations .`
   (this takes a WHILE ... sorry)
2. run the commitTranslations script
  `docker run --rm package-translations \
     yarn wsrun --exclude-missing commitTranslations`
3. review the output to ensure that nothing happened
   (should contain "nothing to commit, working tree clean")
4. make a change to one of the files in
   `packages/canvas-rce/src/translations/locales/`
5. repeat steps 1-2
6. review the output to ensure that a commit was created
   (the push will fail because it attempts to auto-submit)

post-merge testing
- after merge, ensure that there is no more spurious commits with es/
- then just have to wait for new translations to show up

Change-Id: Ibd7ed2da53dee5ec20d9a4b0902c96de90c6b2a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283887
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Jon Scheiding <jon.scheiding@instructure.com>
2022-01-31 20:52:48 +00:00
Weston Dransfield 88b0ae9127 Modify concurrency in package-translations
Package-translations seems to have multiple
instances of yarn running (perhaps packages
recursively calling yarn in scripts?)

This leads to a race condition manifest in
expected files not existing.

To negate this problem, we set the network
concurrency to "1"

refs FOO-2496
flag=none

Test Plan:
Run the build and see it pass

Change-Id: Ia8f91f6175b2608ec6c44d584838e513b3a9e14b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276252
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2021-10-19 18:27:33 +00:00
Weston Dransfield a8890bbd1d Don't run yarn as root in package-translations
refs FOO-2496
flag=none

Test Plan:
Trigger the package-translations build
and watch for any errors.

Further changes may be needed after this
change has been merged

Change-Id: Ic7720db66c6cb4636d6c0acec9af1090e089613c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276146
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-10-18 21:15:00 +00:00
Jacob Burroughs c1aae983fb More translations build improvements
Change-Id: I2203315dc70f31e1cab9b29e30ccd0578d226663
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/268108
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-06-30 15:32:09 +00:00
Jacob Burroughs c4415e8c05 Hopefully fix package-translations
Also notify slack of failures

Change-Id: I57b6fc82a7f83b57047ca4b6c48c2c300531fa69
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/268053
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2021-06-29 19:48:05 +00:00
Ahmad Amireh 6684592adf say PLEASE to npx when running yarn-deduplicate
because simply asking it to run yarn-deduplicate is no longer good
enough, you must now be polite when doing it[1]:

    To prevent security and user-experience problems from mistyping
    package names, npx prompts before installing anything. Suppress
    this prompt with the -y or --yes option.

we will also be updating npm to the latest to catch such issues in the
future

== test plan

running "rake canvas:compile_assets" using npm > 7 completes
without hanging indefinitely at the "install dependencies" stage

[1]: https://docs.npmjs.com/cli/v7/commands/npx#compatibility-with-older-npx-versions

Change-Id: I81e044d20143991cf6103084f44ce8d4c9011f5b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259662
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2021-03-02 21:58:31 +00:00
Ahmad Amireh 486b0bf72c upgrade to node14
fixes FOO-1527
flag  = none

test plan: you can install node modules and run webpack

Change-Id: I33347d791b0923f4471b555c6fac303b098b1ef4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257333
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-27 15:33:52 +00:00
Ahmad Amireh 45cb519d52 [node12] upgrade to node 12.19.1 (LTS)
fixes FOO-1116
flag = none

this upgrade was problematic mostly because of Node's support for ES
modules (ESM) that is still fairly recent and introduces some complexity
around packaging. This is also the reason for the considerable hack
related to @instructure packages (see inline documentation) that can be
removed once we fix things upstream

| test plan |
| --------- |

- install node 12 if needed (e.g. not on docker)
- purge your node modules:

    rm -rf {.,client_apps/*,gems/*,gems/plugins/*,packages/*}/node_modules

- make sure you can still build locally (native/docker)

    bundle exec rake canvas:compile_assets

Change-Id: If9605ac428f0ff228f8852f0becb9fbac750f1f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253166
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2020-12-11 03:45:31 +00:00
Clay Diffrient 5b3543ebae Create shared translation infrastructure for packages
Test Plan:
  - Translations get built and put into
    packages/translations/lib/

closes COREFE-258

flag = none

Change-Id: I05889f9c122aaf1263a6803daad8abd977b32e44
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/213813
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Steve Shepherd <sshepherd@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2019-11-06 22:42:03 +00:00