bdoyle0182 commented on a change in pull request #4986:
URL: https://github.com/apache/openwhisk/pull/4986#discussion_r496137872



##########
File path: 
common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskAction.scala
##########
@@ -548,8 +632,12 @@ object WhiskAction extends DocumentFactory[WhiskAction] 
with WhiskEntityQueries[
       wp flatMap { resolvedPkg =>
         // fully resolved name for the action
         val fqnAction = resolvedPkg.fullyQualifiedName(withVersion = 
false).add(actionName)
+        val action = WhiskActionVersionList.get(fqnAction, 
entityStore).flatMap { result =>
+          val docId = result.matchedDocId(version).getOrElse(fqnAction.toDocId)
+          WhiskAction.get(entityStore, docId)

Review comment:
       Have you thought about doing a default version rather than defaulting to 
latest version? That would be more work though because you have to add 
maintaining a default version so I'm fine with it defaulting to latest and that 
can be an added feature later. So long as as you just asked, old actions are 
backwards compatible and get picked up as latest version if there are no 
versions for the action.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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


Reply via email to