-
Notifications
You must be signed in to change notification settings - Fork 21
chore(javascript): split build task to avoid memory issue #383
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0748895
chore(javascript): split build task to avoid memory issue
eunjae-lee c123c63
Merge branch 'main' into chore/js-memory
eunjae-lee d0c4175
Update clients/algoliasearch-client-javascript/rollup.config.js
eunjae-lee 75d0e81
Merge branch 'main' into chore/js-memory
eunjae-lee f0f40b7
Merge branch 'main' into chore/js-memory
eunjae-lee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
clients/algoliasearch-client-javascript/scripts/build_all.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
yarn build utils | ||
|
||
PACKAGES_EXCEPT_FOR_UTILS=$(ls ./packages | grep -v -E "(client-common|requester-)") | ||
|
||
for CLIENT in $PACKAGES_EXCEPT_FOR_UTILS | ||
do | ||
SKIP_UTILS=true yarn build $CLIENT | ||
done |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
As I asked on slack, if this split part works, why don't we use a matrix? This way there's no conditional stuff added
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.
You mean stuff like
createMatrix
? It's because they won't be copied into the JS repo.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 just mean creating a GitHub matrix, so each jobs are run in parallel in their own runners
Uh oh!
There was an error while loading. Please reload this page.
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.
And part 2 of what I said on slack, runners are not shared with the JavaScript repository, which might also not help the memory limit as it runs on the default GH runners. (TBC)
compare https://github.com/algolia/api-clients-automation/settings/actions/runners to https://github.com/algolia/algoliasearch-client-javascript/settings/actions/runners
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.
only admin can see that page
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.
Eunjae can IIRC
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.
Okay, now I see what you mean by GitHub matrix. But how does it solve
this problem?
And since we split the build into many, we don't have memory issue any more. Maximum 2~300MB is enough now.
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 managed to make the CLI work as before so you can ignore my comment if you prefer going with the bash solution
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.
👍