You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2020/09/28 18:04:50 UTC

[GitHub] [openwhisk] bdoyle0182 commented on a change in pull request #4986: [WIP]Implement action versioning

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:
users@infra.apache.org