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

OpenAPI endpoint is broken #9981

Open
JR-1991 opened this issue Oct 6, 2023 · 14 comments · May be fixed by #10328
Open

OpenAPI endpoint is broken #9981

JR-1991 opened this issue Oct 6, 2023 · 14 comments · May be fixed by #10328

Comments

@JR-1991
Copy link
Contributor

JR-1991 commented Oct 6, 2023

What steps does it take to reproduce the issue?

The openapi endpoint provided by Payara results in an internal server error in version 6.0. For example, the endpoint does not function on Demo Dataverse (v6.0), although it does on Harvard's Dataverse (v5.14). Click on each link to reproduce the error.

Which version of Dataverse are you using?

Dataverse 6.0

@pdurbin
Copy link
Member

pdurbin commented Oct 6, 2023

Thanks for discussing this and opening this OpenAPI/Swagger issue, @JR-1991!

I showed the stacktrace below (from my laptop running 7e0738e, the latest from the develop branch) to @poikilotherm and he found what seems to be a related issue on the Payara side:

@donsizemore found this issue:

Here's the stacktrace: openapi-error.txt

Other open Swagger/OpenAPI issues:

@pdurbin
Copy link
Member

pdurbin commented Oct 26, 2023

Today @poikilotherm suggested using https://github.com/OpenAPITools/openapi-generator which would not be dependent on Payara (should also work if we switched to Wildfly or OpenLiberty, etc.). Also, it doesn't require the app server to be running.

@cmbz
Copy link

cmbz commented Jan 8, 2024

2024/01/08: Prioritized and moved to Needs Sizing during prioritization meeting.

@cmbz
Copy link

cmbz commented Jan 9, 2024

2024/01/08: Moved to Needs Sizing during today's prioritization meeting

@pdurbin
Copy link
Member

pdurbin commented Jan 10, 2024

As discussed yesterday at tech hours, a simple thing is to ask Payara about how the fix is coming along. I just did this in payara/Payara#6369 (comment)

As switching to output generated from https://github.com/OpenAPITools/openapi-generator none of us have tried that library and we don't have a great sense of how much effort it is.

A major use case for getting /openapi working again is PyDataverse. See "Implementation of core generation based on Swagger/OpenAPI" at https://py.gdcc.io

@cmbz
Copy link

cmbz commented Jan 16, 2024

2024/01/16: Recommendation to create a separate spike (10) to investigate the tool suggested here: #9981 (comment)

@cmbz
Copy link

cmbz commented Jan 16, 2024

2024/01/16: spike created: #10236

@cmbz
Copy link

cmbz commented Jan 16, 2024

2024/01/16: Moved to waiting. Work will continue via #10236 while we wait for response from Payara.

@pdurbin
Copy link
Member

pdurbin commented Feb 14, 2024

This just in. Someone has come up with a potential fix for Payara:

@jp-tosca jp-tosca linked a pull request Feb 16, 2024 that will close this issue
@pdurbin
Copy link
Member

pdurbin commented Feb 23, 2024

I just built that PR with this:

sdk use java 11.0.20-tem
mvn clean install -T 16 -PQuickBuild -DskipTests

Then I uploaded it to Google Drive: https://drive.google.com/file/d/17kVKOco86FDKXvs1aBZLq9QBABxO8S5A/view?usp=drive_link

I haven't tested it to see if /openapi works or not.

@cmbz
Copy link

cmbz commented Mar 13, 2024

2024/03/14

  • JP will reference this issue in his PR and when it's closed this issue will be too.

@pdurbin
Copy link
Member

pdurbin commented Apr 2, 2024

@poikilotherm
Copy link
Contributor

Payara 6.2024.4 RC1 is just in today. I suppose there will be a new release soon. We should update our version of Payara as it also contains my MPC NPE fix. We can check back again if it started working again.

@jp-tosca
Copy link
Contributor

jp-tosca commented Apr 2, 2024

If this is the case we should probably have to decide what to do with #10328 here are a few things to consider:

  • We should remove the endpoints added to serve the spec
  • We should discuss if we keep using the smallrye plugin, according to the documentation shared to us by @poikilotherm if a .yaml or .json file are provided under /WEB-INF the server would provide these files.
  • We still may need to include the changes done to the API methods and the annotations added on this OpenAPI definition endpoint #10328 or the spec will be similar at the one provided at https://dataverse.unc.edu/openapi which shows some of the errors solved, I am not sure how will the spec generated the payara will take this yet, as soon as the new release is up I can test it.

pdurbin added a commit that referenced this issue May 29, 2024
pdurbin added a commit that referenced this issue May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Recherche Data Gouv (formerly Data IN...
  
⚠️ Needed/Important
Development

Successfully merging a pull request may close this issue.

5 participants