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.14k stars 588 forks source link

Modify inconsistent messages with list of features logged on server start #20372

Closed brenthdaniel closed 1 year ago

brenthdaniel commented 2 years ago

At server start, the feature manager will log a list of added features in a CWWKF0012I audit message and removed features in a CWWKF0013I audit message. In the case of a warm start, the feature manager will instead log the entire list of installed features in the CWWKF0012I message: [AUDIT ] CWWKF0012I: The server installed the following features: [el-3.0, jsp-2.3, servlet-3.1].

This has lead to confusion in the past from users who expect the CWWKF0012I to always output the full list of installed features. In the case where the list of features is updated in between server starts, someone could believe that previously installed features are no longer there.

It would be nice to have more consistency here, but any change here has a strong potential to break any automation that depends on the CWWKF0012I message.

Solution 1: Add a new feature manager message to log the list of all installed features and only issue CWWKF0012I for newly added features. This would provide consistency and still provide a list of all installed features to anyone depending on it. This change would have a high probability of breaking anyone that relies on the feature messages.

Solution 2: Change the CWWKF0012I message to always output the full list of features on server start. When the list of features is updated in a running server, continue to list only the delta. Maintain the CWWKF0013I message for any features that were removed at startup. This is much less likely to break automation. We lose some information here on the feature delta, but that may not be important.

Solution 2b: The same as solution 2, but don't issue CWWKF0013I message for features removed at startup.

frowe commented 2 years ago

Could you clarify the description "At server start, the feature manager will log a list of added features in a CWWKF0012I audit message and removed features in a CWWKF0013I audit message." Which kind of server start are we talking here? What would be the use case for monitoring CWWKF0012I that we envision possibly breaking automation? From the description and the slack discussion, it seems this issue only appears if you edit the server config while the server is stopped? That seems common in a dev env, but where else? If only dev, it doesn't seem likely we're breaking automation. In a container env, I would assume we're always seeing the full feature list since we're creating the server and not restarting it?

brenthdaniel commented 2 years ago

Solution 1 would immediately break our FAT tests that rely on looking for specific features in the 12I message. That's not an issue for us given that we can just fix it, but it's reasonable to think that embedders could have similar logic. It's less likely that end users would have similar log scraping, but would not be surprising.

Solution 2 would be much less likely to break automation as it would only affect cases where a test was specifically looking for a delta.

Here is every server start scenario: Start a new server with jsp-2.3 enabled (aka, cold start): [AUDIT ] CWWKF0012I: The server installed the following features: [el-3.0, jsp-2.3, servlet-3.1]. Stop the server. Edit server.xml to add jdbc-4.0: [AUDIT ] CWWKF0012I: The server installed the following features: [jdbc-4.0, jndi-1.0]. Stop the server. Start the server (aka warm start). [AUDIT ] CWWKF0012I: The server installed the following features: [el-3.0, jdbc-4.0, jndi-1.0, jsp-2.3, servlet-3.1]. Edit server.xml to add servlet-4.0:

[AUDIT   ] CWWKF0012I: The server installed the following features: [servlet-4.0].
[AUDIT   ] CWWKF0013I: The server removed the following features: [servlet-3.1].

Stop the server. Edit server.xml to remove servlet-4.0:

[AUDIT   ] CWWKF0012I: The server installed the following features: [servlet-3.1].
[AUDIT   ] CWWKF0013I: The server removed the following features: [servlet-4.0].
brenthdaniel commented 2 years ago

Various permutations of solutions were discussed. Additional solutions:

  1. Keep 12 and 13, but add the full list of features to the end of the message. Something like:

    [AUDIT   ] CWWKF0012I: The server installed the following features: [servlet-4.0]. The current list of installed features is: [el-3.0, jdbc-4.0, jndi-1.0, jsp-2.3, servlet-4.0].
    [AUDIT   ] CWWKF0013I: The server removed the following features: [servlet-3.1]. The current list of installed features is: [el-3.0, jdbc-4.0, jndi-1.0, jsp-2.3, servlet-4.0].
  2. Leave 12 and 13 as they are and add a new message that always lists all features. This is similar to (1) but wouldn't break any automation because 12 would stay the same. The down side is that, in most cases, there would be two lines that show all installed features, eg:

    [AUDIT ] CWWKF0012I: The server installed the following features: [el-3.0, jsp-2.3, servlet-3.1].
    [AUDIT ] CWWKF9999I: The current list of installed features is: [el-3.0, jsp-2.3, servlet-3.1].

Also, if we end up making changes to the messages, we might want to change 'installed' to something else like 'added' or 'enabled'.

brenthdaniel commented 2 years ago

The requirement from the embedder that raised this issue is to have the full list of active features logged during server start for service reasons, but it's not important whether it's in a new or existing message.

brenthdaniel commented 2 years ago

At the 3/29 meeting we decided to pursue the following:

  1. The CWWKF0012I and CWWKF0013I messages will remain as is, except that CWWKF0012I will now always list all features.

2.A new mesage CWWKFxxxxI will be added that will only be output when there is a feature delta and will list only added features.

No changes will be made to change 'installed' to 'added' in the existing CWWKF0012I message.

We will check with the maven/gradle tools and WDT before making any changes.

hlhoots commented 2 years ago

Description

A new informational message CWWKFxxxxI will be added that will be issued only when there is a change in the installed features. It will only list features that were added.

The current CWWKF0012I message will now list all installed features in every case.

Neither WDT or the maven/gradle tools currently use these informational messages.


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)

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