Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore : Migrate to OSGi Service Component annotations to ManagedKubernetesClient / ManagedOpenShiftClient #6296

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

rohanKanojia
Copy link
Member

@rohanKanojia rohanKanojia commented Aug 22, 2024

Description

Fix #4445

Apache Felix SCR annotations are not supported anymore. Please see:

  • Remove Apache Felix SCR annotations as they're not deprecated.
    • Remove org.apache.felix:maven-scr-plugin from modules that were using Felix SCR annotations
  • Add OSGi Service Component annotations to ManagedKubernetesClient and ManagedOpenShiftClient, these annotations would automatically be read by maven-bundle-plugin to generate osgi component descriptors.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

@@ -43,6 +43,7 @@ public class FeatureInstallationTest extends TestBase {
@Test
public void testKubernetesClientFeature() throws Exception {
featuresService.addRepository(getFeaturesFile().toURI());
featuresService.installFeature("scr");
Copy link
Member Author

@rohanKanojia rohanKanojia Aug 22, 2024

Choose a reason for hiding this comment

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

After migrating to OSGi Component annotations from Felix SCR annotations, I see this additional text added in the MANIFEST.MF Require-Capability by maven bundle plugin

filter:="(&(osgi.extender=osgi.compo
 nent)(version>=1.5.0)(!(version>=2.0.0)))

This causes karaf tests to fail with missing requirement. Once I install scr feature test passes.

Copy link
Member Author

Choose a reason for hiding this comment

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

I moved it as a dependency feature in feature.xml

@rohanKanojia rohanKanojia marked this pull request as ready for review August 22, 2024 14:50
@rohanKanojia rohanKanojia force-pushed the pr/issue4445 branch 2 times, most recently from b32c9f4 to 28b38e6 Compare August 26, 2024 09:18
…lient

+ Remove Apache Felix SCR annotations as they're unsupported.
+ Add OSGi Service Component annotations to ManagedKubernetesClient and ManagedOpenShiftClient

Signed-off-by: Rohan Kumar <[email protected]>
Copy link

@manusa manusa added this to the 7.0.0 milestone Aug 28, 2024 — with automated-tasks
Copy link
Member

@manusa manusa left a comment

Choose a reason for hiding this comment

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

LGTM, thx!

@manusa manusa merged commit 24f1b8e into fabric8io:main Aug 28, 2024
21 checks passed
@rohanKanojia rohanKanojia deleted the pr/issue4445 branch August 28, 2024 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider Migrating deprecated Felix Annotations to OSGi component Annotations
3 participants