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

feat: upgrade deps #169

Merged
merged 21 commits into from Jan 5, 2023
Merged

feat: upgrade deps #169

merged 21 commits into from Jan 5, 2023

Conversation

ljiang-ti
Copy link
Contributor

Closes CLM-6029

Copy link
Contributor Author

@ljiang-ti ljiang-ti left a comment

Choose a reason for hiding this comment

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

this is an initial draft of changes. Took most of the changes from cloud academy cognition branch, with some exceptions. I didn't copy all the changes related to course pages and react mdx layouts from cloud academy, thought these would be useful for future reference.

When running tests to verify the changes, ran into some issues which might relate to monorepo and module resolution. One of the major issues was about Invalid hook call. when loading a page that uses useQuery or useMutation hooks. For some reason, the @apollo/client is hoisted to the root and react v17 is installed at the root too. Since the template-base uses react v18 and detects react v17 at the root referenced by @apollo/client, it triggers the error. Went ahead and upgrade react as well in the monorepo.

the one remaining item is to update worker. captured some questions regarding the approach. please also see some comments inline for additional info.

packages/cart/package.json Outdated Show resolved Hide resolved
packages/cart/src/cart-modal.tsx Show resolved Hide resolved
package.json Show resolved Hide resolved
tooling/cli/package.json Show resolved Hide resolved
tooling/template-base/types.ts Show resolved Hide resolved
tooling/cli/package-lock.json Show resolved Hide resolved
tooling/helium-server/package.json Show resolved Hide resolved
tooling/helium-server/worker/index.js Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
Copy link
Contributor Author

@ljiang-ti ljiang-ti left a comment

Choose a reason for hiding this comment

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

some updates related to worker issue

tooling/template-base/package.json Outdated Show resolved Hide resolved
tooling/helium-server/package.json Outdated Show resolved Hide resolved
@ljiang-ti ljiang-ti marked this pull request as ready for review October 28, 2022 15:56
Copy link
Contributor Author

@ljiang-ti ljiang-ti left a comment

Choose a reason for hiding this comment

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

starting this new thread to discuss the deployment process and potential changes. it seem that the current deployment flow for the helium app is: run helium cli deploy script in helium app -> create archive for current helium app directory and upload to aws s3 -> sends request to helium endpoint to trigger aws batch job -> polls the aws batch job until it completes. The aws batch job downloads the archive from aws s3, then handles the cloudflare/wrangler configuration to publish.

Currently the aws batch job uses wrangler cli v1. Looks like we could use wrangler cli v2 with the major vite version upgrade (referring to vite-plugin-ssr's cloudflare example). Discussed with @rjschill87 that we could make the following changes to allow the deployment flow to support both major versions of wrangler cli:

For references only, we decided to use the current approach to simplify changes and maintenance for future iterations. Below was the earlier approach that would involve multiple services:

Click to expand earlier approach

Changes will involve passing through a worker version detected from helium cli to the helium deployer.

Did some sanity check on the deployment and added notes in PR for helium deployer. would appreciate any feedbacks/comments.

tooling/cli/lib/deploy.js Outdated Show resolved Hide resolved
@ljiang-ti ljiang-ti merged commit 4442f35 into staging Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants