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

FISH-7048 FISH-7253 FISH-7254 FISH-7255 FISH-8219 FISH-8220 Upgrade OSGi #6546

Merged
merged 21 commits into from Feb 28, 2024

Conversation

Pandrex247
Copy link
Member

@Pandrex247 Pandrex247 commented Jan 30, 2024

Description

Upgrades OSGi and its related Felix components.

Does a small amount of cleanup with the osgi.properties files. I converted those that I needed to touch into Maven config, but I elected not to nuke all of them as it would be a) time-consuming and b) make this PR huge.

I've elected to leave the stuff for Knopflerfish and Equinox in for now, though this is a similar thing which we may wish to clean up at some point.

The properties I've removed are resolved and provided by Felix.

The org.osgi.framework.system.packages.extra property is now resolved programmatically by reading the simple-glassfish-api.jar manifest - this module contains the bootstrap APIs.

Also makes a change to the OpenAPISupplier class to deal with the duplicate type conflicts that come about from this change: now that Felix is exporting JDK classes, it detects them while doing parsing (see here). Without this change classes such as Enum are not detected while parsing - they are now. Payara 5 apparently always had some conflict resolution where it would simply use the first found which I've ported across and added some logging to - it Shouldn't™ come up as I filter out classes which aren't a part of the application itself, but it's there as a safety net.
This possibly slows down parsing as it's now able to resolve these classes and therefore potentially parses more "transitively" - I'd need to do some performance testing to confirm. To be clear, the Enum class will always be detected while parsing, but what may have changed now is that anything defined within the Enum class itself may also now be parsed.

I have a follow-up PR which updates Felix & OSGi in HK2 here.

Important Info

Blockers

None

Testing

New tests

None

Testing Performed

Started Payara Server and loaded the admin console.
Started Payara Micro and deployed an application.
Started Payara Embedded and deployed an application.

Additionally started Payara Server and loaded the admin console on Java 17, and 21.

Ran the MicroProfile OpenAPI TCK on JDK 11 and 21.

Testing Environment

Windows 11, Java 11.0.22, 17.0.10, 21.0.2

Documentation

N/A

Notes for Reviewers

  • I would recommend filtering out the last formatting commit to aid readability of the MainHelper class.
  • The change to UberJarOSGiGlassFishRuntimeBuilder is actually to dead code - this isn't used anywhere. It's for a distribution of embedded that we've never published.

@Pandrex247 Pandrex247 force-pushed the Upgrade-OSGi branch 3 times, most recently from b0f6cd2 to 440cde5 Compare February 6, 2024 17:20
@Pandrex247 Pandrex247 changed the title FISH-7048 FISH-7253 FISH-7254 FISH-7255 FISH-8220 Upgrade OSGi FISH-7048 FISH-7253 FISH-7254 FISH-7255 FISH-8219 FISH-8220 Upgrade OSGi Feb 6, 2024
@Pandrex247 Pandrex247 force-pushed the Upgrade-OSGi branch 3 times, most recently from 0b4a8f9 to 586937b Compare February 12, 2024 14:04
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
…ropriately

Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Also pulls in org.osgi.service.component as it's now required

Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Also introduces additional logging and logger variable.

Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
@Pandrex247 Pandrex247 marked this pull request as ready for review February 14, 2024 15:22
@Pandrex247 Pandrex247 requested a review from aubi February 14, 2024 15:40
Make sure the type is set also for jdk classes.
Copy link
Contributor

@aubi aubi left a comment

Choose a reason for hiding this comment

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

LGTM

@Pandrex247 Pandrex247 merged commit 24c6f05 into payara:master Feb 28, 2024
1 check passed
@Pandrex247 Pandrex247 deleted the Upgrade-OSGi branch February 28, 2024 08:57
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.

None yet

2 participants