-
Notifications
You must be signed in to change notification settings - Fork 585
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: use common TSConfig for clients #3145
Conversation
e67a95b
to
a8e0a43
Compare
Jest fails again with Out of Memory error 😕 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0xa1a640 node::Abort() [/usr/local/bin/node]
2: 0xa1aa4c node::OnFatalError(char const*, char const*) [/usr/local/bin/node]
3: 0xb9a68e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
4: 0xb9aa09 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
5: 0xd57c85 [/usr/local/bin/node]
6: 0xd58316 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [/usr/local/bin/node]
7: 0xd64bd5 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/bin/node]
8: 0xd65a85 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/bin/node]
9: 0xd6712f v8::internal::Heap::HandleGCRequest() [/usr/local/bin/node]
10: 0xd15b95 v8::internal::StackGuard::HandleInterrupts() [/usr/local/bin/node]
11: 0x1071236 v8::internal::Runtime_StackGuard(int, unsigned long*, v8::internal::Isolate*) [/usr/local/bin/node]
12: 0x140dcd9 [/usr/local/bin/node]
<--- Last few GCs --->
[29055:0x43d4f00] 120342 ms: Scavenge 2042.2 (2048.0) -> 2041.8 (2048.3) MB, 53.0 / 0.0 ms (average mu = 0.308, current mu = 0.336) allocation failure
[29055:0x43d4f00] 120530 ms: Scavenge 2042.5 (2048.3) -> 2042.1 (2048.5) MB, 64.0 / 0.0 ms (average mu = 0.308, current mu = 0.336) allocation failure
[29055:0x43d4f00] 120722 ms: Scavenge 2042.7 (2048.5) -> 2042.2 (2048.8) MB, 102.1 / 0.0 ms (average mu = 0.308, current mu = 0.336) allocation failure
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x140dcd9]
Security context: 0x072a87d808d1 <JSObject>
1: scanJsDocToken [0x3c6b20a962d1] [/codebuild/output/src279475912/src/github.com/aws/aws-sdk-js-v3/node_modules/typescript/lib/typescript.js:~11580] [pc=0x3feb5a134923](this=0x3c6b20a902f9 <Object map = 0x319cae06e019>)
2: /* anonymous */(aka /* anonymous */) [0x178f834c5979] [/codebuild/output/src279475912/src/github.com/aws/aws-sdk-js-v3/node_modules/t... Link: sdk-staging-test:21dcebac-cb7b-4e63-a93f-7f8b85d7fa38 |
OutOfMemory error is thrown even if jest unit tests are run sequentially $ node --expose-gc ./node_modules/.bin/jest --runInBand
RUNS private/aws-protocoltests-restjson/test/functional/restjson1.spec.ts
<--- Last few GCs --->
[18286:0x681a320] 61882 ms: Mark-sweep 4049.1 (4139.7) -> 4037.9 (4142.0) MB, 4962.3 / 0.0 ms (average mu = 0.245, current mu = 0.013) allocation failure scavenge might not succeed
[18286:0x681a320] 66635 ms: Mark-sweep 4054.1 (4142.2) -> 4041.1 (4145.2) MB, 4702.1 / 0.0 ms (average mu = 0.137, current mu = 0.011) allocation failure scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
1: 0xb02ec0 node::Abort() [node]
2: 0xa181fb node::FatalError(char const*, char const*) [node]
3: 0xced88e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xcedc07 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xea5ea5 [node]
6: 0xeb557d v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
7: 0xeb827e v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
8: 0xe796aa v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
9: 0x11f2e86 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
10: 0x15e7879 [node]
zsh: abort node --expose-gc ./node_modules/.bin/jest --runInBand |
Setting up isolatedModules to true also doesn't help. |
foreach parentDir ("clients" "private") for dir in ./$parentDir/*; do (cd "$dir" && sed -i 's/tsconfig.json/tsconfig.cjs.json/g' ./package.json); done for dir in ./$parentDir/*; do (cd "$dir" && mv tsconfig.json tsconfig.cjs.json); done end
foreach parentDir ("clients" "private") foreach tsConfigType ("cjs" "es" "types") for dir in ./$parentDir/*; do ( cd "$dir" cp ../../clients/client-accessanalyzer/tsconfig.$tsConfigType.json tsconfig.$tsConfigType.json ); done end end
Fixes build failure issues with mocha vs jest Refs: https://www.labeightyfour.com/2019/05/17/compiler-errors-with-mocha-and-typescript/
b0c3516
to
e08a528
Compare
Attempting to use |
Testing future attempts in #3149 |
Blog post for future reference to debug jest OutOfMemory error, if this issue is revisited |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Issue
Refs: #1307
Replaces: #3132
Description
Uses common TSConfig for all generated clients
Testing
CI
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.