fasten-project / fasten

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

Recent changes to DB logic in server and plugins have broken the Quality Analyzer plugin #474

Closed MagielBruntink closed 2 years ago

MagielBruntink commented 2 years ago

Describe the bug

Since recent changes to DB logic in the FASTEN server and plugins, the Quality Analyzer plugin has been broken. It runs into DataAccess exceptions when accessing the DB.

These are the relevant changes:

image

To Reproduce

Steps to reproduce the behavior:

  1. Check out DC branch https://github.com/fasten-project/fasten-docker-deployment/tree/fasten-pipeline-release-0.0.9
  2. Delete docker-volumes/fasten
  3. docker-compose --profile java up -d --build
  4. Browse to http://localhost:9080/api/mvn/packages/log4j:log4j/1.2.17
  5. Observe the container log of fasten-docker-deployment-fasten-rapid-metadata-plugin-1 to see it run into DataAccess exceptions.
mir-am commented 2 years ago

Hi @MagielBruntink,

Thanks for reporting this issue. I will look into it ASAP.

mir-am commented 2 years ago

Following the above steps, the Rapid plugin produces results to the fasten.RapidPlugin.java.callable.priority.out and it produced 5022 records by ingesting log4j:log4j:1.2.17. However, I also acknowledge that it gives UnrecoverableError, which is caused by DataAccessException. This means the plugin could not either query the DB or connect to it. So, our logic here is that the plugin should be restarted and try the input record again. Previously, the plugin did not stop due to DataAccessException after 3 re-tries and hence it simply skips an input record. If you do not like this behavior for the Rapid plugin, please feel free to revert this commit 29d20b9eee5ffd44a0c7420a56f3f7edc96db26c.

MagielBruntink commented 2 years ago

The cause of crashes seems to be the various (incompatible) version of the JOOQ dependency. I will remove all those deps in each plugin and keep only the one in fasten.core.

MagielBruntink commented 2 years ago

@mir-am these exception handling changes have actually brought to light a bug :-) in the quality analyzer. Fix incoming!

mir-am commented 2 years ago

@mir-am these exception handling changes have actually brought to light a bug :-) in the quality analyzer. Fix incoming!

Ok, Interesting! :D