You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by GitBox <gi...@apache.org> on 2021/03/17 12:23:40 UTC

[GitHub] [unomi] sergehuber commented on a change in pull request #264: UNOMI-444 redeploy the rules in case they are modified

sergehuber commented on a change in pull request #264:
URL: https://github.com/apache/unomi/pull/264#discussion_r595965634



##########
File path: services/src/main/java/org/apache/unomi/services/impl/rules/RulesServiceImpl.java
##########
@@ -142,13 +142,8 @@ private void loadPredefinedRules(BundleContext bundleContext) {
 
             try {
                 Rule rule = CustomObjectMapper.getObjectMapper().readValue(predefinedRuleURL, Rule.class);
-                // Register only if rule does not exist yet
-                if (getRule(rule.getMetadata().getId()) == null) {
-                    setRule(rule);
-                    logger.info("Predefined rule with id {} registered", rule.getMetadata().getId());
-                } else {
-                    logger.info("The predefined rule with id {} is already registered, this rule will be skipped", rule.getMetadata().getId());
-                }
+                setRule(rule);

Review comment:
       I think we should have a consistent behavior for all deployed objects (conditions, actions, value types, etc...). 




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org