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

   This pull request refactors the feature installation and tracking logic in 
the `UnomiManagementServiceImpl` class to improve clarity and reliability. The 
changes primarily focus on renaming variables for better intent, ensuring 
features are only installed or started when appropriate, and making feature 
state transitions more robust.
   
   **Feature tracking and naming improvements:**
   
   * Renamed the `installedFeatures` and `startedFeatures` lists to 
`trackedInstalledFeatures` and `trackedStartedFeatures` for clearer intent and 
to avoid confusion with Karaf's internal feature tracking.
   
   **Feature installation and startup logic:**
   
   * Improved the feature installation process to check both Unomi's tracked 
features and Karaf's actual installed features, ensuring that features are only 
installed if not already present, and logging accordingly.
   * Adjusted the feature starting logic to track started features using the 
new `trackedStartedFeatures` list and to ensure features are only started if 
required.
   
   **Feature stopping and uninstalling:**
   
   * Updated the stopping and uninstalling logic to use the new tracking lists 
and to clear them appropriately after operations, ensuring accurate tracking of 
feature lifecycle. 
[[1]](diffhunk://#diff-2a396ce9776a71117a336e5b7a11d942a929d265a5d495dfce5f43365390d9caL273-R281)
 
[[2]](diffhunk://#diff-2a396ce9776a71117a336e5b7a11d942a929d265a5d495dfce5f43365390d9caL288-R298)
 
[[3]](diffhunk://#diff-2a396ce9776a71117a336e5b7a11d942a929d265a5d495dfce5f43365390d9caL304-R334)
   
   **Feature state transition safety:**
   
   * Enhanced the `startFeature` and `stopFeature` methods to check the current 
feature state before attempting to start or stop, preventing unnecessary state 
changes and potential errors.
   
    - [X] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   


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