-
Notifications
You must be signed in to change notification settings - Fork 85
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
Uncover and Fix Cyclic Dependency, Version-Control Vercel Configs, Fix Turbo Graph. #2502
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2502 +/- ##
==========================================
- Coverage 56.29% 56.08% -0.21%
==========================================
Files 340 330 -10
Lines 26380 26624 +244
Branches 384 425 +41
==========================================
+ Hits 14850 14933 +83
- Misses 11529 11686 +157
- Partials 1 5 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
- [ ] modifies a **block** that will need publishing via GitHub action once merged | ||
- [ ] does not modify any publishable blocks or libraries, or modifications do not need publishing | ||
- [ ] I am unsure / need advice | ||
- [ ] **⚠️ This is a placeholder, please uncomment at least one of the lines following this one and then delete this. ⚠️** |
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.
I opted for this pattern to try and solve your personal bugbear, @CiaranMn, about the number of "incomplete tasks" that appear for given PRs. This way we should be able to make sure that every checkbox has been checked
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.
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.
omg yes, this was bothering me so much
apps/hash-frontend/vercel-install.sh
Outdated
#!/usr/bin/env bash | ||
|
||
# Setup TurboRepo and get a pruned src folder and lockfile | ||
|
||
echo "Installing turbo" | ||
yarn global add turbo | ||
|
||
# TODO: investigate why producing a pruned repo results in a broken Vercel build | ||
|
||
#echo "Producing pruned repo" | ||
#turbo prune --scope='@apps/hash-frontend' | ||
# | ||
#echo "Deleting contents of non-pruned dir to save space" | ||
#git ls-files -z | xargs -0 rm -f | ||
#git ls-tree --name-only -d -r -z HEAD | sort -rz | xargs -0 rm -rf | ||
# | ||
#echo "Moving pruned repo back to root" | ||
#mv out/* . | ||
#rm out -r | ||
|
||
# Install the pruned dependencies | ||
|
||
echo "Installing yarn dependencies" | ||
HUSKY=0 yarn install --frozen-lockfile --prefer-offline --force --build-from-source |
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.
The use for these files becomes a lot more apparent in #2493
db17779
to
e000177
Compare
7829450
to
aab103f
Compare
aab103f
to
14d4583
Compare
14d4583
to
ba31172
Compare
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.
GH fooled me, I wanted to add these comments individually
Co-authored-by: Ahmad Sattar <thehabbos007@gmail.com>
🌟 What is the purpose of this PR?
This fixes a number of issues uncovered within the repository while trying to get #2493 in.
There was a cyclic dependency between packages that share GraphQL types (
@apps/hash-api
,@local/hash-graphql-shared
, etc.). This was largely hidden because they were within GraphQL configs, and relied on the file-system, which meant that the dependencies were not within thepackage.json
and not visible to turborepo.turbo prune
The configuration for our Vercel deployments was managed purely through Vercel's UI. This means that the configuration (such as build commands) was not version-controlled, and importantly it is shared between all new deployments. Thus, if a PR requires a change to the configuration, that change will break all other in-flight PRs.
vercel.json
in the individual projects. Thisvercel.json
works because the root directory is set within the project configurationhash-frontend
, additional shell scripts have been added in preparation of requiring some more complicated setup, including installing Python on the Vercel machine.Requirements were missing from the README such as
Python
andJava
The changes introduced in Introduce the block design system #2362 accidentally missed some required updates to the Turbo graph. These have been fixed in this PR, and:
The Pull Request template has been updated (to this one) to result in an updated checklist of things to look at pre-merge, which now includes a section on Turborepo.
🔗 Related links
🚫 Blocked by
N/A
🔍 What does this change?
Please see commits.
Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
turbo.json
's have been updated to reflect this.pack
files that persist across runs instead of being overridden. This means we can have well over 8GB of disk being used up which results in failed deployments. This can be mitigated by manually redeploying the Vercel deployment through the UI and choosing not to re-use the cache. - Slack Thread (internal)turbo prune
within the Vercel build results in an internal server error. This is probably due to us deleting some of Vercel's files that they are putting in the same root directory as the source code. The attempt at using git to remove only git tracked files did not seem to work.🐾 Next steps
turbo prune
does not work for Vercel🛡 What tests cover this?
❓ How to test this?
📹 Demo
This PR