Closed de-jcup closed 4 years ago
We must add a new column to store the product scan id.
Started new feature branch - because there were too much changes inside currently not necessary (and producing to much noise...)
Still todo:
Merged by https://github.com/Daimler/sechub/pull/221 so can close
Defintions
means a job where execution process has been interrupted by a JVM crash, so JOB will never be updated with results from security product. So caller would wait "forever" - like "Waiting for Godot"
Usecases
Restart zombie job
As an administrator I want to be able to restart a job supposed to be a "Zombie". Existing product results shall be re-fetched and job result updated as fast as possible.
Restart (hard) zombie job
As an administrator I want to be able to restart a job supposed to be a "Zombie" in a hard way, means complete job process is restarted. Existing former product results will be dropped.
Situation details
Solution
Adapter resilience via meta data
Access
Restart and Restart (hard) will be done as usual by REST calls. Can only be done by
SUPER_ADMIN
roleAudit
Every restart will show admin ID in autdit log. Also a notification to admins about the restart will be send on success of restart
Integration testing
Formerly mocked adapters did not really do things. But wit introduction of meta data every mocked adaper should at least read/write some dummy data - to simulate the persistence as well. Maybe even a mocked adapter should write same meta data identifier/data as origin one.
What happens when having started a restart accidently to a finished job ?
When a job has been finished, we do not provide any restart! It will give back an HTTP error and (maybe) a notification mail.
What happens when having race condition ?
E.g. A job is not really a zombie, but restart was triggered.
Solution: We try to stop the other running process - but if this would not work we don't bother. Just let the second scan job write again to DB - reason: Result is same, so it doesn't matter, only end time will be changed.