markusthoemmes closed pull request #3786: Fixes EntitlementProvider to use SpiLoader URL: https://github.com/apache/incubator-openwhisk/pull/3786
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/entitlement/Entitlement.scala b/core/controller/src/main/scala/whisk/core/entitlement/Entitlement.scala index eaf08e9f03..23007f323f 100644 --- a/core/controller/src/main/scala/whisk/core/entitlement/Entitlement.scala +++ b/core/controller/src/main/scala/whisk/core/entitlement/Entitlement.scala @@ -28,7 +28,6 @@ import akka.http.scaladsl.model.StatusCodes.TooManyRequests import whisk.core.entitlement.Privilege.ACTIVATE import whisk.core.entitlement.Privilege.REJECT import whisk.common.{Logging, TransactionId, UserEvents} -import whisk.connector.kafka.KafkaMessagingProvider import whisk.core.WhiskConfig import whisk.core.connector.{EventMessage, Metric} import whisk.core.controller.RejectRequest @@ -37,6 +36,8 @@ import whisk.core.loadBalancer.{LoadBalancer, ShardingContainerPoolBalancer} import whisk.http.ErrorResponse import whisk.http.Messages import whisk.http.Messages._ +import whisk.core.connector.MessagingProvider +import whisk.spi.SpiLoader package object types { type Entitlements = TrieMap[(Subject, String), Set[Privilege]] @@ -143,7 +144,8 @@ protected[core] abstract class EntitlementProvider( activationThrottleCalculator(config.actionInvokeConcurrentLimit.toInt, _.limits.concurrentInvocations), config.actionInvokeSystemOverloadLimit.toInt) - private val eventProducer = KafkaMessagingProvider.getProducer(this.config) + private val messagingProvider = SpiLoader.get[MessagingProvider] + private val eventProducer = messagingProvider.getProducer(this.config) /** * Grants a subject the right to access a resources. ---------------------------------------------------------------- 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