Closed ball-hayden closed 3 years ago
~https://github.com/actions/setup-ruby doesn't support Ruby 3 yet, so I can't add Ruby 3 to CI.~
The test failure (2.7, 5.2) appears to be a flake, but I can't see a way to re-run the check.
I can reproduce the flake with the specified seed (it passes with other seeds), but I can't trace the cause 😦
Hi @ball-hayden! We're using https://github.com/ruby/setup-ruby instead of https://github.com/actions/setup-ruby as it supports more versions (including Ruby 3.0), so it should be fine! Can you try adding the version?
@mrcasals Thanks for your review.
That's Ruby 3.0 running in CI, and a good job too - it caught a few other places 🙂. All updated now.
@mrcasals would you be able to take another look at this, please?
It would be great to see that patch merged and a new release of the gem. I'm running it on production, no issues so far. 👍🏻
Hi @ball-hayden I'm seeing some CI errors 😞 any idea what's going on?
The error there looks to be an intermittent flake - I can reproduce on master by running e.g.
TESTOPTS="--seed=7220" ACTIVE_MODEL_VERSION=5.2 bundle exec rake test
# or
TESTOPTS="--seed=50616" ACTIVE_MODEL_VERSION=5.2 bundle exec rake test
I did have a quick look to see if I could trace it, but I didn't get that far. I'd guess there's state that's leaking between tests?
I'll try rerunning the test suite!
Hi there! any news?
I'm afraid I haven't had a look into the test issues.
They are reproducible as described above - if you can find what's going on that would help move this PR forwards 🙂
I'm hopeful https://github.com/codegram/date_validator/pull/86 will fix the flakes we're seeing in CI. If that is mergeable I will rebase this branch and, hopefully, we'll be good to go with this PR ✅.
Hi @ball-hayden! I merged #86, can you rebase this one? 😄
🎉
@mrcasals would you mind having another look now this has passed CI?
Thanks, @ball-hayden and sorry for the delay on this!
Any chance of getting a new versioned release with this fix?
Sorry to bump @mrcasals, but is there any chance of a release please?
@mrcasals bump for interest
@dwightwatson @ball-hayden @ccdredzik new version just released! Check 0.11.0:
https://rubygems.org/gems/date_validator
Thanks for your patience!
✍️ Description
As of Rails 6.1,
ActiveRecord::Errors.add
spreads keyword arguments rather than accepting an options hash (https://api.rubyonrails.org/v6.1.0/classes/ActiveModel/Errors.html#method-i-add).In Ruby 3, there is no implicit cast between a last hash argument and explicit keyword arguments, causing argument errors:
✅ QA
Before requesting a review, please make sure that: