Skip to content

2.0 release? #543

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

Closed
botandrose opened this issue Apr 28, 2018 · 13 comments
Closed

2.0 release? #543

botandrose opened this issue Apr 28, 2018 · 13 comments

Comments

@botandrose
Copy link
Contributor

@etagwerker I took a look at your 2-0 branch, and some of the other associated repos. I agree that this is the direction needed to pull database_cleaner out of dependency hell, and get Appraisals for different versions of AR, etc.

Now that the test suite is looking a bit better, I was thinking about taking a stab at this. It's been two years since your 2-0 branch and new repo extractions, though, so I was considering starting from current master instead. What do you think? Should we rebase the 2-0 branch and repo extractions, or start fresh?

Also, I imagine some adapters won't make it to the 2.0 release. I feel like its a safe bet to drop support the mysql gem, for example. ActiveRecord 3.x can also probably be given the chop. Datamapper seems to be unmaintained, ROM is probably the replacement? Couch Potato and Moped haven't had updates in years, etc. Any opinions?

@etagwerker
Copy link
Member

etagwerker commented Apr 28, 2018

@botandrose hey, i'm glad that you agree and are interested in helping out with this much needed change for 2.0. (more here: #307)

https://github.com/DatabaseCleaner/database_cleaner/tree/2-0 is a branch that i started a long time ago and i don't know how hard it will be to rebase the changes we have added to master since then.

should we rebase the 2-0 branch and repo extractions, or start fresh?

i think you could give it a shot. it might be easier than you think. not much has changed since i opened that branch. mostly bug fixes in different adapters (and mostly connected to active-record.

Also, I imagine some adapters won't make it to the 2.0 release.

yes, that's a good idea. i know that some of the adapters are old and probably used only in legacy applications.

another idea i had before releasing 2.0 was to release a 1.99 version that has the usual deprecation warnings before a major release. similar to what they did with rspec back in the day: https://relishapp.com/rspec/rspec-core/v/2-99/docs/changelog

i have very limited time to work on this, but we could pair on this during the week. alternatively you could get started with https://github.com/DatabaseCleaner/database_cleaner/tree/2-0 and https://github.com/DatabaseCleaner/database_cleaner-active_record. both of them share common history with https://github.com/DatabaseCleaner/database_cleaner/tree/master

@botandrose
Copy link
Contributor Author

@etagwerker Okay, sounds great! I am glad you suggested cutting a 1.x deprecation release... I was thinking the same thing! I'm putting together an outline of what I'm thinking the road to 2.0 could look like, and will post it here for feedback, shortly.

@botandrose
Copy link
Contributor Author

botandrose commented May 2, 2018

1.9.0

  • Deprecate ORM autodetection

    • Clients will explicitly declare ORMs in Gemfile e.g. gem "database_cleaner-active_record", etc.
  • Deprecate API methods

    • DatabaseCleaner.[] - Split out into its own issue Improve DatabaseCleaner Configuration API #546

    • DatabaseCleaner.clean! - use .clean instead

    • DatabaseCleaner.clean_with! - use .clean_with instead

    • DatabaseCleaner::Base#clean! - use .clean instead

    • DatabaseCleaner.app_root= - Split out into its own issue Deprecate and remove DatabaseCleaner.app_root setting in v2.0? #555

    • DatabaseCleaner.init_cleaners - should have been private

    • DatabaseCleaner.add_cleaner - should have been private

    • DatabaseCleaner.connection - should have been private

    • DatabaseCleaner.remove_duplicates - should have been private

    • DatabaseCleaner.orm_module - should have been private

    • DatabaseCleaner::Base#set_strategy_db - should have been private

    • DatabaseCleaner::Base#create_strategy - should have been private

    • DatabaseCleaner::Base#<=> - should have been private

2.0.0

  • Release simultaneously with 1.9.0?

    • Pros: can tweak the two releases in tandem as we learn more from 2.0 development
    • Cons: might be nice for a longer deprecation period to get feedback from users
  • Remove deprecated code

  • Modernize supported Ruby versions

    • Remove Ruby 1 support
    • Remove Ruby 2.0, 2.1, and/or 2.2 support? All are EOL
    • Add Ruby 2.3, 2.4, and 2.5 support
  • Split all adapters into their own gems

    • Draw a clean line between adapters and base beyond just "inherit from DatabaseCleaner::Base"... plugin API?

    • Let each semver naturally, or start with v2.0?

    • Kill some legacy adapters

      • Old ActiveRecord

        • Mysql driver
        • 3.x
        • 4.x? It is EOL
      • DataMapper is unmaintained (superceded by ROM)

      • Mongo 1.x is unmaintained (superceded by Mongo 2.x)

      • MongoMapper appears unmaintained (last commit 2017)

      • Moped appears unmaintained (last commit 2016)

      • Couch Potato appears unmaintained (last commit 2016)

      • Ohm appears unmaintained (last commit 2016)

      • Projects still using these legacy ORMs can continue using DatabaseCleaner 1, or create their own DatabaseCleaner 2 adapter

      • Leaves us with

        • ActiveRecord
        • Mongoid
        • Sequel
        • Redis
        • Neo4j

@botandrose
Copy link
Contributor Author

@etagwerker Heya, just checking in. I'm going to be starting up some big projects in a few weeks, so my window of opportunity to put in some significant hours on this is starting to close. I've done some additional work on branches, but they're currently blocked on some of the open PRs. I know you're very busy, but if you wouldn't mind taking a look at those PRs, that would do a lot to unblock me here. Or, if you're not interested in going this direction with DatabaseCleaner, that's cool too... no hard feelings! Just let me know either way.

@etagwerker
Copy link
Member

@botandrose Hey, I just merged a bunch of pull requests. I have limited time for open source projects as well (parenting and billable projects take most of my time). What PR is blocking you?

It seems that your plan is similar to what I had in mind.

A couple of comments:

Ohm appears unmaintained

I'm not sure that matters so much. Some gems are minimal and require little (no?) maintenance. I think ohm is one of them.

The goal of dividing database_cleaner into sub-gems is to flesh out what we already have and look for maintainers/contributors for these gems.

For the projects that seem unmaintained, we could refactor the code and release it as is. If a user finds an issue with database_cleaner-ohm, I hope that they can file the issue there and maybe even submit a patch to it.

If you want to continue my work with database-cleaner_active-record or start your own version of it, please go ahead. I think that should be our top priority as it is the gem that will be most heavily used.

DataMapper is unmaintained

This one we can definitely drop.

Mongo 1.x is unmaintained

This one as well.

Release simultaneously with 1.9.0?

Yes, I think that's a good idea.

Let each semver naturally, or start with v2.0?

Let's start with v2.0.

database_cleaner v2.0 (core)

I'd like to keep the base gem as minimal as possible. What do you think we should keep here?

If it were up to me, I'd keep:

  • Safeguards
  • Template class/methods (if anyone wants to subclass DatabaseCleaner::Base we can use that class to guide them, telling them what methods need to be implemented)
  • Null strategy
  • Configuration
  • Loading code
  • Anything else?

@botandrose
Copy link
Contributor Author

Hey @etagwerker, thanks for the merges and feedback! This is all very helpful. I only have a minute here, so I'll be brief, but I'd like core to provide adapter gems with as much of a test suite as possible, and that work is blocked by #538. I'm also looking into supporting adapter gems in the 1.x series, so users can see the deprecation warnings, but also have a path to fixing them, all within the same release, and that is blocked by #549. Lastly, do you have any thoughts on #546? Thanks again for your time!

@ThomasKoppensteiner
Copy link

Any updates on the 2.0.0 release?
Maybe it is a good idea to create a Github "Project" do document the progress.

@botandrose
Copy link
Contributor Author

Hi @ThomasKoppensteiner! Thanks for your interest.

Right now it's pretty much all on me. I'm currently preparing a v1.8.0.beta release to make sure that v1.8.0 is the smooth transition release between v1.x and v2.0.0 that we want it to be. I'm hoping to get this beta release out this weekend, and then follow with full v1.8.0 release a week later if there are no issues. From there, v2.0.0 should not be far behind at all, because it's just a bunch of deletion!

@botandrose
Copy link
Contributor Author

Just released v1.8.0.beta for testing. More info here: https://groups.google.com/forum/#!topic/database_cleaner/YG-BX4zjWZQ

@botandrose
Copy link
Contributor Author

v1.8.0 is out! Working on v2.0.0.beta now.

@jrochkind
Copy link
Contributor

jrochkind commented Mar 3, 2021

I see 2.0.0 is out (so maybe this issue should be closed?) -- but I can't find any release notes anywhere, or an announcement.

Is there anywhere I can find a list of breaking and other changes? I assume a 2.0 major release involves some breaking changes?

@etagwerker
Copy link
Member

@jrochkind In theory nothing should break if you are using ActiveRecord, but things might break if you are using another ORM.

There are a few release notes over here: https://github.com/DatabaseCleaner/database_cleaner/blob/master/History.rdoc

@botandrose Do you think it is necessary to have an announcement post? It seems that http://databasecleaner.github.io has fallen out of date.

@jrochkind
Copy link
Contributor

jrochkind commented Mar 3, 2021

Ah perfect, thanks! I had somehow missed the History.rdoc, was looking for a CHANGES or CHANGELOG or something else in all caps! Amazing how one can miss what's right in front of them. Perfect.

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

No branches or pull requests

4 participants