Akka-http: Resurrect OSGI support

Created on 12 Feb 2018  路  3Comments  路  Source: akka/akka-http

OSGI support regularly breaks during releasing (or even used to break the released artifacts without notice), which is the worst time for breakage. We therefore removed OSGI support while releasing 10.1.0-RC1.

If someone cares enough for OSGI support, please step up as a maintainer of Akka HTTP OSGI support. We'll need help with:

  • adding back sbt OSGI support fixing the problem that happened during the last release
  • integrate OSGI checks with the PR validation and/or nightly builds checking that

    • releasing will still work at any time

    • OSGI metadata is correct, i.e. we need executable tests that verify that the emitted metadata is correct and works in an actual OSGI setup

    • ongoing commitment to maintain the OSGI setup and help diagnose and fix OSGI release issues

help wanted 3 - in progress discuss build

Most helpful comment

Hi, just to let you know, I have started working on this - especially on automated OSGi integration tests. I have created a repository for doing some experiments here.
The basic idea is to have a project that depends on akka and akka-http. The sbt build collects the (transitive) dependencies and copies them in a directory. From there they are picked up by a PaxExam test and deployed in an Apache Felix OSGi container. The test then starts an HTTP server and executes a request against it.
The advantage of this approach is that not only akka-http but all its dependencies are checked for OSGi compliance (namely the akka bundles). Here I currently face some problems because the OSGi meta data for akka-streams and ssl-config-core is broken (I have created PRs for these issues).
If you agree to this approach, we can discuss how to integrate this test in the build of akka-http; I haven't yet looked into this.

All 3 comments

Hi, just to let you know, I have started working on this - especially on automated OSGi integration tests. I have created a repository for doing some experiments here.
The basic idea is to have a project that depends on akka and akka-http. The sbt build collects the (transitive) dependencies and copies them in a directory. From there they are picked up by a PaxExam test and deployed in an Apache Felix OSGi container. The test then starts an HTTP server and executes a request against it.
The advantage of this approach is that not only akka-http but all its dependencies are checked for OSGi compliance (namely the akka bundles). Here I currently face some problems because the OSGi meta data for akka-streams and ssl-config-core is broken (I have created PRs for these issues).
If you agree to this approach, we can discuss how to integrate this test in the build of akka-http; I haven't yet looked into this.

This sounds pretty good; I skimmed the code and I assume it does the right thing... Thanks for linking to the PaxExam page, it seems like it would do the job.

Definitely submit a PR and let's try to integrate soon

Ok, I will start with a PR (hopefully tomorrow) that re-enables the OSGi plugin and fixes the problem with the Require-Capability header. Then the build should again produce valid OSGi bundles.

Was this page helpful?
0 / 5 - 0 ratings