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 GH Workflows to have jruby. #391

Merged
merged 14 commits into from
Feb 17, 2021
Merged

Conversation

KonnorRogers
Copy link
Collaborator

@KonnorRogers KonnorRogers commented Feb 14, 2021

@headius this will not run against rails master currently because it require Ruby >= 2.7.0

@KonnorRogers KonnorRogers changed the title Patch 2 Update GH Workflows to have jruby. Feb 14, 2021
Copy link
Member

@joshuap joshuap left a comment

Choose a reason for hiding this comment

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

@ParamagicDev Ah, I believe the suite is failing because JRuby is running the spec:features suite, which doesn't include the rails_helper.rb fix.

Is it possible to exclude the spec:features suite for the JRuby run only? The other reason I had removed that suite in the JRuby workflow (bundle exec rake spec:units spec:integrations) is that the end-to-end CLI tests are waaaay slower on JRuby due to the cold starts, and I don't really care if they run there.

Edit: If that's not easy to do, I'm OK with keeping the JRuby workflow separate. Also, I wonder if having it separate helps to parallelize GH Actions at all.

@KonnorRogers
Copy link
Collaborator Author

@joshuap so basically only jobs can be parallelized. steps run in sequence and is why the parallelization isnt great. Unfortunately GH doesnt currently support using <<* syntax to inherit like in a typical yaml file and must be retyped everytime. It is also possible in the previous PR to use an if statement. Let me know if you would like this reverted back to the older action and just use an if statement for jruby. Parallelization clearly has tradeoffs in terms of readability here.

@KonnorRogers
Copy link
Collaborator Author

As evidenced by my many attempts here, couldn't figure out why this wasn't working. Turns out this is broken by Bundler 2.2.10

sidekiq/sidekiq#4815

https://mobile.twitter.com/getajobmike/status/1361372486604967940

Going to downgrade to 2.2.9 and lock the gem file until a fix lands.

Update jruby.yml with ruby/setup

Add jruby to pull request actions

tests: try with jruby-head

Add java back in.

change to 9.2.13.0

chore: Remove java

downgrade to 9.2.12.0

go back up to 9.2.14.0

Update rails_helper.rb

condense jruby into one workflow

Update ruby.yml

remove rails master for jruby.

Update ruby.yml

parallelize workflows

fix syntax errors

fix syntax errors

fix key issues

rebase from main

change the way sources are defined for rails main{

rewrite sources

fighting with sources

possible source fix?

Update Appraisals

Update Appraisals

Update Appraisals

reinstall gemfiles

fix for bundler 2.2.10

fix for bundler 2.2.10

fix for bundler 2.2.10

lock bundler to 2.2.9
@KonnorRogers
Copy link
Collaborator Author

KonnorRogers commented Feb 16, 2021

In other news, when switching to parallelized jobs, I noticed something interesting, the entire CI would complete in just about a minute if not for Rails master.

Everything else is either under 1 minute or just over a minute including Jruby!

Screen Shot 2021-02-16 at 12 00 55 AM Screen Shot 2021-02-16 at 12 00 46 AM

@joshuap
Copy link
Member

joshuap commented Feb 16, 2021

@ParamagicDev the current run on this PR is showing rails master completing in 1m on ruby 2.7, right? I'm OK with removing rails master from the build if it's a huge improvement, but we may be approaching diminishing returns here.

Does splitting out jobs like this really decrease the overall build time? 2m 38s is about the same as before.

image

@KonnorRogers
Copy link
Collaborator Author

@joshuap It appears we are hitting diminishing returns. I tried this workflow with separated jobs just to see what the time would be. Ill revert it back and check the changes. If anything we could also just split jruby into a seperate job if it takes too long when part of the same build process.

Copy link
Member

@joshuap joshuap left a comment

Choose a reason for hiding this comment

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

This seems to be as good as it gets (with GH Actions optimization). It seems like most of the extra time for JRuby builds is spent in bundle install. I reduced the number of builds (which had a negligible effect). In the future I might move the JRuby build to a periodic job or something, since it's mainly an integration test (we primarily care about full coverage on MRI).

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.

Fix JRuby GitHub Actions workflow
2 participants