Skip to content

fix: library component follow-ups from review - #2096

Merged
patriknw merged 1 commit into
mainfrom
library-components-follow-ups
Oct 16, 2026
Merged

patriknw merged 1 commit into
mainfrom
library-components-follow-ups

Conversation

@johanandren

Copy link
Copy Markdown
Contributor

Follow-ups from the review of #1893.

Changes

  • Migration guide: The SDK 3.7.0 library entry now says that a deployable service must not set non-akka-service to true. With the property, the descriptor of the service is a library descriptor, and the service fails to start in production.
  • Log line for the project descriptor: When no descriptor has the service marker, the SDK uses the descriptor of the project as the service descriptor. It now logs this at info level. The line says that this is expected in the tests of a component library, and that a deployable service must not set non-akka-service. A service that sets the property by mistake now shows the line in its tests.
  • Group id in the match: The parent pom also passes akka.javasdk.dev-mode.project-group-id to surefire, failsafe and exec. The SDK matches the full descriptor file name akka-javasdk-components_<groupId>_<artifactId>.conf. A descriptor from another group with the same artifact id no longer matches.
  • Service setup warning: The "Ignoring service setup" warning for a library descriptor now follows akka.javasdk.library.log-unlisted-components. With false, the SDK logs it at debug level.

Verification

  • ComponentLocatorSpec has tests for the group id match. The akka-javasdk tests and the akka-javasdk-tests endpoint, setup and eval tests pass.
  • End to end, with a locally published SDK:
    • The tests of a component library log the new line and pass.
    • The tests of a service log nothing new.
    • The tests of a service built with -Dnon-akka-service=true log the new line.

@github-actions github-actions Bot added the documentation documentation related label Oct 16, 2026

@patriknw patriknw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@patriknw
patriknw merged commit 821caf6 into main Oct 16, 2026
38 checks passed
@patriknw
patriknw deleted the library-components-follow-ups branch October 16, 2026 12:34

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.

@octonato octonato Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And in the case here, it's not even complete, is misleading.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, Friday afternoon, this is not platform services

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Time for a break!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants