Pomelo.entityframeworkcore.mysql: Upgrade to 2.2.0

Created on 8 Jan 2019  路  15Comments  路  Source: PomeloFoundation/Pomelo.EntityFrameworkCore.MySql

I have opened a branch for the 2.2.0 upgrade: f_upgrade_2.2.0

The commit e3d8d9df088a7b49f3a089e5507013edf3dc6b70 contains the upstream computed differences from 2.1.0 to 2.2.0 based off the SQL Server Driver, with SQL Server references renamed to MySQL. This commit is meant to be a general guide for classes that _may_ need to change as part of the upgrade. Note that some of these classes and methods do not apply to the MySQL driver.

In order to complete the upgrade, the actual Pomelo files will need to be compared with these reference files, and changes made where appropriate. Contributions are welcomed, I personally do not have much time to work on the upgrade. If you plan to work on the upgrade, please fork the f_upgrade_2.2.0 upgrade branch and open PRs back to it. Feel free to use this thread to comment on contributions.

Most helpful comment

@caleblloyd We discussed this as a team and decided on some concrete things we can do here to help:

Unfortunately we have a small team and an already overfull 3.0 milestone, which makes it hard to contribute more right now, especially given that the existing provider works with 2.2. However, as 3.0 gets closer, we do plan to spend some time helping this provider make changes for 3.0 such that we have a 3.0 story available for MySQL at around the 3.0 RTM time, or even for a 3.0 preview if the worlds align.

All 15 comments

@ajcvickers Would you be able to provide any assistance in this effort?

Hi, thanks for the initial steps on 2.2 version. What about the future of this project and the possibility of join to the .NET Foundation? It shouldn't be too complex to maintain by one of the EF Core team members and will definitely increase the popularity of EF Core by attracting MySQL users. I have always used this provider with the uncertainty that one day it will stop being updated.

What about the future of this project and the possibility of join to the .NET Foundation?

I applied back when #646 was opened and never heard anything back from them. Is there someone I can email to ask to look at the application?

/cc @divega for the .NET Foundation part. (Diego has been trying to get traction on this from inside Microsoft, but without any luck.)

@YandyZaldivar Being part of the .NET Foundation does not mean that Microsoft manages the package.

@caleblloyd With regard to contributions from the EF team, we'll discuss, but it may be more practical to focus our efforts on 3.0 where there are provider breaking changes.

Are there no provider breaking changes from 2.1.0 -> 2.2.0? If that's the case, we can just bump dependencies and see how it fairs with existing tests.

@caleblloyd We attempt to not break providers in minor version updates. @AndriySvyryd did some testing for this going from, we think, 2.0 to 2.1. Hopefully the existing provider still works with 2.2.

That being said:

  • Some provider APIs have been obsoleted. They should still work, but they'll be gone in 3.0. Making the switch sooner rather than later is better.
  • Some new features need provider updates to be fully functional. So while existing functionality in existing apps should not be broken, taking advantage of some newer features does require provider changes.

Something useful to do that shouldn't take too long is to update the TypeMappings to have protected override RelationalTypeMapping Clone(RelationalTypeMappingParameters parameters), other Clone overrides can be removed. Among other things this will allow to override some EF logic that causes https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/694

@ajcvickers Thanks for the clarification. My intention wasn't to relate the .NET Foundation topic with being maintained by Microsoft. Yet, since this project doesn't have a clear maintainer, our best (maybe only) choice is if you guys take hands on it.

I wonder if the guys from Microsoft @ajcvickers, @shanselman and @caleblloyd could help and arrange and record live/some YouTube coding session (1 - 2 hours), a guide how a community could maintain open source EF Core Providers like this and catch up with EF Core Upstream _(assuming the potential contributor is already familiar with c#, github, pull requests, ..)_. Including some coding on the current version. We do have this Call for Contributors https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/522 but not really instructions.

I like watching these sessions https://live.asp.net/ so if I saw some guidance, step by step instructions it could help the community to see how we can help in easier way. Obviously, the guys in Microsoft are busy with their bits but this one off video might help to get more contributors and more downloads?

@ajcvickers you know what you are doing, @caleblloyd you know what you are doing when you make upgrades, it might be helpful to see it recorded so other will follow?

Just a thought, maybe it will help other potential contributors, definitely I could see at least myself what gears you all are moving on :)

image

@caleblloyd We discussed this as a team and decided on some concrete things we can do here to help:

Unfortunately we have a small team and an already overfull 3.0 milestone, which makes it hard to contribute more right now, especially given that the existing provider works with 2.2. However, as 3.0 gets closer, we do plan to spend some time helping this provider make changes for 3.0 such that we have a 3.0 story available for MySQL at around the 3.0 RTM time, or even for a 3.0 preview if the worlds align.

EF Core is a very special and interesting piece of engineering work. The Microsoft team is small but extremely advanced and effective in their work. I have learned that it is best to follow their example by looking at the SQL Server code and adapting it with each major/minor release for MySQL to track as closely as possible.

This mostly entails studying the changes between releases and applying them to MySQL. As you can see from e3d8d9d, the work effort involves studying changes in thousands of lines of code each release and figuring out which changes apply to MySQL.

To become an effective core contributor in making updates to minor/major releases, there is 2 options. One is to track updates to upstream frequently and maintain a development branch that incorporates new updates frequently. The other is to wait for minor/major releases and make big updates all at once. Our provider has fallen into the latter camp, which is the practical method for the occasional contributor.

Since the Microsoft.AspNetCore.All ecosystem includes EF Core, anyone relying on our provider must wait for our provider to update to the latest release before upgrading. This creates a difficult situation for anyone depending on our provider, as they must wait for a contributor to integrate thousands of lines of changes before they can upgrade.

I do not know of a better solution than for us to find a contributor who can be more proactive with tracking changes to upstream. Until that happens, our users will need to be patient while we integrate changes at a pace that is reasonable for our occasional contributors.

@caleblloyd Thank you. This is actually very helpful to understand the process!!

I've opened #737 for the upgrade, it's still WIP

Going to try upgrading to Microsoft.EntityFrameworkCore.Relational to 2.2.0 while leaving the tests behind at 2.1.4.

2.2.0-preview1-final has been published

Please try it out and open bugs if you find them, will aim for another release in 10 days or so

2.2.0 has been published

Was this page helpful?
0 / 5 - 0 ratings