From 3e748460b1e87f81a8ce5ba876f91a23203c55b5 Mon Sep 17 00:00:00 2001 From: Engincan VESKE <43685404+EngincanV@users.noreply.github.com> Date: Thu, 10 Aug 2023 16:43:12 +0300 Subject: [PATCH 1/4] Create migration guide for v7.4 --- docs/en/Migration-Guides/Abp-7_4.md | 89 +++++++++++++++++++++++++++++ docs/en/Migration-Guides/Index.md | 1 + 2 files changed, 90 insertions(+) create mode 100644 docs/en/Migration-Guides/Abp-7_4.md diff --git a/docs/en/Migration-Guides/Abp-7_4.md b/docs/en/Migration-Guides/Abp-7_4.md new file mode 100644 index 0000000000..47f27fa059 --- /dev/null +++ b/docs/en/Migration-Guides/Abp-7_4.md @@ -0,0 +1,89 @@ +# ABP Version 7.4 Migration Guide + +This document is a guide for upgrading ABP v7.3 solutions to ABP v7.4. There are a few changes in this version that may affect your applications, please read it carefully and apply the necessary changes to your application. + +## Renamed `AddGlobalFilters<>` method as `FilterQueryable<>` in `IMongoDbRepositoryFilterer` + +ABP Framework provides services to automatically filter data on querying from a database. Prior to this version, creating a new class that derives from the `MongoDbRepositoryFilterer` and overriding its `AddGlobalFilters` method was needed for implementing a data filter for MongoDB. + +In this version, the `AddGlobalFilters` method renamed as `FilterQueryable`. Therefore, you need to update the method name if you have used data filtering for MongoDB, in your application. + +## Exposing Integration Services + +[Integration Services](../Integration-Services.md) are now not being exposed by default. Hiding integration services is useful because in a monolith application, integration services don't need to be exposed outside since the modules probably would be in-process communication with each other. Therefore, from this version on, the integration services will not be exposed as endpoints by default. + +If you build a microservice solution, or you need to access an integration service via a network call from any other application, you probably will need to expose the integration services, so the other applications can consume them. + +To expose integration services and controllers, you can configure the `AbpAspNetCoreMvcOptions` and set the `ExposeIntegrationServices` property as *true* in the `ConfigureServices` method of your [module class](../Module-Development-Basics.md): + +```csharp +Configure(options => +{ + options.ExposeIntegrationServices = true; +}); +``` + +## `LocalizationResource` removed from the `TemplateDefinition` class + +In this version, the `LocalizationResource` property (`Type`) removed from the `TemplateDefinition` class and instead the `LocalizationResourceName` property (`string`) has been added. + +## Changed method signature for `ICorrelationIdProvider.Get()` + +Prior to this version, `ICorrelationIdProvider.Get()` method was returning not nullable string that represents a *correlationId* (a unique key that used in distributed applications to trace requests accross multiple services/operations). With this version, now this method may return `null` if hasn't been generated by `AbpCorrelationIdMiddleware` before. + +```diff +public interface ICorrelationIdProvider +{ + +- [NotNull] string Get(); ++ string? Get(); + + //other methods + +} +``` + +Therefore, if you used this method in your application, you might want to make a null check for the method result. + +> See [#16795](https://github.com/abpframework/abp/pull/16795) for more information. + +## Dynamic Setting Store - Setting Management Module + +In this version, ABP Framework introduces Dynamic Setting Store, which is an important feature that allow us to collect and get all setting definitions from a single point. This feature requires some actions that need to be taken care of as in the following: + +* You need to create a new migration and apply it to your database because a new database table has been added. +* `ISettingDefinitionManager`'s sync methods have been removed and instead asynchrounus versions of the existing methods have been added. + +```diff +public interface ISettingDefinitionManager +{ +- SettingDefinition Get([NotNull] string name); ++ Task GetAsync([NotNull] string name); + +- IReadOnlyList GetAll(); ++ Task> GetAllAsync(); + +- SettingDefinition? GetOrNull(string name); ++ Task GetOrNullAsync([NotNull] string name); +} +``` + +## `IdentityUserIntegrationService` - Identity Module + +In this version, ABP Framework introduces the `IdentityUserIntegrationService`, which is designed to get current user's information such as his/her role names within a non-authorized integration service. This was need to prevent multiple calls to both permission and identity microservices, to be able to use the remote identity service. + +> For more information see the related PR: [#16962](https://github.com/abpframework/abp/pull/16962) + +This is a breaking change for microservice solutions because of the following two reasons and it should be cared: + +* `IdentityUserIntegrationService` provides non-authorized services. This is not breaking the application, but should be taken care of. Since, everyone can use the service to retrieve some informations for a certain user (for example, role names of a user). +* Secondly, since integration services are not exposed by default anymore as explained in the *Exposing Integration Services* section above, you should explicitly enable exposing integration services. Otherwise, the operation will be failed and you get a `404` error from the identity microservice. + +To expose integration services and controllers, you can configure the `AbpAspNetCoreMvcOptions` and set the `ExposeIntegrationServices` property as *true* in the `ConfigureServices` method of your [module class](../Module-Development-Basics.md): + +```csharp +Configure(options => +{ + options.ExposeIntegrationServices = true; +}); +``` \ No newline at end of file diff --git a/docs/en/Migration-Guides/Index.md b/docs/en/Migration-Guides/Index.md index c87004cfb5..88a2087ba0 100644 --- a/docs/en/Migration-Guides/Index.md +++ b/docs/en/Migration-Guides/Index.md @@ -2,6 +2,7 @@ The following documents explain how to migrate your existing ABP applications. We write migration documents only if you need to take an action while upgrading your solution. Otherwise, you can easily upgrade your solution using the [abp update command](../Upgrading.md). +- [7.3 to 7.4](Abp-7_4.md) - [7.2 to 7.3](Abp-7_3.md) - [7.1 to 7.2](Abp-7_2.md) - [7.0 to 7.1](Abp-7_1.md) From 7bba7cd36411efed30d4a392a15870526cc80e03 Mon Sep 17 00:00:00 2001 From: Engincan VESKE <43685404+EngincanV@users.noreply.github.com> Date: Thu, 10 Aug 2023 16:55:16 +0300 Subject: [PATCH 2/4] Update Abp-7_4.md --- docs/en/Migration-Guides/Abp-7_4.md | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/docs/en/Migration-Guides/Abp-7_4.md b/docs/en/Migration-Guides/Abp-7_4.md index 47f27fa059..1c3bc0fe8c 100644 --- a/docs/en/Migration-Guides/Abp-7_4.md +++ b/docs/en/Migration-Guides/Abp-7_4.md @@ -4,13 +4,13 @@ This document is a guide for upgrading ABP v7.3 solutions to ABP v7.4. There are ## Renamed `AddGlobalFilters<>` method as `FilterQueryable<>` in `IMongoDbRepositoryFilterer` -ABP Framework provides services to automatically filter data on querying from a database. Prior to this version, creating a new class that derives from the `MongoDbRepositoryFilterer` and overriding its `AddGlobalFilters` method was needed for implementing a data filter for MongoDB. +ABP Framework provides services to automatically filter data on querying from a database. Prior to this version, creating a new class that derives from the `MongoDbRepositoryFilterer` and overriding its `AddGlobalFilters` method was needed for implementing a data filter for [MongoDB](../MongoDB.md). -In this version, the `AddGlobalFilters` method renamed as `FilterQueryable`. Therefore, you need to update the method name if you have used data filtering for MongoDB, in your application. +In this version, the `AddGlobalFilters<>` method is renamed as `FilterQueryable<>`. Therefore, you need to update the method name if you have used data filtering for MongoDB, in your application. ## Exposing Integration Services -[Integration Services](../Integration-Services.md) are now not being exposed by default. Hiding integration services is useful because in a monolith application, integration services don't need to be exposed outside since the modules probably would be in-process communication with each other. Therefore, from this version on, the integration services will not be exposed as endpoints by default. +[Integration Services](../Integration-Services.md) are now not being exposed by default. In a monolith application, integration services don't need to be exposed outside since the modules probably would be in-process communication with each other. Therefore, from this version on, the integration services will not be exposed as endpoints by default. If you build a microservice solution, or you need to access an integration service via a network call from any other application, you probably will need to expose the integration services, so the other applications can consume them. @@ -23,13 +23,18 @@ Configure(options => }); ``` -## `LocalizationResource` removed from the `TemplateDefinition` class +## `LocalizationResource` property removed from the `TemplateDefinition` class -In this version, the `LocalizationResource` property (`Type`) removed from the `TemplateDefinition` class and instead the `LocalizationResourceName` property (`string`) has been added. +In this version, the `LocalizationResource` property was removed from the `TemplateDefinition` class and instead the `LocalizationResourceName` property has been added. + +```diff +- public Type LocalizationResource { get; set; } ++ public string LocalizationResourceName { get; set; } +``` ## Changed method signature for `ICorrelationIdProvider.Get()` -Prior to this version, `ICorrelationIdProvider.Get()` method was returning not nullable string that represents a *correlationId* (a unique key that used in distributed applications to trace requests accross multiple services/operations). With this version, now this method may return `null` if hasn't been generated by `AbpCorrelationIdMiddleware` before. +Prior to this version, `ICorrelationIdProvider.Get()` method was returning a not nullable string that represents a *correlationId* (a unique key that is used in distributed applications to trace requests across multiple services/operations). With this version, now this method may return `null` if hasn't been generated by `AbpCorrelationIdMiddleware` before. ```diff public interface ICorrelationIdProvider @@ -43,16 +48,16 @@ public interface ICorrelationIdProvider } ``` -Therefore, if you used this method in your application, you might want to make a null check for the method result. +Therefore, if you used this method in your application, you might want to make a null check and update the method signature where it's used. > See [#16795](https://github.com/abpframework/abp/pull/16795) for more information. ## Dynamic Setting Store - Setting Management Module -In this version, ABP Framework introduces Dynamic Setting Store, which is an important feature that allow us to collect and get all setting definitions from a single point. This feature requires some actions that need to be taken care of as in the following: +In this version, ABP Framework introduces Dynamic Setting Store, which is an important feature that allows us to collect and get all setting definitions from a single point. This feature requires some actions that need to be taken care of as the following: * You need to create a new migration and apply it to your database because a new database table has been added. -* `ISettingDefinitionManager`'s sync methods have been removed and instead asynchrounus versions of the existing methods have been added. +* `ISettingDefinitionManager`'s sync methods have been removed and instead, asynchronous versions of the existing methods have been added. ```diff public interface ISettingDefinitionManager @@ -70,13 +75,13 @@ public interface ISettingDefinitionManager ## `IdentityUserIntegrationService` - Identity Module -In this version, ABP Framework introduces the `IdentityUserIntegrationService`, which is designed to get current user's information such as his/her role names within a non-authorized integration service. This was need to prevent multiple calls to both permission and identity microservices, to be able to use the remote identity service. +In this version, ABP Framework introduces the `IdentityUserIntegrationService`, which is designed to get current user's information such as his/her role names within a non-authorized integration service. > For more information see the related PR: [#16962](https://github.com/abpframework/abp/pull/16962) -This is a breaking change for microservice solutions because of the following two reasons and it should be cared: +This is a breaking change for microservice solutions because of the following two reasons and it should be cared about: -* `IdentityUserIntegrationService` provides non-authorized services. This is not breaking the application, but should be taken care of. Since, everyone can use the service to retrieve some informations for a certain user (for example, role names of a user). +* `IdentityUserIntegrationService` provides non-authorized services. This is not breaking the application, but should be taken care of. Since, everyone can use the service to retrieve some information for a certain user (for example, the role names of a user). * Secondly, since integration services are not exposed by default anymore as explained in the *Exposing Integration Services* section above, you should explicitly enable exposing integration services. Otherwise, the operation will be failed and you get a `404` error from the identity microservice. To expose integration services and controllers, you can configure the `AbpAspNetCoreMvcOptions` and set the `ExposeIntegrationServices` property as *true* in the `ConfigureServices` method of your [module class](../Module-Development-Basics.md): From 2ef4f57237bbb7f8fa2050b67ca679a3563f0bdf Mon Sep 17 00:00:00 2001 From: Engincan VESKE Date: Thu, 10 Aug 2023 16:58:56 +0300 Subject: [PATCH 3/4] Update Abp-7_4.md --- docs/en/Migration-Guides/Abp-7_4.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/Migration-Guides/Abp-7_4.md b/docs/en/Migration-Guides/Abp-7_4.md index 1c3bc0fe8c..decd5bb424 100644 --- a/docs/en/Migration-Guides/Abp-7_4.md +++ b/docs/en/Migration-Guides/Abp-7_4.md @@ -10,7 +10,7 @@ In this version, the `AddGlobalFilters<>` method is renamed as `FilterQueryable< ## Exposing Integration Services -[Integration Services](../Integration-Services.md) are now not being exposed by default. In a monolith application, integration services don't need to be exposed outside since the modules probably would be in-process communication with each other. Therefore, from this version on, the integration services will not be exposed as endpoints by default. +[Integration Services](../Integration-Services.md) are now not being exposed by default. In a monolith application, integration services don't need to be exposed outside since the modules probably would be in-process communication with each other. Therefore, they don't need to be exposed for most of the time. If you build a microservice solution, or you need to access an integration service via a network call from any other application, you probably will need to expose the integration services, so the other applications can consume them. @@ -91,4 +91,4 @@ Configure(options => { options.ExposeIntegrationServices = true; }); -``` \ No newline at end of file +``` From 0291909450d520191659fde1902702e9d32fc838 Mon Sep 17 00:00:00 2001 From: Hamza Albreem <94292623+braim23@users.noreply.github.com> Date: Fri, 11 Aug 2023 11:13:58 +0300 Subject: [PATCH 4/4] Update Abp-7_4.md --- docs/en/Migration-Guides/Abp-7_4.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/en/Migration-Guides/Abp-7_4.md b/docs/en/Migration-Guides/Abp-7_4.md index decd5bb424..d34b891b66 100644 --- a/docs/en/Migration-Guides/Abp-7_4.md +++ b/docs/en/Migration-Guides/Abp-7_4.md @@ -2,7 +2,7 @@ This document is a guide for upgrading ABP v7.3 solutions to ABP v7.4. There are a few changes in this version that may affect your applications, please read it carefully and apply the necessary changes to your application. -## Renamed `AddGlobalFilters<>` method as `FilterQueryable<>` in `IMongoDbRepositoryFilterer` +## Renamed the `AddGlobalFilters<>` method as `FilterQueryable<>` in `IMongoDbRepositoryFilterer` ABP Framework provides services to automatically filter data on querying from a database. Prior to this version, creating a new class that derives from the `MongoDbRepositoryFilterer` and overriding its `AddGlobalFilters` method was needed for implementing a data filter for [MongoDB](../MongoDB.md). @@ -10,9 +10,9 @@ In this version, the `AddGlobalFilters<>` method is renamed as `FilterQueryable< ## Exposing Integration Services -[Integration Services](../Integration-Services.md) are now not being exposed by default. In a monolith application, integration services don't need to be exposed outside since the modules probably would be in-process communication with each other. Therefore, they don't need to be exposed for most of the time. +[Integration Services](../Integration-Services.md) are now not being exposed by default. In a monolith application, integration services don't need to be exposed outside since the modules would probably be in-process communication with each other. Therefore, they don't need to be exposed for most of the time. -If you build a microservice solution, or you need to access an integration service via a network call from any other application, you probably will need to expose the integration services, so the other applications can consume them. +If you build a microservice solution or you need to access an integration service via a network call from any other application, you will probably need to expose the integration services so the other applications can consume them. To expose integration services and controllers, you can configure the `AbpAspNetCoreMvcOptions` and set the `ExposeIntegrationServices` property as *true* in the `ConfigureServices` method of your [module class](../Module-Development-Basics.md): @@ -25,16 +25,16 @@ Configure(options => ## `LocalizationResource` property removed from the `TemplateDefinition` class -In this version, the `LocalizationResource` property was removed from the `TemplateDefinition` class and instead the `LocalizationResourceName` property has been added. +In this version, the `LocalizationResource` property was removed from the `TemplateDefinition` class and instead, the `LocalizationResourceName` property has been added. ```diff - public Type LocalizationResource { get; set; } + public string LocalizationResourceName { get; set; } ``` -## Changed method signature for `ICorrelationIdProvider.Get()` +## Changed the method signature for `ICorrelationIdProvider.Get()` -Prior to this version, `ICorrelationIdProvider.Get()` method was returning a not nullable string that represents a *correlationId* (a unique key that is used in distributed applications to trace requests across multiple services/operations). With this version, now this method may return `null` if hasn't been generated by `AbpCorrelationIdMiddleware` before. +Prior to this version, the `ICorrelationIdProvider.Get()` method used to return a non nullable string that represented a *correlationId* (a unique key that is used in distributed applications to trace requests across multiple services/operations). In this version, this method may return `null` if it hasn't been generated by `AbpCorrelationIdMiddleware` before. ```diff public interface ICorrelationIdProvider @@ -48,7 +48,7 @@ public interface ICorrelationIdProvider } ``` -Therefore, if you used this method in your application, you might want to make a null check and update the method signature where it's used. +Therefore, if you've used this method in your application, you might want to make a null check and update the method signature where it's used. > See [#16795](https://github.com/abpframework/abp/pull/16795) for more information. @@ -75,14 +75,14 @@ public interface ISettingDefinitionManager ## `IdentityUserIntegrationService` - Identity Module -In this version, ABP Framework introduces the `IdentityUserIntegrationService`, which is designed to get current user's information such as his/her role names within a non-authorized integration service. +In this version, ABP Framework introduces the `IdentityUserIntegrationService`, which is designed to get the current user's information, such as his/her role names within a non-authorized integration service. -> For more information see the related PR: [#16962](https://github.com/abpframework/abp/pull/16962) +> For more information, see the related PR: [#16962](https://github.com/abpframework/abp/pull/16962) -This is a breaking change for microservice solutions because of the following two reasons and it should be cared about: +This is a breaking change for microservice solutions because of the following two reasons and it should be considered: * `IdentityUserIntegrationService` provides non-authorized services. This is not breaking the application, but should be taken care of. Since, everyone can use the service to retrieve some information for a certain user (for example, the role names of a user). -* Secondly, since integration services are not exposed by default anymore as explained in the *Exposing Integration Services* section above, you should explicitly enable exposing integration services. Otherwise, the operation will be failed and you get a `404` error from the identity microservice. +* Secondly, since integration services are not exposed by default anymore as explained in the *Exposing Integration Services* section above, you should explicitly enable exposing integration services. Otherwise, the operation will fail and you'll get a `404` error from the identity microservice. To expose integration services and controllers, you can configure the `AbpAspNetCoreMvcOptions` and set the `ExposeIntegrationServices` property as *true* in the `ConfigureServices` method of your [module class](../Module-Development-Basics.md):