OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.13k stars 578 forks source link

Support versionless Jakarta EE/MicroProfile features #25704

Open NottyCode opened 12 months ago

NottyCode commented 12 months ago

Description

While the Liberty feature design allows many great features like zero migration and us to support multiple EE versions it does make some things harder. For example if you are not using one of the convenience features and you want to be able to easily move from one EE/MP version to another you have to work out the right combination of new feature versions to specify them.

Proposed is an alternative option. We would allow unversioned EE features to be specified, but in combination another feature must be provided to indicate the platform version required. If no platform versioning feature is provided then there would be a startup failure to ensure we don't end up with zero migration breaks. An example of what this might look like is:

<featureManager>
   <feature>mpHealth</feature>
   <feature>mpRestClient</feature>
   <feature>jsonb</feature>
   <feature>mpPlatform-6.0</feature>
</featureManager>

or

<featureManager>
   <feature>persistence</feature>
   <feature>restfulWS</feature>
   <feature>jakartaeePlatform-10.0</feature>
</featureManager>

As the number of features required grows the value of this increases. It also makes it simpler for operations teams to augment developer provided configurations. For example when deploying into kube you might wish to have a health check capability inserted when a container image is built, but it isn't required by the application. This would enable the right mpHealth to be injected at container build time without needing to worry about what version of Jakarta EE/MicroProfile was used by the developer.


Documents

When available, add links to required feature documents. Use "N/A" to mark particular documents which are not required by the feature.

General Instructions

The process steps occur roughly in the order as presented. Process steps occasionally overlap.

Each process step has a number of tasks which must be completed or must be marked as not applicable ("N/A").

Unless otherwise indicated, the tasks are the responsibility of the Feature Owner or a Delegate of the Feature Owner.

If you need assistance, reach out to the OpenLiberty/release-architect.

Important: Labels are used to trigger particular steps and must be added as indicated.


Prioritization (Complete Before Development Starts)

The (OpenLiberty/chief-architect) and area leads are responsible for prioritizing the features and determining which features are being actively worked on.

Prioritization

Design preliminaries determine whether a formal design, which will be provided by an Upcoming Feature Overview (UFO) document, must be created and reviewed. A formal design is required if the feature requires any of the following: UI, Serviceability, SVT, Performance testing, or non-trivial documentation/ID.

Design Preliminaries

Design

No Design

FAT Documentation

A feature must be prioritized before any implementation work may begin to be delivered (inaccessible/no-ship). However, a design focused approach should still be applied to features, and developers should think about the feature design prior to writing and delivering any code.
Besides being prioritized, a feature must also be socialized (or No Design Approved) before any beta code may be delivered. All new Liberty content must be inaccessible in our GA releases until it is Feature Complete by either marking it kind=noship or beta fencing it.
Code may not GA until this feature has obtained the "Design Approved" or "No Design Approved" label, along with all other tasks outlined in the GA section.

Feature Development Begins

Legal and Translation

In order to avoid last minute blockers and significant disruptions to the feature, the legal items need to be done as early in the feature process as possible, either in design or as early into the development as possible. Similarly, translation is to be done concurrently with development. Both MUST be completed before Beta or GA is requested.

Legal (Complete before Feature Complete Date)

Translation (Complete 1 week before Feature Complete Date)

Innovation (Complete 1 week before Feature Complete Date)

In order to facilitate early feedback from users, all new features and functionality should first be released as part of a beta release.

Beta Code

Beta Blog (Complete 1.5 weeks before beta eGA)

A feature is ready to GA after it is Feature Complete and has obtained all necessary Focal Point Approvals.

Feature Complete

Focal Point Approvals (Complete by Feature Complete Date)

These occur only after GA of this feature is requested (by adding a target:ga label). GA of this feature may not occur until all approvals are obtained.

All Features

Design Approved Features

Remove Beta Fencing (Complete by Feature Complete Date)

GA Blog (Complete by Feature Complete Date)

Post GA

jhanders34 commented 10 months ago

https://github.com/OpenLiberty/open-liberty/compare/integration...jhanders34:versionless-features-prototype contains the prototype code that I referenced in our call today. It shows a versionless feature for the persistence / jpa features in Jakarta / Java EE.

Some points from the call today based off of this prototype:

rsherget commented 9 months ago

I created a draft PR https://github.com/OpenLiberty/open-liberty/pull/26301 showcasing Jared's changes as well as unversioned servlet

tbitonti commented 9 months ago
ayoho commented 8 months ago

UFO review (part 1) notes:

Slide 4

Slide 6

Slide 9

Slide 12

Slide 13

Slide 17

Slide 18

Slide 20

scottkurz commented 8 months ago

Re: slide 13:

Perhaps create a <platform> or <featurePlatform> element instead of re-using <feature>

I think it should be considered to add an attribute on featureManager as an alternative..

E.g. <featureManager jakartaPlatform="9.1" microprofilePlatform="5.0">.

The fact that there should only be one of each of these can be captured more efficiently by the basic rules for XML without having to be performed by Liberty-specific validation.

ayoho commented 8 months ago

UFO review (part 2) notes:

Slide 4:

Slide 23:

Slide 36:

dlp01 commented 8 months ago

@tbitonti and I were chatting in the halls of the RTP lab today. As identified in the POC Forum, there is a possibility of multiple possibilities for non-versioned features and that the server start will fail in that situation. The user can avoid this situation by using environment variable(s) that give the preferred list of versioned features to be used when 1) there are multiple possible potential choices for non-versioned features, and 2) the specific versioned features specified don't narrow the choice to a specific version.

I don't have issues with this concept, but do have some requests for the developer experience and use experience that will allow the user to avoid waiting on the server start to discover the error condition. I'll record these here and tag some folks in hopes they'll be able to add details/ideas, or map these to requirements.

1) I think there should be something available in the developer tools (i.e. with auto-completion) that helps the user know that they've set up this condition. Tom was suggesting, as well, that the developer tools could even suggest that the user either set a specific feature level, or set up the environment variable list. @cherylking @scottkurz

2) It would be nice to have some sort of validation, in general, in support of discovering this condition prior to server start. I don't know if that should be a part of the existing set of script. @NottyCode

tjwatson commented 3 months ago

UFO review notes (part 3)

Slide 3

Slide 17

Slide 18

Slide 25

tjwatson commented 3 months ago

Slide 49 for InstantOn: There is an InstantOn concern around the use of env values to configure the feature manager with PREFERRED_FEATURE_VERSIONS. The Semeru runtime returns null for most all environment variables except ones specified with WLP_IMMUTABLE_VARS before checkpoint https://github.com/OpenLiberty/open-liberty/blob/e2e768871ba4095a2ed128c6e05807f8354d3425/dev/com.ibm.ws.kernel.boot.ws-server/publish/bin/server#L95

My initial thought is we will want to add WLP_IMMUTABLE_VARS to the list of defaults so users do not have to set it themselves. That is done at https://github.com/OpenLiberty/open-liberty/blob/e2e768871ba4095a2ed128c6e05807f8354d3425/dev/com.ibm.ws.kernel.boot.ws-server/publish/bin/server#L905-L906

tjwatson commented 3 months ago

UFO review notes (part 4)

Slide 19

Slide 26

Slide 36

Slide 27

Slide 31

Slide 37

Slide 42

Slide 43

Slide 46

Slide 48

General comment:

cbridgha commented 2 months ago

All comments from above have been resolved and changed in the UFO document: https://ibm.ent.box.com/file/1484909310089?s=5fk61j0mfbw4que6jgmmw3vizg3lb6qn

hlhoots commented 1 month ago

Beta BLOG issue is #28656