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] Migration to v5 #4646

Merged
merged 43 commits into from
Oct 6, 2024

Conversation

randychilau
Copy link
Contributor

@randychilau randychilau commented Jul 27, 2023

Description

This PR migrates the site from Gatsby v4 to v5 which requires React v18.

Update 09/20/2023: The latest package.json changes from the master branch can be seen here.


Additional Plugins Added/Updated:

  • @fullcalendar/core: ^6.1.8
  • @fullcalendar/daygrid: ^6.1.8
  • @fullcalendar/google-calendar: ^6.0.2
  • @fullcalendar/interaction: ^6.0.1
  • @fullcalendar/react:^6.1.8
  • babel-preset-gatsby:3.11.0
  • dedent: 1.2.0
  • gatsby-plugin-feed: 5.11.0
  • gatsby-plugin-image: 3.11.0
  • gatsby-plugin-manifest: 5.11.0
  • gatsby-plugin-preload-fonts: 4.11.0
  • gatsby-plugin-robots-txt: 1.8.0
  • gatsby-plugin-sharp: 5.11.0
  • gatsby-plugin-sitemap: 6.11.0
  • gatsby-plugin-styled-components: 6.11.0
  • gatsby-redirect-from: 1.0.4
  • gatsby-source-filesystem: 5.11.0
  • gatsby-transformer-sharp: 5.11.0
  • gh-pages: 5.0.0
  • prism-react-renderer: 2.0.6
  • react-tabs: 6.0.2
  • react-tooltip: 5.18.1
  • rimraf: 5.0.1
  • styled-components: 6.0.5
  • swiper: 10.0.4

Plugins Removed (either not used as detected by depCheck or removed for redundancy with React 18 functionality):

  • @sideway/address
  • cytoscape-fcose
  • deepmerge
  • gatsby-plugin-loadable-components-ssr
  • joi
  • react-honeycomb
  • react-is
  • react-scroll
  • sharp

Notes for Reviewers
It is temporarily required to install with npm install --legacy-peer-deps due to incompatibility with mdxv1 (a separate PR to be merged if/when this PR is merged).

A Github Page hosted preview is availalble here.

For plugins removed, please notify me if there is missing functionality due to removal.

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
@l5io
Copy link
Contributor

l5io commented Jul 28, 2023

🚀 Preview for commit 3bb83a7 at: https://64c305f1234a480d8a3d2506--layer5.netlify.app

@Ghat0tkach
Copy link
Member

LGTM ,
I have tested and checked most of the components and there are no issues .
Thank you @randychilau

@randychilau
Copy link
Contributor Author

Hi @Ghat0tkach.

Thanks for taking the time to check the PR preview for issues, it is very much appreciated.

I have recently discovered some issues with this PR that will require some additional updates before it will be ready for merging.

Thanks again!

Cheers,
Randy

Signed-off-by: Randy Lau <randychilau@gmail.com>
@l5io
Copy link
Contributor

l5io commented Sep 11, 2023

🚀 Preview for commit dd155a7 at: https://64ff5c0861818b42499fdbbd--layer5.netlify.app

Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
@l5io
Copy link
Contributor

l5io commented Sep 20, 2023

🚀 Preview for commit dc7875f at: https://650b22944c2d9a1ac3944654--layer5.netlify.app

@leecalcote
Copy link
Member

@randychilau's efforts here are commendable. Just fantastic.

@Udit-takkar do you mind terribly to give this a final once-over?

@leecalcote
Copy link
Member

@Mohith234, noting the "Notes for Reviewers" section, are you able to checkout this branch build and run w/o issue?

Copy link
Member

@Mohith234 Mohith234 left a comment

Choose a reason for hiding this comment

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

@Mohith234, noting the "Notes for Reviewers" section, are you able to checkout this branch build and run w/o issue?

Yes, I was able to run w/o any issues, but just got some logs saying ERROR. Attaching a screenshot for reference below.

image

P.S. The site was running successfully

// @leecalcote @randychilau

@randychilau
Copy link
Contributor Author

Hi @Mohith234,

Thanks for taking the time to help on this PR and posting the screenshot.

The error message is related to outdated MDX packages. This issue is addressed in a separate PR #4585 (which is awaiting Gatsby v5 as discussed here).

Cheers,
Randy

@leecalcote
Copy link
Member

@VamshiReddy02, do you mind testing this PR as well?

Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
@l5io
Copy link
Contributor

l5io commented Sep 23, 2023

🚀 Preview for commit ef1e69a at: https://650e33da42629256d961bc1f--layer5.netlify.app

@VamshiReddy02
Copy link
Contributor

LGTM,
I have tested and checked the PR and there are no issues. Everything is fine.
The site was running successfully.
Screenshot 2023-09-23 at 1 35 04 PM

// @leecalcote @randychilau

@leecalcote
Copy link
Member

Thanks much for this, @VamshiReddy02! 👏

@Chadha93
Copy link
Member

@randychilau As mentioned here - Notes for Reviewers
It is temporarily required to install with npm install --legacy-peer-deps due to incompatibility with mdxv1 (a separate PR to be merged if/when this PR is merged). - You'll create another support PR for this, after this is merged, right?

@randychilau
Copy link
Contributor Author

Hi @Chadha93,

Thanks for your message.

Yes, if this PR is merged, I will then update PR #4585 (which includes upgrades to MDX v2 and MDX related packages, as well as changes for MDX v2 compatibility) and have it available for review the same day (hopefully).

Since merging this PR #4646 does require users to temporarily add the "--legacy-peer-deps" flag to install the package changes until PR #4585 merges, I am not sure what are the best practices to minimize confusion/disruption.

Should a couple of days/weekend be scheduled to try merging both PRs, should there be any messaging to the community? and what impact will this have on current PRs?

I defer to you, Lee, and the maintainers on what is best.

Cheers,
Randy

@Chadha93
Copy link
Member

Hi @randychilau,

Thanks for this descriptive response. This really helps.

Answering your question - Although, both of the PRs should be merged at the same time when ready, to avoid conflicts for contributors to install the package changes, if merging this PR, is strictly required before updating the other PR, then lets merge this and until then update our contributing.md file with the instruction to add "--legacy-peer-deps" flag.

In both of the cases, we are good.

Cheers,
Gaurav

Copy link

stale bot commented Mar 17, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the issue/stale Issue has not had any activity for an extended period of time label Mar 17, 2024
@stale stale bot removed the issue/stale Issue has not had any activity for an extended period of time label Jul 7, 2024
@Aviral0702
Copy link
Contributor

Hi, I am working on this PR to rebase it to the current master head. I have successfully rebased the Pull request and resolved the merge conflicts. After rebasing, on running make site to build the site I am getting some errors and warnings which I have listed below. Any guidance over these issues would be helpful to resolve them.

  1. Some GraphQL queries are taking more than 15s which indicates that they are unoptimized.

image

  1. no slug found in frontmatter or fields : Possible error in the gatsby-node.js file

After these warnings the site builds completely after taking too much time.

3)Then these warnings occur and then the process stops.
image

These warnings are probably due to some package version change.
Most likely gatsby-plugin-mdx as warning is shown that gatsby-plugin-mdx is compatible with gatsby@^4.0.0-next and Error is occuring for API.NODE.VALIDATION which is shown here.

image

After this the bundle builds successfully but took a lot of time.

image

@Aviral0702
Copy link
Contributor

Currently I am facing the following issues after pulling the latest changes from the master.

  1. The honeycomb structure on the integrations page and on the landing page is distorted.

Screenshot 2024-08-20 113756

Screenshot 2024-08-20 113502

  1. Gatsby-plugin-mdx@3.20.0 does not support gatsby v5.

  2. Pricing section has some issues with rendering.

@sudhanshutech sudhanshutech merged commit 87ca549 into layer5io:master Oct 6, 2024
10 checks passed
@CalebZoe CalebZoe mentioned this pull request Oct 7, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/blog New posts or new blog functionality area/careers area/ci area/community area/events area/handbook area/landscape The service mesh landscape area/learn Related to /learn section area/news A noteworthy article, event, happening area/projects An issue relating to Layer5 initiatives (projects) area/resources area/site-config issue/willfix project/kanvas
Development

Successfully merging this pull request may close these issues.