[ 
https://issues.apache.org/jira/browse/UNOMI-1028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18134154#comment-18134154
 ] 

Serge Huber commented on UNOMI-1028:
------------------------------------

PR: https://github.com/apache/unomi/pull/933

Confirmed from CI Karaf logs (run 40358001149): the definitions scan started at 
07:00:58.490 on a Blueprint extender thread. plugins-base started at 
07:00:58.527 on the Karaf feature thread, during that scan, and none of its 
types were loaded. Two other CI runs dropped the graphql/cxs-impl and 
lists-extension types the same way, so the race happens more often than the 
nestedCondition failures alone show.

Fix: register the listener before the scan, and load each bundle at most once 
until it stops.

> Built-in condition and action types are sometimes not loaded at startup (mass 
> "ConditionType not found: nestedCondition")
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: UNOMI-1028
>                 URL: https://issues.apache.org/jira/browse/UNOMI-1028
>             Project: Apache Unomi
>          Issue Type: Bug
>    Affects Versions: unomi-4.0.0
>            Reporter: Serge Huber
>            Assignee: Serge Huber
>            Priority: Major
>             Fix For: unomi-4.0.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> h3. In short
> Occasionally Unomi starts without some of its built-in rule and segment 
> building blocks, so segments, rules and visitor tracking fail until a 
> restart. It also fails dozens of integration tests at random, blocking 
> unrelated changes.
> h3. Details
> * CI runs fail with dozens of "ConditionType not found: nestedCondition" 
> errors (PR 910: 49 of 55 failures; PR 928: 39+ in ContextServletIT, 
> SegmentIT, aliases); a plain re-run passes.
> * {{AbstractMultiTypeCachingService.postConstruct}} scans existing bundles 
> and only then registers its bundle listener. A plugin bundle (e.g. 
> {{plugins-base}}) that starts in between is neither scanned nor notified, so 
> its predefined types are never loaded. Signature: {{org.apache.unomi.services 
> ... is waiting for dependencies [PersistenceService]}} and only a few 
> "Predefined ConditionType registered" lines.
> h3. Fix and test
> Register the bundle listener before the scan, and ignore a bundle that is 
> already loaded. Unit-test a bundle that starts during the scan; the IT suites 
> must no longer show the error.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to