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

/mvn/packages/{pkg}/{pkg_ver}/rcg returns HTTP code 500 #462

Open
amottier opened this issue May 24, 2022 · 8 comments
Open

/mvn/packages/{pkg}/{pkg_ver}/rcg returns HTTP code 500 #462

amottier opened this issue May 24, 2022 · 8 comments
Assignees

Comments

@amottier
Copy link
Contributor

Describe the bug

If an artifact is not known, and API call to /mvn/packages/{pkg}/{pkg_ver}/rcg will lead to an error 500.

To Reproduce

Steps to reproduce the behavior:

  1. curl https://api.fasten-project.eu/api/mvn/packages/org.jgroups:jgroups/5.1.9.Final/rcg

Expected behavior

Based on the documentation, I expect to get a 201 HTTP code if artifact is not known.

Environment (please complete the following information):

  • OS: Linux Debian 11
  • Java version: 11.0.15

Additional context

Found this issue while doing some test with the FASTEN Maven plugin.

@mir-am
Copy link
Contributor

mir-am commented May 24, 2022

@amottier
Thanks for reporting an issue.
I would assume that the behavior might have changed in recent major changes to the REST API and the documentation is not updated accordingly.
The issue should be investigated further.

@amottier
Copy link
Contributor Author

@mir-am this is not actually related to the documentation because when requesting curl https://api.fasten-project.eu/api/mvn/packages/com.google.guava:guava/24.1-jre/rcg I got an HTTP status code 201.

@tmortagne
Copy link
Member

tmortagne commented May 24, 2022

I would assume that the behavior might have changed in recent major changes

Returning an error 500 for such an API is always the sign of a bug for me.

It feels like some packages are badly analyzed or inserted in the DB and would cause a crash of the generation of the call graph.
I remember a long time ago (It's possible I only reported this on gitter) having the following cases for some packages: the very first call was returning a 201 and any following call would return an error 500.

@amottier
Copy link
Contributor Author

@mir-am now I'm also getting an error 500 with curl https://api.fasten-project.eu/api/mvn/packages/com.google.guava:guava/24.1-jre/rcg Can you take a look on the server side to see if any logs are available?

@mir-am
Copy link
Contributor

mir-am commented May 25, 2022

@amottier
I will investigate the issue ASAP.

@mir-am mir-am self-assigned this May 30, 2022
@mir-am
Copy link
Contributor

mir-am commented May 30, 2022

@amottier
Using the provided example above, I could NOT reproduce the issue locally while debugging the REST API in my IDE, i.e., http://localhost:8080/packages/org.jgroups:jgroups/5.1.9.Final/.
The possible explanation for this issue is related to #461. The REST was down because of PSQLException at the time of sending the above request to our production cluster.

@mir-am
Copy link
Contributor

mir-am commented Jun 2, 2022

The issue is addressed in #465.

@mir-am mir-am closed this as completed Jun 2, 2022
@amottier amottier reopened this Jul 5, 2022
@amottier
Copy link
Contributor Author

amottier commented Jul 5, 2022

@mir-am I did again a test with: curl https://api.fasten-project.eu/api/mvn/packages/org.jgroups:jgroups/5.1.9.Final/rcg and I'm getting a 500 error code.

Let me know if I can help with the investigation.

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

No branches or pull requests

3 participants