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

Fix webpacker thread safety #9203

Merged
merged 2 commits into from Apr 29, 2022

Conversation

ahukkanen
Copy link
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
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
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.

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.

None yet

4 participants