upgle commented on a change in pull request #3880: Modify that web action in 
the bound package can be accessed.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3880#discussion_r228738015
 
 

 ##########
 File path: 
core/controller/src/main/scala/whisk/core/controller/WebActions.scala
 ##########
 @@ -697,22 +672,15 @@ trait WhiskWebActionsApi
   }
 
   /**
-   * Gets package from datastore and confirms it is not a binding.
+   * Gets action from datastore.
+   * if it is in a package, then resolve and merge parameters only,
+   * except for annotations.
+   *
+   * @return future action document
    */
-  private def pkgLookup(pkg: FullyQualifiedEntityName)(implicit transid: 
TransactionId): Future[WhiskPackage] = {
-    getPackage(pkg).filter {
-      _.binding.isEmpty
-    } recoverWith {
-      case _: ArtifactStoreException | DeserializationException(_, _, _) =>
-        // if the package lookup fails or the package doesn't conform to 
expected invariants,
-        // fail the request with BadRequest so as not to leak information 
about the existence
-        // of packages that are otherwise private
-        logging.debug(this, s"package which does not exist")
-        Future.failed(RejectRequest(NotFound))
-      case _: NoSuchElementException =>
-        logging.debug(this, s"'$pkg' is a binding")
-        Future.failed(RejectRequest(NotFound))
 
 Review comment:
   @rabbah 
   test cases for 2, 3 have been added. 
https://github.com/apache/incubator-openwhisk/pull/3880/commits/e970d3a54a207fb60c41b7c56b2d0e802434428c

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

Reply via email to