hupe1980 / gatsby-theme-material-ui

Gatsby theme for Material-UI
MIT License
100 stars 42 forks source link

Update for React 18 #88

Closed dan-mba closed 2 years ago

dan-mba commented 2 years ago

Update gatsby-material-ui-components peer dependency for React 18 & update dependencies to test with React 18

dan-mba commented 2 years ago

The Netlify builds are failing because copying packages from .yarn_cache is taking too long

hupe1980 commented 2 years ago

The Netlify builds are failing because copying packages from .yarn_cache is taking too long

Do you know the reasons why netlify is taking so long now?

dan-mba commented 2 years ago

The Netlify builds are failing because copying packages from .yarn_cache is taking too long

Do you know the reasons why netlify is taking so long now?

I think yarn is installing all the dependencies into the yarn_cache folder, then recursively copying them to the node_modules folder. I'm not sure if moving to yarn 2 would help this process or not.

I had to delete the yarn.lock & rebuild it because of a bug in yarn 1.x that prevented yarn upgrade-interactive from completing.

dan-mba commented 2 years ago

The Netlify builds are failing because copying packages from .yarn_cache is taking too long

Do you know the reasons why netlify is taking so long now?

I think the slow netlify builds are related to caching

From the last build that completed, the log shows: 4:00:24 AM: Fetching cached dependencies 4:00:24 AM: Starting to download cache of 454.4MB 4:00:27 AM: Finished downloading cache in 2.631573053s 4:00:27 AM: Starting to extract cache 4:00:45 AM: Finished extracting cache in 18.238809418s 4:00:45 AM: Finished fetching cache in 20.942841093s 4:00:45 AM: Starting to prepare the repo for build 4:00:45 AM: Preparing Git Reference pull/86/head 4:00:46 AM: Parsing package.json dependencies 4:00:47 AM: Starting build script 4:00:47 AM: Installing dependencies 4:00:47 AM: Python version set to 2.7 4:00:48 AM: Started restoring cached node version 4:00:51 AM: Finished restoring cached node version 4:00:51 AM: v14.19.0 is already installed. 4:00:52 AM: Now using node v14.19.0 (npm v6.14.16) 4:00:52 AM: Started restoring cached build plugins 4:00:52 AM: Finished restoring cached build plugins 4:00:52 AM: Attempting ruby version 2.6.2, read from environment 4:00:54 AM: Using ruby version 2.6.2 4:00:54 AM: Using PHP version 5.6 4:00:54 AM: Started restoring cached yarn cache 4:01:04 AM: Finished restoring cached yarn cache 4:01:05 AM: Yarn workspaces detected 4:01:05 AM: Started restoring workspace packages/gatsby-material-ui-components node modules 4:01:05 AM: Finished restoring workspace packages/gatsby-material-ui-components node modules 4:01:05 AM: Started restoring workspace examples/typescript node modules 4:01:05 AM: Finished restoring workspace examples/typescript node modules 4:01:05 AM: Started restoring workspace root node modules 4:01:05 AM: Finished restoring workspace root node modules 4:01:05 AM: Installing NPM modules using Yarn version 1.22.17

And the current failing logs show the cache download failing: 8:15:01 AM: Fetching cached dependencies 8:15:02 AM: Failed to fetch cache, continuing with build 8:15:02 AM: Starting to prepare the repo for build 8:15:02 AM: No cached dependencies found. Cloning fresh repo 8:15:02 AM: git clone https://github.com/hupe1980/gatsby-theme-material-ui 8:15:03 AM: Preparing Git Reference pull/88/head 8:15:03 AM: Parsing package.json dependencies 8:15:04 AM: Starting build script 8:15:04 AM: Installing dependencies 8:15:04 AM: Python version set to 2.7 8:15:05 AM: Downloading and installing node v14.19.1... 8:15:05 AM: Downloading https://nodejs.org/dist/v14.19.1/node-v14.19.1-linux-x64.tar.xz... 8:15:06 AM: Computing checksum with sha256sum 8:15:06 AM: Checksums matched! 8:15:08 AM: Now using node v14.19.1 (npm v6.14.16) 8:15:08 AM: Started restoring cached build plugins 8:15:08 AM: Finished restoring cached build plugins 8:15:08 AM: Attempting ruby version 2.6.2, read from environment 8:15:09 AM: Required ruby-2.6.2 is not installed - installing. 8:15:09 AM: Searching for binary rubies, this might take some time. 8:15:09 AM: Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/20.04/x86_64/ruby-2.6.2.tar.bz2 8:15:09 AM: Checking requirements for ubuntu. 8:15:10 AM: Requirements installation successful. 8:15:10 AM: ruby-2.6.2 - #configure 8:15:10 AM: ruby-2.6.2 - #download 8:15:10 AM: ruby-2.6.2 - #validate archive 8:15:14 AM: ruby-2.6.2 - #extract 8:15:16 AM: ruby-2.6.2 - #validate binary 8:15:16 AM: ruby-2.6.2 - #setup 8:15:17 AM: ruby-2.6.2 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.6.2@global 8:15:17 AM: ruby-2.6.2 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems........................................ 8:15:17 AM: ruby-2.6.2 - #generating global wrappers........ 8:15:17 AM: ruby-2.6.2 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.6.2 8:15:17 AM: ruby-2.6.2 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list 8:15:18 AM: ruby-2.6.2 - #generating default wrappers........ 8:15:18 AM: Using /opt/buildhome/.rvm/gems/ruby-2.6.2 8:15:18 AM: Using ruby version 2.6.2 8:15:19 AM: Using PHP version 8.0 8:15:19 AM: Started restoring cached yarn cache 8:15:19 AM: Finished restoring cached yarn cache 8:15:19 AM: Found yarn version (1.22.10) that doesn't match expected (1.22.17) up to date in 0.029s 8:15:19 AM: Installing yarn at version 1.22.17 8:15:19 AM: Installing Yarn! 8:15:19 AM: > Downloading tarball... 8:15:19 AM: [1/2]: https://yarnpkg.com/downloads/1.22.17/yarn-v1.22.17.tar.gz --> /tmp/yarn.tar.gz.MIk85Jybvv 8:15:19 AM: % Total % Received % Xferd Average Speed Time Time Time Current 8:15:19 AM: Dload Upload Total Spent Left Speed 8:15:20 AM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 8:15:20 AM: 100 81 100 81 0 0 642 0 --:--:-- --:--:-- --:--:-- 637 8:15:20 AM: 100 81 100 81 0 0 642 0 --:--:-- --:--:-- --:--:-- 637 8:15:20 AM: 100 94 100 94 0 0 396 0 --:--:-- --:--:-- --:--:-- 396 8:15:20 AM: 100 657 100 657 0 0 1938 0 --:--:-- --:--:-- --:--:-- 1938 8:15:20 AM: 100 1216k 100 1216k 0 0 2283k 0 --:--:-- --:--:-- --:--:-- 2283k 8:15:20 AM: [2/2]: https://yarnpkg.com/downloads/1.22.17/yarn-v1.22.17.tar.gz.asc --> /tmp/yarn.tar.gz.MIk85Jybvv.asc 8:15:20 AM: % Total % Received % Xferd Average Speed Time Time Time Current 8:15:20 AM: Dload Upload Total Spent Left Speed 8:15:20 AM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 8:15:20 AM: 100 85 100 85 0 0 1847 0 --:--:-- --:--:-- --:--:-- 1847 8:15:20 AM: 100 99 100 99 0 0 1523 0 --:--:-- --:--:-- --:--:-- 1523 8:15:20 AM: 100 661 100 661 0 0 5084 0 --:--:-- --:--:-- --:--:-- 5084 8:15:20 AM: 100 1028 100 1028 0 0 5617 0 --:--:-- --:--:-- --:--:-- 5617 8:15:20 AM: > Verifying integrity... 8:15:20 AM: gpg: Signature made Sat 16 Oct 2021 03:08:26 PM UTC 8:15:20 AM: gpg: using RSA key 6D98490C6F1ACDDD448E45954F77679369475BAA 8:15:20 AM: gpg: Good signature from "Yarn Packaging yarn@dan.cx" [unknown] 8:15:20 AM: gpg: WARNING: This key is not certified with a trusted signature! 8:15:20 AM: gpg: There is no indication that the signature belongs to the owner. 8:15:20 AM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310 8:15:20 AM: Subkey fingerprint: 6D98 490C 6F1A CDDD 448E 4595 4F77 6793 6947 5BAA 8:15:20 AM: > GPG signature looks good 8:15:20 AM: > Extracting to ~/.yarn... 8:15:20 AM: > Adding to $PATH... 8:15:21 AM: > Successfully installed Yarn 1.22.17! Please open another terminal where the yarn command will now be available. 8:15:21 AM: yarn workspaces detected 8:15:21 AM: Installing NPM modules using Yarn version 1.22.17

dan-mba commented 2 years ago

The Netlify builds are failing because copying packages from .yarn_cache is taking too long

Do you know the reasons why netlify is taking so long now?

Removing verbose from the yarn flags in netlify.toml might help the performance.

The yarn install on the github actions only takes 1 minute & it doesn't seem to be using cached dependencies.

hupe1980 commented 2 years ago

The Netlify builds are failing because copying packages from .yarn_cache is taking too long

Do you know the reasons why netlify is taking so long now?

Removing verbose from the yarn flags in netlify.toml might help the performance.

The yarn install on the github actions only takes 1 minute & it doesn't seem to be using cached dependencies.

Thx a lot. Removing verbose was the trick