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

   ## Plain-language summary
   
   After a 3.0 to 4.0 migration, some items landed in the wrong tenant. 
Built-in definitions went to the site tenant and hid the improved 4.0 versions. 
Place data (geonames) went to the site tenant while Unomi reads it from system. 
User-created rules with the old systemscope scope were at risk of being shared. 
The step that fixes item ids also skipped camelCase types such as conditionType.
   
   This PR assigns each item to the right tenant and makes the id-fix step 
match camelCase types.
   
   ## What changed
   
   * Ship a list of definitions Unomi reloads at startup with the migrate 
command.
   * Put those definitions, and geonames, in the system tenant.
   * Keep user-created rules, segments, scorings and goals in the configured 
tenant even when their 3.0 scope is systemscope.
   * Only the literal scope system (not systemscope) still forces the system 
tenant for other types.
   * Fix the itemId update to match camelCase item types and log how many 
documents changed.
   
   ## Tests
   
   * Unit tests for the tenant decision (shipped condition, user systemscope 
content, geonames, profiles/events, forced default).
   * Integration tests: shipped list is present; each kind of systemitems 
document gets the right tenant; geonames go to system; camelCase itemType 
updates one document.
   
   ## 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.Migrate40TenantAssignmentIT` (4 
tests, 0 failures)
   
   ## Not in this PR
   
   * A full 3.0 snapshot restore in Pax Exam (see UNOMI-998).
   * End-to-end checks that totalNbOfVisits increases after a visit (needs 
UNOMI-998-style migrate coverage).
   
   ## References
   
   UNOMI-997


-- 
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