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.15k stars 592 forks source link

Configuration options to change the MP OpenAPI endpoints #25011

Closed Azquelt closed 11 months ago

Azquelt commented 1 year ago

Description

Add configuration options to the MicroProfile OpenAPI features which allow the user to change:

For example, we could add MP Config properties like this:

mp.openapi.extensions.liberty.path=/openapi
mp.openapi.extensions.liberty.ui.path=/openapi/ui

One scenario where this feature is important is where a user has several services on different servers behind a Kubernetes or Openshift ingress point, with a different path mapped to each service. If the endpoints are not movable, it's impossible to expose the UI served by different servers from the same ingress point.

An important consideration is that the UI is a javascript application which runs in the browser and it needs to be able to find and call the endpoint which serves the OpenAPI yaml document. If that endpoint is configurable, we need to pass through its location when serving up the UI.


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 Friday after GM)

Post GA

malincoln commented 1 year ago

@tevans78 asked that this feature replace https://github.com/OpenLiberty/open-liberty/issues/17573 on the roadmap board.

scottkurz commented 1 year ago

Notes from UFO review on 2023-05-19:

Design Issue

The biggest action item needed is to open a design issue regarding the use of MP Config Properties for configuration that logically applies to the server as a whole, rather than an individual app.

On the call today it was mentioned there is already a precedent for using this type of config today. When these existing particular server-wide properties are found in an "application-level" config source (this would be the microprofile-config.properties file as well as the appProperties element in server.xml as documented) the properties are simply ignored.

We should consider whether to continue with this pattern, or move away from it to some more Liberty-centric config solution. Whatever we decide should apply to this current epic, naturally.

Other comments

Doc updates

Azquelt commented 1 year ago

Changes made:

Still to do:

Azquelt commented 1 year ago

Changes made:

Azquelt commented 1 year ago

Changes made:

Other tasks:

Azquelt commented 1 year ago

Changes made:

abutch3r commented 1 year ago

@OpenLiberty/demo-approvers Demo done in EOI 23.20

donbourne commented 1 year ago

Serviceability Approval Comment - Please answer the following questions for serviceability approval:

  1. UFO -- does the UFO identify the most likely problems customers will see and identify how the feature will enable them to diagnose and solve those problems without resorting to raising a PMR? Have these issues been addressed in the implementation?

  2. Test and Demo -- As part of the serviceability process we're asking feature teams to test and analyze common problem paths for serviceability and demo those problem paths to someone not involved in the development of the feature (eg. L2, test team, or another development team).
    a) What problem paths were tested and demonstrated? b) Who did you demo to? c) Do the people you demo'd to agree that the serviceability of the demonstrated problem scenarios is sufficient to avoid PMRs for any problems customers are likely to encounter, or that L2 should be able to quickly address those problems without need to engage L3?

  3. SVT -- SVT team is often the first team to try new features and often encounters problems setting up and using them. Note that we're not expecting SVT to do full serviceability testing -- just to sign-off on the serviceability of the problem paths they encountered. a) Who conducted SVT tests for this feature? b) Do they agree that the serviceability of the problems they encountered is sufficient to avoid PMRs, or that L2 should be able to quickly address those problems without need to engage L3?

  4. Which L2 / L3 queues will handle PMRs for this feature? Ensure they are present in the contact reference file and in the queue contact summary, and that the respective L2/L3 teams know they are supporting it. Ask Don Bourne if you need links or more info.

  5. Does this feature add any new metrics or emit any new JSON events? If yes, have you updated the JMX metrics reference list / Metrics reference list / JSON log events reference list in the Open Liberty docs?

abutch3r commented 1 year ago

@donbourne the current state of the questions is

  1. UFO covers most likely issues and are addressed either within the feature itself or another area where the messages have been checked. Those that apply to the implementation have been checked and each new message is tested for. Where handling of issues applies to the WebContainer in cases of endpoint conflicts, the behavior and messages have been checked and in this case had a fix supplied by the WebContainer team. The following scenarios are called out in the UFO:
    • Invalid characters - Error Messages include valid characters that can be used
    • Conflict with another applications endpoints - WebContainer errors cover this and include useful information about the cause of the conflict.
  2. a. During demo scenarios covering invalid characters and defining the same path as a customer application were shown b. Demo to EoI attendees and Microprofile UK team c. No questions about the messages were raised during the demo and our only remaining issues are for us to validate the messages do cover all the scenarios that the team can think of

  3. Will follow up with Brian
  4. The existing queues used for OpenAPI will continue to be used
  5. No new metrics or JSON events have been added.
tevans78 commented 1 year ago

@OpenLiberty/demo-approvers Demo done in EOI 23.10

You meant EOI 23.20

natalie-bernhard commented 1 year ago

The following attachment contains accessibility issues for the Swagger UI that need to be addressed. One file is an XLSX and one is HTML, but both contain the same information, just organized differently. Accessibility Issues for Swagger UI.zip

abutch3r commented 1 year ago

@natalie-bernhard The Swagger-UI is an OSS dependency we have and we and even they acknowledge that the UI is not fully accessibility compliant as they have a number of issues open on them for it.

A query about the report you have provided is, Would the report that has been generated be accepted by an external third-part - the WCAG parts I believe would be, but the IBM parts may not be and we may have to strip out IBM references.

Given timeframes to get fixes in upstream so they can be maintained through future releases will take a significant amount of time that this feature in no way warrants giving.

Also as the document itself can be downloaded and accessed in a users own tooling, therefore it does not provide the only method by which someone can obtain the information about the API. As such the core functionality provided by the feature is not blocked by an inaccessible UI.

So to get the approval in time for the next release what do we need to put in place. Can we either

tjwatson commented 12 months ago

I'm approving with the expectation that we get the testcase #26966 added this week for InstantOn.

abutch3r commented 11 months ago

@donbourne

SVT approval has now been given. the tests were done by Brian Hanczaryk

As for serviceability, the main issue encountered was with examples in the UFO having the wrong case compared to the supporting metatype. As such the values when provided were ignored. Once we had worked this out then the issue was resolved and nothing else in regards to the features error messages was flagged

This is a wider issue with types, not just for this feature. As currently a mistype is not flagged in anyway such as an unknown type or a close match being highlighted. The only fix is ensuring the documentation and examples are correct. The beta blog does use the correct example and will be reused for the GA blog and the documentation supporting this will be generated from the metatype, so will match. This does need flagging under the STE that types are case sensitive.

Are there any other areas under serviceability that need additional information

abutch3r commented 11 months ago

@OpenLiberty/ste-approvers WAS L3 site page here: https://github.ibm.com/WASL3/site/pull/61

gnadell commented 11 months ago

@abutch3r ,L2 has requested STE slides for this feature. The STE template can be found at the links below. You can use either one to create the education. Slide Template: https://ibm.box.com/s/1an42g7zdgmaj84w7dft0indqfgi8ffm

Github Template: https://pages.github.ibm.com/WASL3/site/STE/about

Please upload the completed slides to the same 'STE Archive' BOX folder and let @tngiang73 or me know they're complete or provide us the Github link. Thanks!

abutch3r commented 11 months ago

@gnadell @tngiang73 I have uploaded the slides to https://ibm.ent.box.com/file/1368308474181

Also, when I try to go to the github pages site I get accessing token endpoint (https://login.w3.ibm.com/oidc/endpoint/default/token) failed: address not available

gnadell commented 11 months ago

@abutch3r , I checked with Eric Covener. It appears to be a github issue. Please retry the link later.