Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gatsby v4 upgrade [Fixes #4271] #4324

Merged
merged 56 commits into from
Dec 7, 2021
Merged

Gatsby v4 upgrade [Fixes #4271] #4324

merged 56 commits into from
Dec 7, 2021

Conversation

wackerow
Copy link
Member

@wackerow wackerow commented Oct 27, 2021

Description

  • Upgrade codebase to use recently released Gatsby v4
  • Upgrade other project dependencies for compatibility (includes gatsby-plugin-image)
  • Update code base with new syntaxt for images to support gatsby-plugin-image
  • Test builds on forked Gatsby Cloud account -- Builds passing
  • Lambda function builds moved to public/functions for compatibility between Gatsby Cloud builds and Netlify serving
  • DevOps to set up EF account for Gatsby Cloud
  • Set up Gatsby Cloud to build all PR branches for dev branch (including dev)
  • Set up Gatsby Cloud to build our deploy PRs from dev into master, which will build final production build from master branch.
  • Set up Gatby Cloud account to host final production build of master branch using existing Netlify account.
  • Update to serve this build as ethereum.org

Related Issue

#4271

upgrades gatsby-plugin-sharp and gatsby-transformer-sharp
Removes PRESERVE_WEBPACK_CACHE from gatsby config per Gatsby logs: ("Those flags no longer have any effect and you can remove them from config")
@github-actions github-actions bot added content 🖋️ This involves copy additions or edits dependencies 📦 Changes related to project dependencies internal 🏠 tooling 🔧 Changes related to tooling of the project labels Oct 27, 2021
@pettinarip
Copy link
Member

@wackerow I've changed the config for gatsby-plugin-sitemap to support the newer version. The problem is the following:

I've used the default configs from the plugin. This means that the xmls files are located by default under the /sitemap folder.

  • Prev version: https://ethereum.org/sitemap.xml
  • Current version: https://ethereum.org/sitemap/sitemap-index.xml and https://ethereum.org/sitemap/sitemap-0.xml

Things to consider:

  • If we want to keep this new path, we need to make sure that the Google Search Console is reading this path.
  • We could do this:
options: {
    output: `/`, // the default value is `/sitemap`
    ...
}
  • This way, we could have the sitemap like this: https://ethereum.org/sitemap-index.xml and https://ethereum.org/sitemap-0.xml

@github-actions github-actions bot added the translation 🌍 This is related to our Translation Program label Nov 2, 2021
These parameters are ignored on Gatsby images marked as FULL_WIDTH, causing console warnings when left in.
This catch is not really an "error", as it is expected to occur on certain files and can default to returning true. Removing should help tech debt by reducing number of unhelpful errors/warnings in build log.
@wackerow wackerow marked this pull request as ready for review December 5, 2021 18:10
Fixes: The requested width "100px" for a resolutions field for the file /usr/src/app/www/src/assets/dev-tools/nftschool.png was larger than the actual image width of 90px! If possible, replace the current image with a larger one.
@@ -76,7 +80,6 @@ const checkIsMdxOutdated = (path) => {
intlMatch += match.replace(re, (_, p1, p2) => p1 + p2)
})
} catch {
console.error("regex error")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we still want this error log.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took this out after it was just producing a handful of non-specific errors in the build console. Will replace it with
console.error(`regex error in ${englishPath}`)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After chatting with @pettinarip decided to change this to a console.warn instead

@wackerow wackerow merged commit 2ff1c61 into dev Dec 7, 2021
@wackerow wackerow deleted the gatsby-v4 branch December 7, 2021 23:48
@wackerow wackerow mentioned this pull request Dec 8, 2021
@samajammin samajammin mentioned this pull request Dec 9, 2021
@samajammin samajammin mentioned this pull request Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content 🖋️ This involves copy additions or edits dependencies 📦 Changes related to project dependencies tooling 🔧 Changes related to tooling of the project translation 🌍 This is related to our Translation Program
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants