-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
8684: Merge 1.10.x into dev #8685
Conversation
This should ease Database issues, because it short circuits some code paths through aliases.
Prevent fetching the same table from the database 5+ times per request by loading it and saving it in a private property for a request.
On every page load on frontend we were querying for all existing layers to test for the ones that are currently active. Since that information is not bound to change often, we added a cache layer to prevent querying every time. The cache is evicted whenever a Layer gets updated.
The query for all published blogs is being called twice while building the admin menu, so we are memorizing its results.
Some textboxes were too small for the actual text users would generally write in them. Those meant to hold HTML have been converted to textareas.
* Process ignored paths while being aware of RequestUrlPrefix * Fix: I had moved a Trim to the wrong place * Fixed issue with empty/uninitialized null set of ignored urls
* Tokenized state for sort criteria * Tokenized state also in the other place where sort criteria are used
@sebastienros this fixes the possible NRE that would happen for absent models from merged #8393 (see your comment there #8393 (comment))
This is the same as reverting 1.10.x to commit 868ce12
* New version of Boolean Binder Provider * Use Convert.ToBoolean(string) rather than ValueProviderResult.ConvertTo(bool)
* Reverted changes to RunningShellTable and then changed the way shells are sorted, so we can correctly give "priority" to tenants based on their prefix. Added test adapter reference to Orchard.Framework.Tests so tests can be run in the latest VS 2017. Fixed a test that was failing to account for the order the shells were being processed. * Removed some stuff from csproj that vs had added
Moreover, this won't try to set a default value to the bool when it's not sent. This will allow calls with missing required parameters to fail as they should.
the .overlay is used for different things in MediaLibraryPickerField and Layouts, and as it was the styles would conflict. This should fix it.
This is on my todo-list to check |
A migration shoult not fail, or if this is expected then catch the exception and handle it correctly (I believe it's not the issue here) |
OK! There would be an exception or at least an inconsistency, because simply merging the code would cause one of the steps to be repeated or skipped. I think the solution here is to fork the logic within the affected steps by detecting what was already executed and run what wasn't. I'll dig in more and let you know if it's ready to review then! |
@BenedekFarkas and @sebastienros |
Yeah, that's what I was referring to by forking the logic, so the point here is that no matter which branch you were on, the correct steps should run based on some checks when you update to 1.11. We also need to make sure that minor branch migration changes are merged into dev ASAP, but we also need to cherry-pick migration steps in the other way around to avoid conflicts. But simply getting rid of the minor version branch after 1.11 might be easier. |
# Conflicts: # src/Orchard/Orchard.Framework.csproj
…teps in Core/Common/Migrations.cs
…urrent tenant (except for Default)
… logic Orchard.Core/Common
@sebastienros @MatteoPiovanelli-Laser @AndreaPiovanelliLaser Please see the changes at the bottom of https://github.com/OrchardCMS/Orchard/blob/issue/8684/src/Orchard.Web/Core/Common/Migrations.cs (last 3 update steps) and https://github.com/OrchardCMS/Orchard/blob/issue/8684/src/Orchard.Web/Modules/Orchard.Projections/Migrations.cs (last 2 update steps). I intentionally overengineered some parts of the code so it's easier to understand what's going on but the point here is that now it doesn't matter which version of 1.10.x you're upgrading from (to dev). All the necessary migration steps will be executed and the ones that have already been executed are detected and skipped. The logic to detect that an index or column already exists was inspired by
IMO all these helper functions (TableExists, IndexExists, ColumnExists) should be available in a central location - best would be if they were immediately available in any migration class. That can be achieved by modifying DataMigrationImpl and also the code that initializes the migration classes (so that ISessionFactoryHolder and ShellSettings are available):
What do you think? |
…conflicts between 1.10.x and dev
@MatteoPiovanelli-Laser @AndreaPiovanelli can you please check if you can upgrade to the latest commit on this branch? This is to test the resolved merge conflicts mentioned in the PR description. I'm done with my local testing that included upgrading from 1.10.x and and a client project running on 1.10.2. |
There's an issue with calling Requiring a new transaction with ReadUncommitted isolation level works in that case, but messing with transactions in migrations is a no-go, as it throws DataMigrationManager off in terms of tracking what steps were executed by not updating the corresponding DataMigrationRecord entry. I see these possible solutions:
@sebastienros what do you think? Option 5 seems like the least amount of headache to me. |
…e Core.Common and Projections migrations
I've implemented option 5 and tested the various upgrade scenarios with two different projects other than "synthetic" tests with Orchard itself. Looks like the most reliable solution to me and it's easy to set up the configuration to avoid the migration conflict, if necessary. |
#8684
❗❗❗ Don't squash-merge this PR here, instead, do a manual merge in the repository with a merge commit to provide continuous history from
1.10.x
todev
. ❗❗❗TODO: Review Migrations class changes where version numbers returned in 1.10.x and dev are in conflict: