Skip to content

CI: Rails 4+, Ruby 2.4+#3640

Merged
rmosolgo merged 9 commits intormosolgo:1.13-devfrom
camiloforero:ci-upgrade
Nov 19, 2021
Merged

CI: Rails 4+, Ruby 2.4+#3640
rmosolgo merged 9 commits intormosolgo:1.13-devfrom
camiloforero:ci-upgrade

Conversation

@camiloforero
Copy link
Copy Markdown
Contributor

@camiloforero camiloforero commented Oct 7, 2021

As per #3596, I opened a PR with the CI changes needed to support at a minimum

  • Ruby 2.4+
  • Rails 4+

And prepare the way to support the upcoming Rails 7.

I took the opportunity to make all the changes needed in all the parts of the CI system I could find, like removing RUBY_VERSION >= '2.4.0'conditionals, updating rubocop version, and removing some old string refinements that shouldn't be needed anymore.

Removing support from these very old Rails and Ruby versions should speed up development moving forward.

Rails 4 and Ruby 2.4 themselves are still somewhat old and both EOL, but support for those ones is kept for a while longer

This PR can stay open for a while, for people to discuss whether they still need those versions or not.

Personally, I find it hard to believe that there are still people out there who are still using the latest graphql-ruby version and always keeping it updated while still using Rails 3 or Ruby 2.2. I'd argue that changing from define based to Class based API back in 1.8, even with the migrator script, took a lot of effort, and anyone who can invest that effort can also invest the effort to keep their Ruby and Rails versions updated. Maybe I'm wrong on this, so let's see what other people have to say.

Also, it's not like GraphQL would stop working for them. Assuming this PR makes it to a 1.13 release, they'd still be able to use everything up to 1.12 and use later versions at their own risk, just like they are using unsupported Ruby and Rails versions that don't receive security fixes at their own risk, anyway.

Tests all worked on my local machine using the ruby versions specified in the ci.yaml

@camiloforero
Copy link
Copy Markdown
Contributor Author

camiloforero commented Oct 8, 2021

@rmosolgo looking at #3612, should I just go ahead and make Ruby 2.5 the minimum supported version?

@Frederik-Baetens
Copy link
Copy Markdown

https://www.ruby-lang.org/en/downloads/branches/

2.5 is eol. 2.6 is still supported. Wouldn't it make more sense to only support ruby versions that aren't EOL?

@rmosolgo
Copy link
Copy Markdown
Owner

Wouldn't it make more sense to only support ruby versions that aren't EOL?

In a perfect world, everyone would be running recent Ruby versions. But in practice, some people run old Ruby versions. I'd rather not boot anyone from GraphQL-Ruby if I can help it.

I'm open to dropping support for some old Ruby versions in 1.13.0, but I haven't put a lot of thought into it yet.

@rmosolgo rmosolgo changed the base branch from master to 1.13-dev November 17, 2021 21:40
@rmosolgo rmosolgo mentioned this pull request Nov 18, 2021
8 tasks
@rmosolgo
Copy link
Copy Markdown
Owner

Well, shoot. I wanted to remove the string refinement used in the lexer, but in order to rebuild it properly, I had to update Ragel. I added a benchmark task to make sure there wasn't a regression... but there was:

# Before, Ragel 7.0.0.9
Warming up --------------------------------------
scan - introspection   110.000  i/100ms
parse - introspection
                        82.000  i/100ms
    scan - fragments   191.000  i/100ms
   parse - fragments   132.000  i/100ms
    scan - big query    18.000  i/100ms
   parse - big query    13.000  i/100ms
Calculating -------------------------------------
scan - introspection      1.087k (± 3.5%) i/s -      5.500k in   5.068137s
parse - introspection
                        809.097  (± 2.1%) i/s -      4.100k in   5.069787s
    scan - fragments      1.882k (± 2.2%) i/s -      9.550k in   5.076049s
   parse - fragments      1.357k (± 1.5%) i/s -      6.864k in   5.061174s
    scan - big query    186.115  (± 2.1%) i/s -    936.000  in   5.031735s
   parse - big query    136.186  (± 3.7%) i/s -    689.000  in   5.066171s

   
# After, Ragel 7.0.4
Warming up --------------------------------------
scan - introspection    66.000  i/100ms
parse - introspection
                        52.000  i/100ms
    scan - fragments   109.000  i/100ms
   parse - fragments    87.000  i/100ms
    scan - big query    10.000  i/100ms
   parse - big query     7.000  i/100ms
Calculating -------------------------------------
scan - introspection    647.735  (± 2.0%) i/s -      3.300k in   5.096960s
parse - introspection
                        532.360  (± 2.3%) i/s -      2.704k in   5.081807s
    scan - fragments      1.048k (± 2.6%) i/s -      5.341k in   5.101512s
   parse - fragments    854.413  (± 2.2%) i/s -      4.350k in   5.093800s
    scan - big query    103.480  (± 1.9%) i/s -    520.000  in   5.026922s
   parse - big query     86.099  (± 3.5%) i/s -    434.000  in   5.049648s

So, I guess I don't want to update Ragel. I'll roll back that change and edit the generated file by hand 😖

@rmosolgo rmosolgo changed the title Ci upgrade CI: Rails 4+, Ruby 2.4+ Nov 19, 2021
@rmosolgo rmosolgo added this to the 1.13.0 milestone Nov 19, 2021
@rmosolgo rmosolgo merged commit fca3450 into rmosolgo:1.13-dev Nov 19, 2021
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