Repository navigation
fix: library component follow-ups from review - #2096
Conversation
|
|
||
| Build a component library with the `non-akka-service` property set to `true`. A library built with SDK 3.7.0 without this property marks its component descriptor as a service descriptor, and a service that depends on it fails to start. | ||
|
|
||
| A deployable service must not set `non-akka-service` to `true`. The property marks the component descriptor as a library descriptor, and the service fails to start in production. |
There was a problem hiding this comment.
That's not even true.
If you set non-akka-service = true, the result is that you don't even get a docker image to deploy. The service won't start in production because there is no image to deploy. You catch the mistake much earlier.
I think we are letting 🤖 be too verbose and pedantic. Explaining every single edge for the sake of completeness.
There was a problem hiding this comment.
And in the case here, it's not even complete, is misleading.
There was a problem hiding this comment.
I will PR on this
And add warning to mvn build to let users understand why they are not getting a docker image.
Btw, we can't even call mvn exec:java in such a project. It also deserver a clear message in mvn console.
There was a problem hiding this comment.
Btw, we can't even call mvn exec:java in such a project.
hm, but then we might be missing something. When we are developing platform services we must be able to run them locally, like any other service.
There was a problem hiding this comment.
sorry, Friday afternoon, this is not platform services
Follow-ups from the review of #1893.
Changes
non-akka-servicetotrue. With the property, the descriptor of the service is a library descriptor, and the service fails to start in production.non-akka-service. A service that sets the property by mistake now shows the line in its tests.akka.javasdk.dev-mode.project-group-idto surefire, failsafe and exec. The SDK matches the full descriptor file nameakka-javasdk-components_<groupId>_<artifactId>.conf. A descriptor from another group with the same artifact id no longer matches.akka.javasdk.library.log-unlisted-components. Withfalse, the SDK logs it at debug level.Verification
ComponentLocatorSpechas tests for the group id match. Theakka-javasdktests and theakka-javasdk-testsendpoint, setup and eval tests pass.-Dnon-akka-service=truelog the new line.