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

🐛 Bug - "Gatsby Build" job is failing due to whitespace issues #1448

Closed
3 tasks done
babakamyljanovssw opened this issue Sep 11, 2024 · 6 comments
Closed
3 tasks done
Assignees

Comments

@babakamyljanovssw
Copy link
Member

babakamyljanovssw commented Sep 11, 2024

Cc: @bradystroud @JackDevAU

Hi Team,

The Gatsby Build job is failing on workflow runs and it is blocking deployments to Production, Staging, and PR merges.
After investigation with Brady, we have found the whitespace was causing failure on build.

Expected Behavior

Gatsby Build job runs

Tasks

  • Fix issue
  • This seems like a bug with Gatsby - Make an issue on Gatsby repo
  • Add logic that checks whitespace when creating category, and if there is any whitespace then trim them

Screenshots

Image
Figure: https://github.com/SSWConsulting/SSW.Rules/actions/workflows/build-deploy-production.yml

Thanks!

@babakamyljanovssw babakamyljanovssw added the Type: Bug A problem with existing functionality label Sep 11, 2024
@babakamyljanovssw
Copy link
Member Author

PR that fixes whitespace issue - SSWConsulting/SSW.Rules.Content#9142

@babakamyljanovssw babakamyljanovssw self-assigned this Sep 11, 2024
@bradystroud bradystroud removed the Type: Bug A problem with existing functionality label Sep 22, 2024
@bradystroud bradystroud changed the title 🐛 Bug - "Gatsby Build" job is failing on latest workflow runs 🐛 Bug - "Gatsby Build" job is failing due to whitespace issues Sep 30, 2024
@babakamyljanovssw
Copy link
Member Author

babakamyljanovssw commented Sep 30, 2024

cc: @adamcogan @bradystroud @Calinator444 @tkapa @wicksipedia @tiagov8

Hi Team,

This issue was closed as mistake.
I'm reopening the issue because we had problem with deployment where whitespaces in empty line was causing building gatsby.

It was same problem, so we don't need to add new tasks.

PRs that has fixed issue:
SSWConsulting/SSW.Rules.Content#9304
SSWConsulting/SSW.Rules.Content#9305

@babakamyljanovssw
Copy link
Member Author

Error message as it will not be retained in the workflow runs

<--- Last few GCs --->

[2729:0x74ed2f0] 64642 ms: Mark-Compact 4055.1 (4134.3) -> 4040.0 (4135.1) MB, 2818.76 / 0.00 ms (average mu = 0.112, current mu = 0.010) allocation failure; scavenge might not succeed
[2729:0x74ed2f0] 68470 ms: Mark-Compact 4055.8 (4135.1) -> 4041.7 (4136.8) MB, 3799.23 / 0.00 ms (average mu = 0.055, current mu = 0.008) allocation failure; scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

1: 0xb84bd6 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/opt/hostedtoolcache/node/20.12.0/x64/bin/node]
2: 0xefead0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/opt/hostedtoolcache/node/20.12.0/x64/bin/node]
3: 0xefedb7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/opt/hostedtoolcache/node/20.12.0/x64/bin/node]
4: 0x11107c5 [/opt/hostedtoolcache/node/20.12.0/x64/bin/node]
5: 0x1110d54 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [/opt/hostedtoolcache/node/20.12.0/x64/bin/node]
6: 0x1127c44 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) [/opt/hostedtoolcache/node/20.12.0/x64/bin/node]
7: 0x112845c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/opt/hostedtoolcache/node/20.12.0/x64/bin/node]
8: 0x10fe761 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/hostedtoolcache/node/20.12.0/x64/bin/node]
9: 0x10ff8f5 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/hostedtoolcache/node/20.12.0/x64/bin/node]
10: 0x10dcf46 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/opt/hostedtoolcache/node/20.12.0/x64/bin/node]
11: 0x1537cd6 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/opt/hostedtoolcache/node/20.12.0/x64/bin/node]
12: 0x7f0f886d9ef6
failed Building static HTML for pages - 143.621s
error Building static HTML failed

WebpackError:Worker exited before finishing task

Error: Process completed with exit code 1.

@babakamyljanovssw
Copy link
Member Author

Drafted PR for the 3rd task:
#1519

@babakamyljanovssw
Copy link
Member Author

babakamyljanovssw commented Oct 8, 2024

✅ Done - created Issue on gatsby repo - gatsbyjs/gatsby#39136
✅ Video - https://youtu.be/tfoEjDFW-U0

@Calinator444
Copy link
Member

Calinator444 commented Oct 31, 2024

CC: @bradystroud

I did some additional investigation:

The build issue only seems to occur with white lines that are only whit spaces. It's fine to have spaces at the end of your frontmatter fields.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants