Skip to content

Commit

Permalink
update runtime version
Browse files Browse the repository at this point in the history
  • Loading branch information
octonato committed Nov 29, 2024
1 parent ff3feba commit 8508236
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion akka-javasdk-maven/akka-javasdk-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<!-- These are dependent on runtime environment and cannot be customized by users -->
<maven.compiler.release>21</maven.compiler.release>
<kalix-runtime.version>1.2.2-7-3e32f0a1-SNAPSHOT</kalix-runtime.version>
<kalix-runtime.version>1.2.2-25-7b7fa85e-SNAPSHOT</kalix-runtime.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<skip.docker>false</skip.docker>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public WorkflowDef<TransferState> definition() {
.addStep(deposit);
}

public Effect<Message> startTransfer(Transfer transfer) {vl
public Effect<Message> startTransfer(Transfer transfer) {
if (transfer.amount <= 0.0) {
return effects().reply(new Message("Transfer amount should be greater than zero"));
} else {
Expand Down
12 changes: 4 additions & 8 deletions akka-javasdk/src/main/scala/akka/javasdk/impl/SdkRunner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import akka.javasdk.impl.action.ActionsImpl
import akka.javasdk.impl.client.ComponentClientImpl
import akka.javasdk.impl.consumer.ConsumerService
import akka.javasdk.impl.eventsourcedentity.EventSourcedEntitiesImpl
import akka.javasdk.impl.eventsourcedentity.EventSourcedEntityImpl
import akka.javasdk.impl.eventsourcedentity.EventSourcedEntityService
import akka.javasdk.impl.http.HttpClientProviderImpl
import akka.javasdk.impl.http.JwtClaimsImpl
Expand All @@ -54,6 +55,7 @@ import akka.javasdk.impl.reflection.Reflect
import akka.javasdk.impl.reflection.Reflect.Syntax.AnnotatedElementOps
import akka.javasdk.impl.telemetry.SpanTracingImpl
import akka.javasdk.impl.telemetry.TraceInstrumentation
import akka.javasdk.impl.timedaction.TimedActionImpl
import akka.javasdk.impl.timedaction.TimedActionService
import akka.javasdk.impl.timer.TimerSchedulerImpl
import akka.javasdk.impl.view.ViewService
Expand All @@ -79,6 +81,7 @@ import akka.runtime.sdk.spi.SpiMockedEventingSettings
import akka.runtime.sdk.spi.SpiSettings
import akka.runtime.sdk.spi.SpiWorkflow
import akka.runtime.sdk.spi.StartContext
import akka.runtime.sdk.spi.TimedActionDescriptor
import akka.runtime.sdk.spi.WorkflowDescriptor
import akka.stream.Materializer
import com.google.protobuf.Descriptors
Expand All @@ -94,13 +97,6 @@ import kalix.protocol.value_entity.ValueEntities
import kalix.protocol.view.Views
import kalix.protocol.workflow_entity.WorkflowEntities
import org.slf4j.LoggerFactory
import scala.jdk.OptionConverters.RichOptional
import scala.jdk.CollectionConverters._

import akka.javasdk.impl.eventsourcedentity.EventSourcedEntityImpl
import akka.javasdk.impl.timedaction.TimedActionImpl
import akka.runtime.sdk.spi.EventSourcedEntityDescriptor
import akka.runtime.sdk.spi.TimedActionDescriptor

/**
* INTERNAL API
Expand Down Expand Up @@ -134,7 +130,7 @@ class SdkRunner private (dependencyProvider: Option[DependencyProvider]) extends
else
None

new SpiSettings(devModeSettings)
new SpiSettings(100, devModeSettings)
}

private def extractBrokerConfig(eventingConf: Config): SpiEventingSupportSettings = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import akka.runtime.sdk.spi.SpiSerialization
import akka.runtime.sdk.spi.SpiSerialization.Deserialized
import com.google.protobuf.ByteString
import com.google.protobuf.any.{ Any => ScalaPbAny }
import io.grpc.Status
import io.opentelemetry.api.trace.Span
import io.opentelemetry.api.trace.Tracer
import org.slf4j.LoggerFactory
Expand Down Expand Up @@ -158,8 +157,7 @@ private[impl] final class EventSourcedEntityImpl[S, E, ES <: EventSourcedEntity[
def replyOrError(updatedState: SpiEventSourcedEntity.State): (Option[ScalaPbAny], Option[SpiEntity.Error]) = {
commandEffect.secondaryEffect(updatedState) match {
case ErrorReplyImpl(description, status) =>
val errorCode = status.map(_.value).getOrElse(Status.Code.UNKNOWN.value)
(None, Some(new SpiEntity.Error(description, errorCode)))
(None, Some(new SpiEntity.Error(description)))
case MessageReplyImpl(message, _) =>
// FIXME metadata?
// FIXME is this encoding correct?
Expand Down Expand Up @@ -228,7 +226,7 @@ private[impl] final class EventSourcedEntityImpl[S, E, ES <: EventSourcedEntity[
events = Vector.empty,
updatedState = state,
reply = None,
error = Some(new SpiEntity.Error(msg, Status.Code.INVALID_ARGUMENT.value)),
error = Some(new SpiEntity.Error(msg)),
delete = None))
case e: EntityException =>
throw e
Expand Down Expand Up @@ -286,7 +284,9 @@ private[impl] final class EventSourcedEntityImpl[S, E, ES <: EventSourcedEntity[
override def toProto(obj: Deserialized): ScalaPbAny =
ScalaPbAny.fromJavaProto(messageCodec.encodeJava(obj))

override def fromProto(pb: ScalaPbAny): Deserialized =
messageCodec.decodeMessage(pb).asInstanceOf[Deserialized]
override def fromProto[T](pb: ScalaPbAny, clz: Class[T]): T = {
// FIXME: use BytesPayload from Johan's PR
messageCodec.decodeMessage(clz, akka.util.ByteString.fromArrayUnsafe(pb.value.toByteArray))
}
}
}
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ object Dependencies {
val ProtocolVersionMinor = 1
val RuntimeImage = "gcr.io/kalix-public/kalix-runtime"
// Remember to bump kalix-runtime.version in akka-javasdk-maven/akka-javasdk-parent if bumping this
val RuntimeVersion = sys.props.getOrElse("kalix-runtime.version", "1.2.2-7-3e32f0a1-SNAPSHOT")
val RuntimeVersion = sys.props.getOrElse("kalix-runtime.version", "1.2.2-25-7b7fa85e-SNAPSHOT")
}
// NOTE: embedded SDK should have the AkkaVersion aligned, when updating RuntimeVersion, make sure to check
// if AkkaVersion and AkkaHttpVersion are aligned
Expand Down

0 comments on commit 8508236

Please sign in to comment.