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

Update dependencies for Ruby 3.0 fixes #5640

Merged
merged 8 commits into from
Dec 1, 2021

Conversation

mitchellhenke
Copy link
Contributor

@mitchellhenke mitchellhenke commented Nov 24, 2021

CI finally passes with these changes on Ruby 3, but this PR does not include the upgrade to Ruby 3 just yet

@mitchellhenke mitchellhenke force-pushed the mitchellhenke/update-bootsnap branch 2 times, most recently from 686f0ba to 768aa3e Compare November 24, 2021 20:32
Comment on lines +9 to +12
# Fix sassc sometimes segfaulting
Rails.application.config.assets.configure do |env|
env.export_concurrent = false
end
Copy link
Contributor

Choose a reason for hiding this comment

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

!!!!!!!!! OMG

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hopefully works? 🤷🏼

Tried updating a bunch of dependencies to see if there was some weird Ruby 3 interaction with a library, but was getting constantly getting:

Randomized with seed 50006
.........................../home/circleci/identity-idp/vendor/bundle/ruby/3.0.0/gems/sassc-2.4.0/lib/sassc/engine.rb:43: [BUG] Segmentation fault at 0x0000000000000000
ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-linux]

Happened on 3.0.2 and 3.0.3, always on rack_attack_spec.rb and finally gave up and took a suggestion from rails/sprockets#633

Copy link
Contributor

Choose a reason for hiding this comment

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

I hit that segfault very often in local development I would love to see this land on main sooner

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately didn't work :|

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are also mentions of having the issue if both Rails.application.config.assets.precompile and app/assets/config/manifest.js are used, but we don't do that.

The other popular option is downgrading to sprockets 3.7.2, but that doesn't work for us since the 4.x line includes the keyword arguments fixes

@mitchellhenke mitchellhenke changed the title Update bootsnap for Ruby 3.0 fixes Update dependencies for Ruby 3.0 fixes Nov 24, 2021
@mitchellhenke mitchellhenke force-pushed the mitchellhenke/update-bootsnap branch 10 times, most recently from d2e531a to 9f79378 Compare November 30, 2021 16:14
Comment on lines +168 to +171
- tmp/cache/webpacker/last-compilation-digest-test
- tmp/cache/assets
Copy link
Contributor Author

@mitchellhenke mitchellhenke Nov 30, 2021

Choose a reason for hiding this comment

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

curiously, these lines make it pass (though the CI run itself does not end up being meaningfully faster)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's confusing because sassc shouldn't even really be attempting to run while CI is running specs since we precompile and then disable webpacker compile, but it must do some kind of check against the cache that is still able to segfault if this resolves it.

@mitchellhenke mitchellhenke force-pushed the mitchellhenke/update-bootsnap branch 2 times, most recently from d0967df to 0f48a78 Compare December 1, 2021 14:55
@mitchellhenke mitchellhenke marked this pull request as ready for review December 1, 2021 14:57
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

.ruby-version Outdated Show resolved Hide resolved
@mitchellhenke mitchellhenke merged commit 02d60d0 into main Dec 1, 2021
@mitchellhenke mitchellhenke deleted the mitchellhenke/update-bootsnap branch December 1, 2021 21:04
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.

2 participants