-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: upgrade deps #169
Conversation
feat: add missing package lock updates
refactor: fn signature
There was a problem hiding this 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.
There was a problem hiding this 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
There was a problem hiding this 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:
- update helium deployer (a docker container) the aws batch job runs, in order to handle worker version detection and configuration, PR: https://github.com/thoughtindustries/iron-workers/pull/170
- update helium endpoint to use an environment specific config to reference aws batch job information, PR: https://github.com/thoughtindustries/ti/pull/8593
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.
- update helium endpoint to accept a new optional argument for worker version, this value will be passed to aws batch job, PR: https://github.com/thoughtindustries/ti/pull/8593
- update helium deployer (a docker container) the aws batch job runs, in order to handle different worker versions, PR: https://github.com/thoughtindustries/iron-workers/pull/170
- update helium cli deploy command to programmatically decide on the worker version and pass it to the helium endpoint
Did some sanity check on the deployment and added notes in PR for helium deployer. would appreciate any feedbacks/comments.
Closes CLM-6029