Skip to content

Commit

Permalink
Fix rebase errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangpengcheng committed Jun 3, 2021
1 parent 9fad6e3 commit 0205d2e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ object WarmUp {
revision = DocRevision.empty,
user = warmUpActionIdentity,
activationId = new ActivationIdGenerator {}.make(),
DocId(warmUpAction.asString),
rootControllerIndex = controller,
blocking = false,
content = None,
Expand All @@ -54,6 +55,7 @@ object WarmUp {
val metadata = WhiskActionMetaData(
warmUpAction.path,
warmUpAction.name,
DocId(warmUpAction.asString),
CodeExecMetaDataAsString(manifest, false, entryPoint = None))
ContainerCreationMessage(
TransactionId.warmUp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ class ContainerMessageConsumerTests
sendAckToScheduler(producer))

val exec = CodeExecAsString(RuntimeManifest("nodejs:10", ImageName("testImage")), "testCode", None)
val docId = DocId("testns/testAction@0.0.1")
val action =
WhiskAction(EntityPath("testns"), EntityName("testAction"), exec, limits = ActionLimits(TimeLimit(1.minute)))
put(entityStore, action)
Expand All @@ -166,6 +167,7 @@ class ContainerMessageConsumerTests
WhiskActionMetaData(
action.namespace,
action.name,
docId,
execMetadata,
action.parameters,
action.limits,
Expand Down Expand Up @@ -212,6 +214,7 @@ class ContainerMessageConsumerTests
sendAckToScheduler(ackConsumer.getProducer()))

val exec = CodeExecAsString(RuntimeManifest("nodejs:10", ImageName("testImage")), "testCode", None)
val docId = DocId("testns/testAction2@0.0.1")
val whiskAction =
WhiskAction(EntityPath("testns"), EntityName("testAction2"), exec, limits = ActionLimits(TimeLimit(1.minute)))
val execMetadata =
Expand All @@ -220,6 +223,7 @@ class ContainerMessageConsumerTests
WhiskActionMetaData(
whiskAction.namespace,
whiskAction.name,
docId,
execMetadata,
whiskAction.parameters,
whiskAction.limits,
Expand Down Expand Up @@ -294,14 +298,15 @@ class ContainerMessageConsumerTests
WarmUp.warmUpAction.name,
exec,
limits = ActionLimits(TimeLimit(1.minute)))
val doc = put(entityStore, action)
val docId = DocId(action.fullyQualifiedName(true).asString)
val execMetadata =
CodeExecMetaDataAsString(exec.manifest, entryPoint = exec.entryPoint)

val actionMetadata =
WhiskActionMetaData(
action.namespace,
action.name,
docId,
execMetadata,
action.parameters,
action.limits,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import scala.concurrent.Future
import scala.concurrent.duration._
import org.apache.openwhisk.common.Logging
import org.apache.openwhisk.common.NestedSemaphore
import org.apache.openwhisk.common.InvokerHealth
import org.apache.openwhisk.core.entity._
import org.apache.openwhisk.common.TransactionId
import org.apache.openwhisk.core.WhiskConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,14 @@ class ContainerManagerTests
val resourcesStrictPolicy = false

val exec = CodeExecAsString(RuntimeManifest("actionKind", ImageName("testImage")), "testCode", None)
val action = ExecutableWhiskAction(EntityPath(testNamespace), EntityName(testAction), exec)
val docId = DocId(s"$testNamespace/$testAction@0.0.1")
val action = ExecutableWhiskAction(EntityPath(testNamespace), EntityName(testAction), docId, exec)
val execMetadata = CodeExecMetaDataAsString(exec.manifest, entryPoint = exec.entryPoint)
val actionMetadata =
WhiskActionMetaData(
action.namespace,
action.name,
docId,
execMetadata,
action.parameters,
action.limits,
Expand Down Expand Up @@ -776,12 +778,14 @@ class ContainerManagerTests
ContainerManager.props(factory(mockJobManager), mockMessaging(), testsid, mockEtcd, config, mockWatcher.ref))

val exec = BlackBoxExec(ExecManifest.ImageName("image"), None, None, native = false, binary = false)
val action = ExecutableWhiskAction(EntityPath(testNamespace), EntityName(testAction), exec)
val docId = DocId(s"$testNamespace/$testAction@0.0.1")
val action = ExecutableWhiskAction(EntityPath(testNamespace), EntityName(testAction), docId, exec)
val execMetadata = BlackBoxExecMetaData(exec.image, exec.entryPoint, exec.native, exec.binary)
val actionMetadata =
WhiskActionMetaData(
action.namespace,
action.name,
docId,
execMetadata,
action.parameters,
action.limits,
Expand Down

0 comments on commit 0205d2e

Please sign in to comment.