eclipse-researchlabs / scava

Eclipse Public License 2.0
7 stars 1 forks source link

API task creation fails silently but still creates unreachable tasks #47

Open davidediruscio opened 4 years ago

davidediruscio commented 4 years ago

When using the API at [1] with a wrong projectId, the requests succeeds (20x), the json answer looks good, but nothing shows up in the UI. It seems the task is actually created, but with no link to the project and thus cannot be shown or used.

[1] https://crossminer.github.io/scava-docs/developers-guide/api-reference-guide/metric-platform-api/

The API should return an error message when something useless or inconsistent happens.

davidediruscio commented 4 years ago

We detected a similar situation during some tests, where our automated process to add projects and analysis tasks using the REST API, was able to create and start analysis tasks without having any project on the database.

This lead to situations where the workers are stuck because it is not possible to analyse these tasks.

We think that CROSSMINER platform should not allow the creation of tasks not associated to a valid project ID.