rabbah commented on a change in pull request #4122: Protect Package Bindings from containing circular references URL: https://github.com/apache/incubator-openwhisk/pull/4122#discussion_r237191013
########## File path: core/controller/src/main/scala/org/apache/openwhisk/core/controller/Packages.scala ########## @@ -299,9 +299,14 @@ trait WhiskPackagesApi extends WhiskCollectionAPI with ReferencedEntities { case b: Binding => val docid = b.fullyQualifiedName.toDocId logging.debug(this, s"fetching package '$docid' for reference") - getEntity(WhiskPackage.get(entityStore, docid), Some { - mergePackageWithBinding(Some { wp }) _ - }) + if (docid == wp.docid) { + logging.error(this, "unexpected package binding refers to itself: $docid") Review comment: pushed a commit to fix. ---------------------------------------------------------------- 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