You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by "Jonathan Sinovassin-Naïk (Jira)" <ji...@apache.org> on 2023/03/14 13:24:00 UTC

[jira] [Resolved] (UNOMI-747) Migration can fail if some data set contains login events that doesn't have .source or .target

     [ https://issues.apache.org/jira/browse/UNOMI-747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Sinovassin-Naïk resolved UNOMI-747.
--------------------------------------------
    Resolution: Fixed

> Migration can fail if some data set contains login events that doesn't have .source or .target
> ----------------------------------------------------------------------------------------------
>
>                 Key: UNOMI-747
>                 URL: https://issues.apache.org/jira/browse/UNOMI-747
>             Project: Apache Unomi
>          Issue Type: Bug
>    Affects Versions: unomi-2.0.0
>            Reporter: Kevan Jahanshahi
>            Assignee: Jonathan Sinovassin-Naïk
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The migration to Unomi 2.0.0 can fail during event reindexation:
> {code:java}
> /* Handle login events */
> if ('login' == ctx._source.eventType) {
>     /* Look for empty scope */
>     if (ctx._source.scope == '') {
>          ctx._source.put('scope', 'systemsite');
>          ctx._source.source.put('scope', 'systemsite');
>          ctx._source.target.put('scope', 'systemsite');
>     }
> } {code}
> This piece of code is trying to set missing scope on login events.
> But some login event may not have source or target, and it will break the migration process. (UNOMI-644)
> Missing null check on:
>  * ctx._source.source
>  * ctx._source.target



--
This message was sent by Atlassian Jira
(v8.20.10#820010)