Kentico / xperience-by-kentico-kentico-migration-tool

A customizable tool that migrates older Kentico solutions to the latest version of Xperience by Kentico.
MIT License
6 stars 1 forks source link

Improve explanation of `XbKApiSettings` #184

Closed seangwright closed 2 months ago

seangwright commented 4 months ago

Brief bug description

The XbKApiSettings setting is explained in the documentation with the following description:

Configuration options set for the API when creating migrated objects in the target application.

The ConnectionStrings.CMSConnectionStringoption is required - set the connection string to the target Xperience by Kentico database (the same value as XbKConnectionString).

It's not clear why XbKConnectionString and XbKApiSettings would both be populated with the same value or what "Configuration options set for the API when creating migrated objects" means.

Repro steps

  1. Open Migration.Toolkit.CLI\README.md
  2. Read explanation of XbKApiSettings

Expected behavior

I understand the purpose of each option in the appsettings.json file and have no unnecessary duplicate values.

tkrch commented 4 months ago

@marcel-rbro can we look into this? The XbKApiSettings is section that contains XbyK API configuration same as standard web is. @seangwright setting XbKConnectionString was inroduced to avoid conflicts with standard Kentico API configuration, but it is possible that it outlived its purpose.

@tkrch revise XbKConnectionString use-case

DavidBKentico commented 4 months ago

I remember that this was a discussion point when we were putting together the initial migration toolkit docs.

I think the explanation was that the migration creates certain objects using DB queries directly, and some using the standard XbyK API (libraries added via NuGet packages)? So XbKConnectionString is for the direct DB connection, and XbKApiSettings are used to initialize the XbyK API running within the migration toolkit?

If this is still the case, and we can't (or don't want to) change how the values are used/shared, then I think it's pretty difficult and unnecessary to explain the "why" of it. The result is that the values need to match, and the docs already state this.

tkrch commented 4 months ago

@DavidBKentico you are right! In time i refactored most parts that needed separation, but left the configuration parameter.

i will look into if this setting is redundant or not, eventually will be removed in future versions.

tkrch commented 2 months ago

@seangwright i have deprecated XbKConnectionString, it can still be used, but it disappeared from docs and CMSConnectionString is now preferred way of configuring target instance connection string