delphi-hub / delphi-crawler

Delphi's crawling and processing engine to extract facts on open-source software
https://delphi.cs.uni-paderborn.de/
Apache License 2.0
5 stars 11 forks source link

Processing Errors are now Stored in the ElasticSearch Index #48

Closed johannesduesing closed 3 years ago

johannesduesing commented 4 years ago

Reason for this PR As decribed in #31, the Delphi Crawler does not keep track of any errors that may occur during processing of artifacts. If for example the JAR download fails for any reason, the respective artifact will not be stored in the ElasticSearch index, and there is no way of retrying the download at a later point in time.

Changes in this PR (changes relative to #47, needs to be merged first!) The MavenDiscoveryProcess now accounts for different types of processing errors. These errors are caught and redirected to a dedicated actor, which stores them as a new mapping type (MavenProcessingError) in the existing ElasticSearch index named delphi. The initial database setup has been adapted so that the new mapping type is created on startup (for fresh DB instances only!). A MavenProcessingError has four properties:

Closes #31.

Sample ElasticSearch Request GET <elasticsearch>/delphi/error/_search

"hits":[
         {
            "_index":"delphi",
            "_type":"error",
            "_id":"1603115282027",
            "_score":1.0,
            "_source":{
               "identifier":{
                  "groupId":"yan",
                  "artifactId":"yan",
                  "version":"5.0"
               },
               "occurred":"2020-10-19T15:48:02.027+02:00",
               "message":"Got an unexpected HTTP response, code 404 Not Found.",
               "type":"PomDownloadFailed"
            }
         },
         {
            "_index":"delphi",
            "_type":"error",
            "_id":"1603115325347",
            "_score":1.0,
            "_source":{
               "identifier":{
                  "groupId":"yan",
                  "artifactId":"jfunutil",
                  "version":"5.0.2"
               },
               "occurred":"2020-10-19T15:48:45.347+02:00",
               "message":"Got an unexpected HTTP response, code 404 Not Found.",
               "type":"PomDownloadFailed"
            }
         },[...]
]
sonarcloud[bot] commented 4 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

johannesduesing commented 3 years ago

Closed as this functionality is now part of the redesign proposed in #50