Skip to content

Create pshopify2 for 4.0.2 to get fiber GC patch#78

Merged
rwstauner merged 2 commits intomainfrom
sts/4.0.x-pshopify2
Apr 1, 2026
Merged

Create pshopify2 for 4.0.2 to get fiber GC patch#78
rwstauner merged 2 commits intomainfrom
sts/4.0.x-pshopify2

Conversation

@zcei
Copy link
Copy Markdown
Contributor

@zcei zcei commented Mar 27, 2026

Why?

This patch from @samuel-williams-shopify unblocks work for Storefront. We want it to be available on 4.0.2 before the next release cycle.

Run GC if fiber pool expansion fails.
ruby/ruby#16535

Approach

  • Used @rwstauner's new Rake task to build the files. Worked like a charm! 🙇 Tiny whitespace fix is included because it renderer as "v4.0.2-pshopify2"autoconf which caused --branch v4.0.1-pshopify2autoconf in GH Action
  • Applied the patch only to 4.0.2, because 4.0.1 is anyways tracking the exact same changes, so Storefront will update from 4.0.1-pshopify1 to 4.0.2-pshopify2
  • Manually removed a line from the documented changeset. This is because the manual patch from 4.0.2-pshopify1 has landed on ruby/ruby's ruby_4_0 backport branch. The divergence between both branches caused the change Ensure fiber stack is freed in all cases, if the fiber is terminated. (#16416) to be included in the changelog again, even though 4.0.2-pshopify1 already has that fix.

@zcei zcei requested a review from a team as a code owner March 27, 2026 10:51
@rwstauner
Copy link
Copy Markdown
Contributor

Can we backport the desired commit first?

The backport branch for 4_0 has a good looking fix on it that these branches are now missing.
It creates more work for maintaining future pshopify versions when we diverge from the backport branch.

@zcei
Copy link
Copy Markdown
Contributor Author

zcei commented Mar 27, 2026

@rwstauner thanks for the headsup! I am new to our backport process and just tried to replicate the approach - wasn't aware that we re-start from a ruby/ruby branch. Will take this as the base, reapply patch & revert 4.0.2 on 4.0.1 👍

@rwstauner
Copy link
Copy Markdown
Contributor

There are times that we want custom shopify patches to be distributed to all shopify applications but that becomes difficult to maintain, and this isn't really one of those cases since the desired commit has already merged to ruby head.

@rwstauner
Copy link
Copy Markdown
Contributor

We should create the backport PR for ruby/ruby.

We should probably also just upgrade SFR to ruby 4.0.2 so we don't have to keep doing the "revert 4.0.2" on top of that branch.

@zcei zcei force-pushed the sts/4.0.x-pshopify2 branch from 0451d50 to 60b2991 Compare April 1, 2026 10:20
@zcei zcei changed the title Create pshopify2 for 4.0.1 and 4.0.2 to get fiber GC patch Create pshopify2 for 4.0.2 to get fiber GC patch Apr 1, 2026
@zcei
Copy link
Copy Markdown
Contributor Author

zcei commented Apr 1, 2026

@rwstauner branch updated to track latest ruby_4_0, only bumping 4.0.2 as discussed. Usage in SB can be found here https://github.com/Shopify/shopify-build/pull/8528

@rwstauner
Copy link
Copy Markdown
Contributor

Applied the patch only to 4.0.2, because 4.0.1 is anyways tracking the exact same changes, so Storefront will update from 4.0.1-pshopify1 to 4.0.2-pshopify2

This is not accurate. Currently both branches contain roughly the same code, however they are not linked in any way.

Currently we are still on 4.0.1, but we should be able to upgrade to 4.0.2 (I've started that process).

Copy link
Copy Markdown
Contributor

@rwstauner rwstauner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you.
I'm glad we got that other patch from John included here.

@rwstauner rwstauner merged commit e87994d into main Apr 1, 2026
10 checks passed
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

Successfully merging this pull request may close these issues.

3 participants