OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.43k stars 2.4k forks source link

Release 1.0 #7206

Closed agriffard closed 3 years ago

agriffard commented 4 years ago

Prepare the project

Do some housekeeping on GitHub in the main repo.

Prepare the code

Update the source so everything looks like on the new version.

Test the release

Make sure everything works all right.

Prepare and publish Orchard Core Translations

Update everything in the Translations project. Only do this once all the code changes are done since localized strings can change until then.

Prepare the documentation

Update the docs so they contain information about the new release so once the release is out you'll just need to point to new information.

Publish the release

Do the harder parts of making the release public. This should come after everything above is done.

Publicize the release

Let the whole world know about our shiny new release. Savor this part! These steps will make the release public so only do them once everything else is ready.

agriffard commented 4 years ago

We all know it always takes a long time between the moment we decide a Release and the actual Release itself. RC 2 was a good rehearsal to define the Release steps so lets make this 1.0 a great milestone.

Preliminary steps:

It is yet the best time to make changes that bring breaking changes. After the Release of 1.0, it will be a bit more difficult.

At some point, I think we will then have to "stop" merging new PRs (that are not necessary or fixing issues) until the release is done.

agriffard commented 4 years ago

I know that we ask a lot from the core contributors and that reviewing others's PRs is a tough work and responsability. If your are not comfortable with the process, please ask for help on specific issues.

People are not always aware of all the time it requires to do all this tasks but you can be sure that is really appreciated and that is one of the most valuable contributions to the project.

Thank you everyone for your work.

hishamco commented 4 years ago

Thanks @agriffard for starting this, regarding to me I can assist in the translations part, just few notes:

Hope to hear the feedback from others, thanks

ns8482e commented 4 years ago

Is OC 1.0.0 targeting .NET 5?

deanmarcussen commented 4 years ago

Is OC 1.0.0 targeting .NET 5?

I think that makes sense.

sebastienros commented 4 years ago

I think we should ship a version on 3.1 because it's LTS (@Skrypt reminded us) and later another one with 5.0. Some users might care about relying on a dotnet version that will be supported for a long time.

DrewBrasher commented 4 years ago

I'm still learning Orchard Core but I would like to help with the development. Are there any issues for release 1 that would be good for someone new to start with? I saw 1 labeled "good first issue" but it looked like it was already being worked on.

jptissot commented 4 years ago

I'm still learning Orchard Core but I would like to help with the development. Are there any issues for release 1 that would be good for someone new to start with? I saw 1 labeled "good first issue" but it looked like it was already being worked on.

Check the issues assigned to the 1.0 milestone: https://github.com/OrchardCMS/OrchardCore/issues?q=is%3Aopen+is%3Aissue+milestone%3A1.0

Piedone commented 4 years ago

I'd like to see Audit Trail (https://github.com/OrchardCMS/OrchardCore/pull/6679) included, but that's on us :|.

sheryever commented 3 years ago

I think version 1 should target netcore 3.1 because it has the LTS, .NET5 is not LTS.

It is mid December and we are waiting for release 1.0 to use in production, Is there any clue when will we receive or we can use the current master repo for production?

Piedone commented 3 years ago

The current master branch is the latest released version, i.e. RC2, and it's suitable for production use. You can use the current dev branch in production as well, which is the most up to date, and this is what a lot of people are doing too.

LMSSonos commented 3 years ago

@sheryever we are using orchard betas since multiple months in production and work stable. Upgrades have never been an issue

deanmarcussen commented 3 years ago

Migration release notes (to be included in any final document)

When migrating from RC2 to xxx please follow this procedure

For more information here are the details of the migrations involved

@agriffard I think that covers it for the most part.

sebastienros commented 3 years ago

Before merging release/1.0, we'll rename the master branch to main: #8085

thedrycake commented 3 years ago

When do you plan to release the version 1.0.0 (a non-prerelease) of OrchardCore.Localization.Core?

sebastienros commented 3 years ago

@thedrycake https://github.com/OrchardCMS/OrchardCore/issues?q=is%3Aopen+is%3Aissue+milestone%3A1.0

hung-doan commented 3 years ago

thanks you @sebastienros for the release. There are breaking changes

Also more features set in the release.

I wonder if we need any migration step/tool for the upgrading from the RC2 to v1.0.0 ?. or just upgrading the package is good enough ? Currently, I'm using the RC2 for the production page, so I'm considering if there is any risk after the upgrading.

hung-doan commented 3 years ago

Doing the upgrading from RC2 to v1.0.0. Here are a few breaking change that would impact to the migrations.

1/ OrchardCore.OpenId.Core: Migration issue in UpdateFrom7Async when using Microsoft SQL Server (not sure with others)

-- DROP THE EXISTING FOREIGN KEY ALTER TABLE [dbo].[OC_OpenIdApplicationIndex] DROP CONSTRAINT [OC_FK_OpenIdApplicationIndex] GO

-- ADD THE SAME 'KEY' NAME BACK IN AS A DUMMY CONSTRAINT ALTER TABLE [dbo].[OC_OpenIdApplicationIndex] ADD CONSTRAINT [OC_FK_OpenIdApplicationIndex] CHECK (DocumentId > 0) GO

/**

-- ADD THE SAME 'KEY' NAME BACK IN AS A DUMMY CONSTRAINT ALTER TABLE [dbo].[OC_OpenIdAppByRoleNameIndex_Document] ADD CONSTRAINT [OC_FK_OpenIdAppByRoleNameIndex_Document_DocumentId] CHECK (DocumentId > 0) GO

-- DROP THE EXISTING FOREIGN KEY ALTER TABLE [dbo].[OC_OpenIdAppByRoleNameIndex_Document] DROP CONSTRAINT [OC_FK_OpenIdAppByRoleNameIndex_Document_Id] GO

-- ADD THE SAME 'KEY' NAME BACK IN AS A DUMMY CONSTRAINT ALTER TABLE [dbo].[OC_OpenIdAppByRoleNameIndex_Document] ADD CONSTRAINT [OC_FK_OpenIdAppByRoleNameIndex_Document_Id] CHECK (DocumentId > 0) GO



**2. There are breaking changes in the sharp name, so that It would impact to the UI overriding.** 
In my case: 
- Contents_Button_Edit_SummaryAdmin.cshtml --(changed to)--> ContentsButtonEdit_SummaryAdmin.cshtml
- Contents_Button_Actions_SummaryAdmin.cshtml --(changed to)--> ContentsButtonActions_SummaryAdmin.cshtml

**3. Do not display Setup recipes in admin** 
- RC: Display Setup recipes in admin
- v1.0.0: Do not Display Setup recipes in admin
- Ref: Setup recipes in admin:  https://github.com/OrchardCMS/OrchardCore/pull/8417

**4. Base Admin theme: CSS identifiers are changed might impact to the CSS selector/overriding priorities**
- In v1.0.0 It introduce the dark theme. Which wrap the CSS selectors under `:root[data-theme='darkmode']` or `:root[data-theme='default']`

In my case, this more specific CSS selector cause some change in the CSS Specificity and impact to my CSS overriding rules . 
So that I have to review all my custom CSS to override the theme again.
hung-doan commented 3 years ago
  1. Value of ClaimTypes.NameIdentifier has been changed from User.Id to User.UserId Where:
    • User.Id:
    • Number
    • Is DocumentId
    • User.UserId
    • String
    • Autogenerated

It also changes how users are fetched from the DB via UserManager<IUser>

hung-doan commented 3 years ago

6/ User name is now only accept contain letters or digits. In RC

In v1.0

https://github.com/OrchardCMS/OrchardCore/blob/545b647a9b9e7af53eb67e3598647e14eedb3241/src/OrchardCore.Modules/OrchardCore.Users/Migrations.cs#L152-L170

See:

Skrypt commented 3 years ago

@hung-doan Can I ask you which version of SQL Server you are using? If it's under SQL Server 2016 these issues might happen because it doesn't support the syntax of the SQL queries we did. This is why we don't recommend using SQL Server < 2016.

hung-doan commented 3 years ago

@Skrypt I'm using : Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64) Sep 24 2019 13:48:23 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows 10 Pro 10.0 (Build 19043: )

Database is imported from Azure SQL Database with Combability level "130 - in SQL Server 2016" I changed the Combability level to SQL Server 2019. I still get the same error. image

Skrypt commented 3 years ago

One migration failed to execute and it seems to be one from the OrchardCore.Users module where it adds a UserId.

https://github.com/OrchardCMS/OrchardCore/blob/ce53b9a90e2ba329e9b0a039a298d489302edefe/src/OrchardCore.Modules/OrchardCore.Users/Migrations.cs#L154

Basically you need to execute everything starting from this migration. To do so you can set the migration value in the database to "6" so that it re-execute them. Look at your logs afterward to see if any error happened and report it here.

To see the migrations you need to execute this SQL Query :

SELECT * FROM Document WHERE [Type] = 'OrchardCore.Data.Migration.Records.DataMigrationRecord, OrchardCore.Data'

Set the value of OrchardCore.Users.Migrations to 6 :

UPDATE Document SET Content = REPLACE(content, '{"DataMigrationClass":"OrchardCore.Users.Migrations","Version":12}', '{"DataMigrationClass":"OrchardCore.Users.Migrations","Version":6}') 
WHERE [Type] = 'OrchardCore.Data.Migration.Records.DataMigrationRecord, OrchardCore.Data'

Backup your database first and restart Orchard Core so that it executes the migrations.

If it fails to create the Index tables because those already exists it might break the migrations to execute so you need to look at your logs to find what is blocking the migration from executing.

hung-doan commented 3 years ago

@Skrypt not sure it's the cause as my current migration version is just around 4

{"DataMigrationClass":"OrchardCore.Users.Migrations","Version":4}

All modules

{
    "Id": 1,
    "DataMigrations": [{
            "DataMigrationClass": "OrchardCore.Deployment.Migrations",
            "Version": 1
        }, {
            "DataMigrationClass": "OrchardCore.Liquid.Migrations",
            "Version": 1
        }, {
            "DataMigrationClass": "OrchardCore.ContentManagement.Records.Migrations",
            "Version": 5
        }, {
            "DataMigrationClass": "OrchardCore.Contents.Migrations",
            "Version": 1
        }, {
            "DataMigrationClass": "OrchardCore.ContentFields.Migrations",
            "Version": 2
        }, {
            "DataMigrationClass": "OrchardCore.Html.Migrations",
            "Version": 5
        }, {
            "DataMigrationClass": "OrchardCore.Indexing.Migrations",
            "Version": 1
        }, {
            "DataMigrationClass": "OrchardCore.Lists.Migrations",
            "Version": 2
        }, {
            "DataMigrationClass": "OrchardCore.Markdown.Migrations",
            "Version": 4
        }, {
            "DataMigrationClass": "OrchardCore.Media.Migrations",
            "Version": 1
        }, {
            "DataMigrationClass": "OrchardCore.Title.Migrations",
            "Version": 2
        }, {
            "DataMigrationClass": "OrchardCore.OpenId.YesSql.Migrations.OpenIdMigrations",
            "Version": 3
        }, {
            "DataMigrationClass": "OrchardCore.Users.Migrations",
            "Version": 4
        }
    ]
}

In my app the exception came from OrchardCore.OpenId.

2021-08-31 14:47:23.352 +07:00 [INF] Updating feature 'OrchardCore.Users'
2021-08-31 14:47:23.352 +07:00 [INF] Applying migration for 'OrchardCore.Users' from version 4.
2021-08-31 14:47:23.354 +07:00 [INF] Applying migration for 'OrchardCore.Users' from version 5.
2021-08-31 14:47:23.354 +07:00 [INF] Applying migration for 'OrchardCore.Users' from version 6.
2021-08-31 14:47:23.354 +07:00 [INF] Applying migration for 'OrchardCore.Users' from version 7.
2021-08-31 14:47:23.354 +07:00 [INF] Applying migration for 'OrchardCore.Users' from version 8.
2021-08-31 14:47:23.357 +07:00 [INF] Applying migration for 'OrchardCore.Users' from version 9.
2021-08-31 14:47:23.359 +07:00 [INF] Applying migration for 'OrchardCore.Users' from version 10.
2021-08-31 14:47:23.361 +07:00 [INF] Applying migration for 'OrchardCore.Users' from version 11.
2021-08-31 14:47:23.365 +07:00 [INF] Updating feature 'OrchardCore.Lists'
2021-08-31 14:47:23.365 +07:00 [INF] Updating feature 'OrchardCore.ContentTypes'
2021-08-31 14:47:23.365 +07:00 [INF] Applying migration for 'OrchardCore.Lists' from version 2.
2021-08-31 14:47:23.366 +07:00 [INF] Updating feature 'OrchardCore.OpenId'
2021-08-31 14:47:23.366 +07:00 [INF] Applying migration for 'OrchardCore.OpenId' from version 3.
2021-08-31 14:47:23.367 +07:00 [INF] Applying migration for 'OrchardCore.OpenId' from version 4.
2021-08-31 14:47:23.391 +07:00 [INF] Applying migration for 'OrchardCore.OpenId' from version 5.
2021-08-31 14:47:23.401 +07:00 [INF] Applying migration for 'OrchardCore.OpenId' from version 6.
2021-08-31 14:47:23.405 +07:00 [DBG] Creating described context for tenant 'Default'
2021-08-31 14:47:23.405 +07:00 [DBG] Composing blueprint
2021-08-31 14:47:23.468 +07:00 [DBG] Done composing blueprint
2021-08-31 14:47:23.600 +07:00 [INF] Applying migration for 'OrchardCore.OpenId' from version 7.
2021-08-31 14:47:52.150 +07:00 [ERR] Error while running migration version 7 for 'OrchardCore.OpenId'.
Microsoft.Data.SqlClient.SqlException (0x80131904): The DELETE statement conflicted with the REFERENCE constraint "OC_FK_OpenIdApplicationIndex". The conflict occurred in database "MyDb", table "dbo.OC_OpenIdApplicationIndex", column 'DocumentId'.
   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at Microsoft.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows)
   at Microsoft.Data.SqlClient.SqlDataReader.TryHasMoreResults(Boolean& moreResults)
   at Microsoft.Data.SqlClient.SqlDataReader.TryNextResult(Boolean& more)
   at Microsoft.Data.SqlClient.SqlDataReader.NextResult()
   at YesSql.Commands.CreateIndexCommand.<AddToBatch>b__6_0(DbDataReader dr)
   at YesSql.Commands.BatchCommand.ExecuteAsync(DbConnection connection, DbTransaction transaction, ISqlDialect dialect, ILogger logger)
   at YesSql.Session.FlushAsync()
   at YesSql.Session.FlushAsync()
   at OrchardCore.OpenId.YesSql.Migrations.OpenIdMigrations.UpdateFrom7Async()
   at OrchardCore.Data.Migration.DataMigrationManager.UpdateAsync(String featureId)
ClientConnectionId:0de48100-af6a-41e0-a158-a1bcd331655a
Error Number:547,State:0,Class:16
2021-08-31 14:47:52.164 +07:00 [DBG] Testing Azure Media Storage container cms existence
2021-08-31 14:47:52.390 +07:00 [DBG] Azure Media Storage container cms created.
2021-08-31 14:47:54.523 +07:00 [ERR] An unhandled exception has occurred while executing the request.
Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid column name 'UserId'.
Invalid column name 'IsLockoutEnabled'.
Invalid column name 'LockoutEndUtc'.
Invalid column name 'AccessFailedCount'.
Invalid column name 'UserId'.
Invalid column name 'IsLockoutEnabled'.
Invalid column name 'LockoutEndUtc'.
....

In my view, the errors are causes by this deletion https://github.com/OrchardCMS/OrchardCore/blob/e13cda97e036205ddb7c2fa1c655cc07385bbc2d/src/OrchardCore/OrchardCore.OpenId.Core/YesSql/Migrations/OpenIdMigrations.cs#L488-L496

The failure of this migration will prevents other migration to be executed and cause the error Invalid column name '****'