Skip to content

Fix webpacker thread safety#9203

Merged
andreslucena merged 2 commits intodecidim:developfrom
mainio:fix/webpacker-thread-safety
Apr 29, 2022
Merged

Fix webpacker thread safety#9203
andreslucena merged 2 commits intodecidim:developfrom
mainio:fix/webpacker-thread-safety

Conversation

@ahukkanen
Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen commented Apr 28, 2022

🎩 What? Why?

We noticed at #8452 that Webpacker is not thread safe which is hopefully the last blocker for the Ruby 3 upgrade.

This should fix Webpacker thread safety according to the discussion and instructions at:
rails/webpacker#2801

There is a further fix for determining the full expanded paths inspired by this commit at Shakapacker:
shakacode/shakapacker@f2dc437

📌 Related Issues

Testing

  • Ruby 2.7: Run the introduced spec and see no warnings in console.
  • Ruby 3.0: Run the introduced spec and see no exceptions in the console

📋 Checklist

  • CONSIDER adding a unit test if your PR resolves an issue.
  • ✔️ DO check open PR's to avoid duplicates.
  • ✔️ DO keep pull requests small so they can be easily reviewed.
  • ✔️ DO build locally before pushing.
  • ✔️ DO make sure tests pass.
  • ✔️ DO make sure any new changes are documented in docs/.
  • ✔️ DO add and modify seeds if necessary.
  • ✔️ DO add CHANGELOG upgrade notes if required.
  • ✔️ DO add to GraphQL API if there are new public fields.
  • ✔️ DO add link to MetaDecidim if it's a new feature.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

@ahukkanen ahukkanen mentioned this pull request Apr 28, 2022
@ahukkanen ahukkanen added type: fix PRs that implement a fix for a bug module: core labels Apr 28, 2022
Copy link
Copy Markdown
Contributor

@microstudi microstudi left a comment

Choose a reason for hiding this comment

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

thanks Antti!

Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

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

👍🏽👍🏽👍🏽
I've tried the spec alone on develop and also on ruby-3.0 branches, on both it failed, except for one time when it passed.
Then I've checked this fix on both branches, on both it worked. Just to be extra sure, I've rerun it 50 times, as I had the flaky pass before. On all the 100 runs, it passed (OK/green).
I checked the admin's newsletter templates page on ruby-3.0 and it worked too.

@andreslucena andreslucena added target: developer-experience and removed type: fix PRs that implement a fix for a bug labels Apr 29, 2022
@andreslucena andreslucena merged commit ab75aeb into decidim:develop Apr 29, 2022
@ahukkanen ahukkanen deleted the fix/webpacker-thread-safety branch April 29, 2022 06:55
@alecslupu alecslupu added this to the 0.27.0 milestone Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants