devise icon indicating copy to clipboard operation
devise copied to clipboard

Release Devise 5

Open runephilosof-abtion opened this issue 11 months ago • 4 comments

What is blocking the release?

CI testing for Rails 8?

runephilosof-abtion avatar Dec 04 '24 10:12 runephilosof-abtion

What is blocking the release?

CI testing for Rails 8?

i didnt undrestand well does it say 5 devices r active in my accounts ?

ghost avatar Dec 08 '24 14:12 ghost

I'd love a fresh release now that https://github.com/heartcombo/devise/issues/5705 is fixed!

epugh avatar Dec 16 '24 20:12 epugh

Could you please any of you cut a release supporting Rails 8? @nashby @carlosantoniodasilva @rafaelfranca

glaucocustodio avatar Jan 28 '25 14:01 glaucocustodio

@nashby @carlosantoniodasilva @rafaelfranca

Friendly bump on this (:

Thank you very much for maintaining this gem!

kieraneglin avatar Mar 12 '25 03:03 kieraneglin

Hi

fays3 avatar Jul 27 '25 08:07 fays3

Any updates on when a new release will come out? Even just a release for what is currently in main would be great!

rebeccafae avatar Oct 07 '25 22:10 rebeccafae

I was hoping to get some more "breaking" changes into this release before going for a v5 or something... but I guess it's been too long so what is there currently might have to do.

I am slowly getting back into things, need to cut a couple other releases (responders, simple form) before I get to devise, so please bear with me, but I hope to get a release out there soon.

carlosantoniodasilva avatar Oct 09 '25 20:10 carlosantoniodasilva

@carlosantoniodasilva maybe release 4.10 for now and keep 5.0 for those future breaking changes 😁

d4rky-pl avatar Oct 15 '25 07:10 d4rky-pl

@d4rky-pl I think the 4-x branch will be more work to get a build going again across all supported versions there and whatnot at this point tbh, but I might actually try that first. I am not sure I can really release main in its current state as 4.10 (need another look), but maybe it is fine: https://github.com/heartcombo/devise/blob/main/CHANGELOG.md#unreleased. Thanks.

carlosantoniodasilva avatar Oct 16 '25 12:10 carlosantoniodasilva

Anyone here using Devise main with Rails 8? Just wanted to get extra some confirmation that things are looking fine. (other than probably my own basic testing)

I'll likely release an "RC" version soon, just in case. Thanks!

carlosantoniodasilva avatar Oct 24 '25 12:10 carlosantoniodasilva

In a medium sized app on Rails 8 I just pointed at devise main and all was well. Suite passes, no warnings, etc.

I have a WIP Rails 8.1 branch on same app (still has other issues working out), and pointing at main from there was also ok, and cleared up a bunch of deprecation noise about keyword/hash style in routes declaration.

mjankowski avatar Oct 24 '25 13:10 mjankowski

@carlosantoniodasilva I'm currently upgrading from Rails 8.0 to 8.1 and noticed the deprecation warnings from devise (about the route params) so I gave the main branch a try as you said and it did fix the deprecation warnings but I got a new issue with Mongoid:

 NameError:
       undefined local variable or method `email_in_database' for an instance of User
     # /home/adrien/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/bundler/gems/devise-f150357c1ce0/lib/devise/orm.rb:17:in `devise_email_in_database'
     # /home/adrien/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/bundler/gems/devise-f150357c1ce0/lib/devise/models/confirmable.rb:265:in `postpone_email_change_until_confirmation_and_regenerate_confirmation_token'

With devise 4.9.4 I don't have the problem. After a quick investigation I noticed this is Mongoid only and coming from this change it seems: c8207373ea9da4021a30d913b50c473fb8bcc396 (cc @rafaelfranca) which removes the "old" ways of dealing with dirty attributes, except Mongoid even in the latest version (I tried with main) does not support the "new" ones apparently, it's still email_was in this instance.

I can see the readme and test suite of Devise still seems to support Mongoid though, so maybe I missed something. Or maybe this specific code path is not tested with Mongoid ? From what I can see so far, Mongoid still needs the "old" ways removed in c8207373ea9da4021a30d913b50c473fb8bcc396, maybe we should keep them conditionally if Mongoid ORM is detected? (instead of the ActiveRecord version condition).

Arguably Mongoid should adopt the new AR Dirty attribute methods I would say but that's another topic for the MongoDB team and even if they do now, most released version used in the wild for years will not support them.

I can help with this fix and testing if you can confirm my asumptions or suggest a better option.

jarthod avatar Oct 30 '25 13:10 jarthod

@jarthod thanks for giving main a try and reporting back. I'm glad to know things have been working with Mongoid so far, but I'm guessing it was a little bit of luck that it did.

I've been working on bringing back Mongoid testing / support on https://github.com/heartcombo/devise/pull/5568, it was meant to be merged sooner but I got side-tracked. I'm going to update that branch with main tomorrow (probably) and try to get it merged to main if it's all green again, before we release v5.

Update: which version of Mongoid are you using?

carlosantoniodasilva avatar Oct 30 '25 13:10 carlosantoniodasilva

@carlosantoniodasilva awesome thanks. Glad to see this is already in the pipe, and happy to hear it was working on luck all this time 😄 Do not hesitate then if you need an extra review or test of this branch, I've subscribed to #5568

I'm using the latest stable Mongoid (9.0.8) and also tried with the branch 9.0-stable which contains the next unreleased version (9.0.9 or 9.1.0) as it contains a required fix for Rails 8.1.

jarthod avatar Oct 30 '25 13:10 jarthod

@jarthod great, thanks. I just got that branch back to green against main and the latest versions of mongoid (I just pointed to their main for now), feel free to give it a try and report back if you run into any issues.

carlosantoniodasilva avatar Oct 30 '25 14:10 carlosantoniodasilva

@carlosantoniodasilva thanks for the quick update, I just tried the ca-mongoid branch and can confirm it works as expected in my application 👍 All test passing and most login flows tested manually. I just added a few comments in the PR.

jarthod avatar Oct 31 '25 13:10 jarthod

Anyone here using Devise main with Rails 8? Just wanted to get extra some confirmation that things are looking fine. (other than probably my own basic testing)

We've been on Devise main with Rails 8.1 for almost 2 months now, in production and with about 300k active users. Looks fine to us. 😊 PS: thanks for all the work and support!

thimo avatar Nov 06 '25 08:11 thimo

@thimo that's very reassuring, thank you! 💚

I just want to review some changes that have been merged to this 5-rc branch earlier, and haven't been added to main, before cutting a release.

carlosantoniodasilva avatar Nov 06 '25 11:11 carlosantoniodasilva