fasten-project / fasten

Analyse package dependency networks at the call graph level
https://www.fasten-project.eu
Apache License 2.0
91 stars 28 forks source link

Handle `PSQLException` in the FASTEN server and `MetadataDBExtension` #466

Closed mir-am closed 2 years ago

mir-am commented 2 years ago

Description

This PR makes the following changes:

Motivation and context

As discussed in #461, if a PSQLException happens in a plugin, it cannot proceed further due to a failed DB connection. Therefore, the plugin should be stopped and restarted by K8s/DC to make a new DB connection.

Testing

Tested with the DC.

mir-am commented 2 years ago

I added several comments.

@proksch Thanks for reviewing the code and comments. I have addressed your comments and responded to your questions.

MagielBruntink commented 2 years ago

Hi Amir, I tried restarting the REST API component for Java/MVN and it won't even come up anymore. I think it's really time to start trying things. What do you think?

mir-am commented 2 years ago

Hi Amir, I tried restarting the REST API component for Java/MVN and it won't even come up anymore. I think it's really time to start trying things. What do you think?

Hi Magiel (@MagielBruntink ) Would you please elaborate a bit more on this issue? Did you try this on monster? Also, note that #465 is not running in production as a new release should be created.

MagielBruntink commented 2 years ago

If I kubectl rollout restart deployment/fasten-restapi-java -n fasten on monster the Java/Mvn REST API container is restarted, but upon starting it immediately crashes.

mir-am commented 2 years ago

If I kubectl rollout restart deployment/fasten-restapi-java -n fasten on monster the Java/Mvn REST API container is restarted, but upon starting it immediately crashes.

I have created issue #471 as it's not related to this PR.

mir-am commented 2 years ago

@proksch Thanks for the discussion and further comments. I have addressed them in my recent commits.