Skip to content

Commit 4df5178

Browse files
Fix rebase error
1 parent 1035347 commit 4df5178

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskAction.scala

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,12 @@ case class WhiskActionVersionList(namespace: EntityPath,
365365
versions: List[SemVer],
366366
defaultVersion: Option[SemVer]) {
367367
def matchedDocId(version: Option[SemVer]): Option[DocId] = {
368-
version match {
369-
case Some(ver) =>
368+
(version, defaultVersion) match {
369+
case (Some(ver), _) =>
370370
Some(DocId(s"$namespace/$name@$ver"))
371-
case None if defaultVersion.nonEmpty =>
372-
Some(DocId(s"$namespace/$name@${defaultVersion.get}"))
373-
case None if versions.nonEmpty =>
371+
case (None, Some(default)) =>
372+
Some(DocId(s"$namespace/$name@$default"))
373+
case (None, None) if versions.nonEmpty =>
374374
Some(DocId(s"$namespace/$name@${versions.max}"))
375375
case _ =>
376376
None
@@ -431,16 +431,7 @@ object WhiskActionVersionList extends MultipleReadersSingleWriterCache[WhiskActi
431431
implicit transId: TransactionId,
432432
ec: ExecutionContext): Future[Option[DocId]] = {
433433
get(action, datastore).map { res =>
434-
version match {
435-
case Some(_) =>
436-
Some(DocId(action.copy(version = version).asString))
437-
case None if res.defaultVersion.nonEmpty =>
438-
Some(DocId(action.copy(version = res.defaultVersion).asString))
439-
case None if res.versions.nonEmpty =>
440-
Some(DocId(action.copy(version = Some(res.versions.max)).asString))
441-
case _ =>
442-
None
443-
}
434+
res.matchedDocId(version)
444435
}
445436
}
446437

core/controller/src/main/scala/org/apache/openwhisk/core/controller/Actions.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,8 @@ trait WhiskActionsApi extends WhiskCollectionAPI with PostActionActivation with
451451

452452
onComplete(deleteFuture) {
453453
case Success(entities) =>
454-
complete(OK, entities.last)
454+
val versions = entities.map(_.version).mkString(",")
455+
complete(OK, s"[DEL] entity ${entities.last.fullyQualifiedName(false)} for versions $versions")
455456
case Failure(t: NoDocumentException) =>
456457
logging.debug(this, s"[DEL] entity does not exist")
457458
terminate(NotFound)

core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/v2/InvokerHealthManager.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ object InvokerHealthManager {
322322
action.rev,
323323
healthActionIdentity,
324324
ActivationId.generate(),
325+
docInfo.id,
325326
ControllerInstanceId("health"),
326327
blocking = false,
327328
content = None))

0 commit comments

Comments
 (0)