dubeejw commented on a change in pull request #3254: Preserve rule status when rule is updated URL: https://github.com/apache/incubator-openwhisk/pull/3254#discussion_r168009396
########## File path: core/controller/src/main/scala/whisk/core/controller/Rules.scala ########## @@ -85,11 +85,31 @@ trait WhiskRulesApi extends WhiskCollectionAPI with ReferencedEntities { val request = content.resolve(entityName.namespace) onComplete(entitlementProvider.check(user, Privilege.READ, referencedEntities(request))) { case Success(_) => - putEntity(WhiskRule, entityStore, entityName.toDocId, overwrite, update(request) _, () => { - create(request, entityName) - }, postProcess = Some { rule: WhiskRule => - completeAsRuleResponse(rule, Status.ACTIVE) - }) + putEntity( + WhiskRule, + entityStore, + entityName.toDocId, + overwrite, + update(request) _, + () => { + create(request, entityName) + }, + postProcess = Some { rule: WhiskRule => + if (overwrite == true) { Review comment: Fetch the rule status when an overwrite occurs. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services