-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
None
-
None
-
Not defined
Brief summary of the bug. What is it ? Where is it ?
While deploying the onboarding dataset worked fine on cloud and the persistent environment with Optimize 3.8.1 it failed on master in the stage environment.
Steps to reproduce:
1. Deploy stage using https://ci.optimize.camunda.cloud/view/all/job/deploy-optimize-branch-to-k8s/
Actual result:
2. the following error is logged
08:17:21.681 [main] ERROR o.c.o.s.i.CustomerOnboardingDataImportService - Could not load customer onboarding process instances. Please validate the process instance json file
Expected result:
it should get deployed successfully
Hints:
While having a look at what could be the cause I realised that we have a smell being that the same error message is logged on two different cases, being:
1. the file cannot be found https://github.com/camunda/camunda-optimize/blob/master/backend/src/main/java/org/camunda/optimize/service/importing/CustomerOnboardingDataImportService.java#L124
2. an io error occured reading/parsing the file https://github.com/camunda/camunda-optimize/blob/master/backend/src/main/java/org/camunda/optimize/service/importing/CustomerOnboardingDataImportService.java#L127 + here it's also missed to include the actual exception into the log statement
This makes root-causing harder as we don't know which of the two potential issues we are experiencing.
There is also a small code smell we could resolve while revisiting this code:
- unused return statement and unused local var for this return statement https://github.com/camunda/camunda-optimize/blob/master/backend/src/main/java/org/camunda/optimize/service/importing/CustomerOnboardingDataImportService.java#L129