Skip to content

Commit

Permalink
chore: adding class name to descriptors (#116)
Browse files Browse the repository at this point in the history
* chore: adding class name to descriptors

* runtime version bump
  • Loading branch information
aludwiko authored Dec 20, 2024
1 parent c31158e commit 16da721
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 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.3.0-98fe2a3</kalix-runtime.version>
<kalix-runtime.version>1.3.0-cb36dd2e</kalix-runtime.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<skip.docker>false</skip.docker>
Expand Down
8 changes: 5 additions & 3 deletions akka-javasdk/src/main/scala/akka/javasdk/impl/SdkRunner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ private final class Sdk(
})
}
eventSourcedEntityDescriptors :+=
new EventSourcedEntityDescriptor(componentId, readOnlyCommandNames, instanceFactory)
new EventSourcedEntityDescriptor(componentId, clz.getName, readOnlyCommandNames, instanceFactory)

case clz if classOf[KeyValueEntity[_]].isAssignableFrom(clz) =>
val componentId = clz.getAnnotation(classOf[ComponentId]).value
Expand All @@ -475,7 +475,7 @@ private final class Sdk(
})
}
keyValueEntityDescriptors :+=
new EventSourcedEntityDescriptor(componentId, readOnlyCommandNames, instanceFactory)
new EventSourcedEntityDescriptor(componentId, clz.getName, readOnlyCommandNames, instanceFactory)

case clz if Reflect.isWorkflow(clz) =>
val componentId = clz.getAnnotation(classOf[ComponentId]).value
Expand All @@ -491,6 +491,7 @@ private final class Sdk(
workflowDescriptors :+=
new WorkflowDescriptor(
componentId,
clz.getName,
readOnlyCommandNames,
ctx => workflowInstanceFactory(ctx, clz.asInstanceOf[Class[Workflow[Nothing]]]))

Expand All @@ -509,7 +510,7 @@ private final class Sdk(
serializer,
ComponentDescriptor.descriptorFor(timedActionClass, serializer))
timedActionDescriptors :+=
new TimedActionDescriptor(componentId, timedActionSpi)
new TimedActionDescriptor(componentId, clz.getName, timedActionSpi)

case clz if classOf[Consumer].isAssignableFrom(clz) =>
val componentId = clz.getAnnotation(classOf[ComponentId]).value
Expand All @@ -529,6 +530,7 @@ private final class Sdk(
consumerDescriptors :+=
new ConsumerDescriptor(
componentId,
clz.getName,
consumerSource(consumerClass),
consumerDestination(consumerClass),
timedActionSpi)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ private[impl] object ViewDescriptorFactory {

new SpiViewDescriptor(
componentId,
viewClass.getName,
tables,
queries = allQueryMethods.map(_.descriptor),
// FIXME reintroduce ACLs (does JWT make any sense here? I don't think so)
Expand Down
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.3.0-98fe2a3")
val RuntimeVersion = sys.props.getOrElse("kalix-runtime.version", "1.3.0-cb36dd2e")
}
// 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 16da721

Please sign in to comment.