dosubot[bot] commented on issue #8229:
URL: 
https://github.com/apache/incubator-devlake/issues/8229#issuecomment-2514024214

   <!-- Greeting -->
   @The0Danktor Hello there! I'm here to help you with any bugs, questions, or 
contributions you have in mind. If you need assistance, feel free to ask.
   
   <!-- Answer -->
   The issue you're encountering is due to the `duration_sec` field being 
defined as an unsigned bigint, which cannot store negative values. This results 
in an "Out of range value" error when a workflow has a negative duration 
<sup>[[1]](https://github.com/apache/incubator-devlake-website/blob/main/static/img/DomainLayerSchema/domain_layer_model_v0.17.ndm2)</sup>.
   
   To address this, you have a couple of options:
   
   1. **Convert Negative Durations to Positive**: Modify the logic in the 
`extractJobs` subtask to convert negative durations to positive values before 
storing them. This can be done by taking the absolute value of the duration.
   
   2. **Change the Database Field Type**: Alter the database schema to allow 
negative values by changing the `duration_sec` field from an unsigned bigint to 
a signed bigint. This would allow the storage of negative durations without 
errors.
   
   Both approaches have their pros and cons, and the choice depends on how you 
want to handle negative durations in your data analysis. If you decide to 
submit a pull request, ensure that the changes are well-documented and tested 
to prevent any unintended side effects.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@devlake.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to