sergehuber opened a new pull request, #908:
URL: https://github.com/apache/unomi/pull/908

   ## Plain-language summary
   
   The documented 3.0 to 4.0 migration runs from the Karaf shell before Unomi 
is started. At that point the index definitions live in bundles that are not 
started yet, so the command stopped with "no mapping found in bundles".
   
   A second stop happened on indices that have no bundled definition, such as 
cluster nodes and a Salesforce connector configuration. The migration now 
finishes on a real 3.0 data set: known types use the bundled 4.0 definitions 
(shipped with the migrate command), unknown types keep their current 
definition, and those documents stay in the configured tenant, not in "system".
   
   ## What changed
   
   * Copy the Elasticsearch and geonames index definitions into the migrate 
command bundle, so they are available at boot without starting Unomi.
   * Give cluster nodes a known definition.
   * If a bundled file is missing, copy the mapping currently stored on the 
index instead of stopping.
   * Assign cluster node documents and unknown indices to the configured tenant 
(default). Do not use "system", and do not leave them without a tenant.
   
   ## Tests
   
   * Unit tests for mapping lookup, copying a mapping from an index JSON body, 
and index name to type.
   * Integration tests: the cluster node mapping is in the migrate command 
bundle; an unknown index is reindexed with the 4.0 tenant script; both 
documents get the configured tenant, including one whose scope was "system".
   
   ## Test plan
   
   * `mvn -pl tools/shell-commands -am test -Dtest=MigrationUtilsTest 
-Dsurefire.failIfNoSpecifiedTests=false`
   * `./build.sh --skip-unit-tests --no-javadoc --integration-tests 
--single-test org.apache.unomi.itests.migration.Migrate40IndexMappingIT` (2 
tests, 0 failures; the script then starts a local Karaf and exits because 
`UNOMI_ROOT_PASSWORD` is not set, which is unrelated)
   
   ## Not in this PR
   
   * A full 3.0 snapshot restore in Pax Exam (see UNOMI-998).
   * Data that should stay in "system" vs the default tenant for rules and 
other system items (see UNOMI-997).
   
   ## References
   
   UNOMI-996


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to