markusthoemmes closed pull request #2638: Preserve rule status on update
according to #1840.
URL: https://github.com/apache/incubator-openwhisk/pull/2638
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/core/controller/src/main/scala/whisk/core/controller/Rules.scala
b/core/controller/src/main/scala/whisk/core/controller/Rules.scala
index be0e6ebcf4..df12b1aa71 100644
--- a/core/controller/src/main/scala/whisk/core/controller/Rules.scala
+++ b/core/controller/src/main/scala/whisk/core/controller/Rules.scala
@@ -295,7 +295,7 @@ trait WhiskRulesApi extends WhiskCollectionAPI with
ReferencedEntities {
WhiskTrigger.put(entityStore,
oldTrigger.removeRule(ruleName))
}
- val triggerLink = ReducedRule(actionName, Status.INACTIVE)
+ val triggerLink = ReducedRule(actionName,
getStatus(Option(newTrigger), ruleName))
val update = WhiskTrigger.put(entityStore,
newTrigger.addRule(ruleName, triggerLink))
Future.sequence(Seq(deleteOldLink.getOrElse(Future.successful(true)),
update)).map(_ => r)
}
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services