You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "narrowizard (via GitHub)" <gi...@apache.org> on 2023/03/08 09:36:02 UTC

[GitHub] [incubator-devlake] narrowizard opened a new issue, #4615: [Feature][Module Name] Feature title

narrowizard opened a new issue, #4615:
URL: https://github.com/apache/incubator-devlake/issues/4615

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and found no similar feature requirement.
   
   
   ### Use case
   
   As a user of devlake, I want to see a clear error message when the service encounters an exception, so that I can understand the reason for the failure and take appropriate actions.
   
   ### Description
   
   Using DevLake to handle tasks in a production environment. When the service abruptly terminates, the tasks that rely on the exception pipeline may suddenly stop without completing cleanup operations and leaving behind residual data.
   
   Currently, when starting the devlake service and finding an exception pipeline caused by above reason during the pipeline check, there is no error message displayed to the user. This makes it difficult for users to identify the problem and resolve it quickly.
   
   We propose adding an error message saying "The process was terminated unexpectedly" or something similar to provide clarity in such scenarios. This would help developers to quickly diagnose and troubleshoot issues with the pipeline.
   
   By implementing this feature, users will be able to get more detailed feedback on what may have gone wrong and act accordingly.
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: commits-unsubscribe@devlake.apache.org.apache.org

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


[GitHub] [incubator-devlake] klesh commented on issue #4615: [Feature][Framework] Provide error message when check pipeline on startup

Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on issue #4615:
URL: https://github.com/apache/incubator-devlake/issues/4615#issuecomment-1462172444

   @d4x1 I think @narrowizard was referring to those pipelines/tasks getting marked as `TASK_FAILED` during the bootup process, which are of course got "Terminated Unexpectedly" from the previous container.
   
   I think what we should do is adding a `meesage`  when updating the `status` in https://github.com/apache/incubator-devlake/blob/0467a4db41b71ac5cc385e1b555a0503f2411408/backend/server/services/pipeline.go#L76


-- 
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: commits-unsubscribe@devlake.apache.org

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


[GitHub] [incubator-devlake] klesh commented on issue #4615: [Feature][Framework] Provide error message when check pipeline on startup

Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on issue #4615:
URL: https://github.com/apache/incubator-devlake/issues/4615#issuecomment-1463282493

   @d4x1 no, not really.
   The key is that when we are booting up the `devlake` container,
   there should not be any `running` pipelines/tasks since the executor is not even started.
   So, all those `running` pipelines/tasks must be createdg by the previous process. It happens when users restart the container while some pipelines/tasks are still running.
   The only thing we can do is to mark them as FAILED and update the `message` field according.
   
   Simply put, adding a `message` to the field is sufficient IMO.
   


-- 
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: commits-unsubscribe@devlake.apache.org

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


[GitHub] [incubator-devlake] d4x1 commented on issue #4615: [Feature][Framework] Provide error message when check pipeline on startup

Posted by "d4x1 (via GitHub)" <gi...@apache.org>.
d4x1 commented on issue #4615:
URL: https://github.com/apache/incubator-devlake/issues/4615#issuecomment-1460076527

   Sounds interesting and not difficult, do you have  any design doc ? I can help to implement this feature.


-- 
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: commits-unsubscribe@devlake.apache.org

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


[GitHub] [incubator-devlake] mindlesscloud closed issue #4615: [Feature][Framework] Provide error message when check pipeline on startup

Posted by "mindlesscloud (via GitHub)" <gi...@apache.org>.
mindlesscloud closed issue #4615: [Feature][Framework] Provide error message when check pipeline on startup
URL: https://github.com/apache/incubator-devlake/issues/4615


-- 
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: commits-unsubscribe@devlake.apache.org

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


[GitHub] [incubator-devlake] d4x1 commented on issue #4615: [Feature][Framework] Provide error message when check pipeline on startup

Posted by "d4x1 (via GitHub)" <gi...@apache.org>.
d4x1 commented on issue #4615:
URL: https://github.com/apache/incubator-devlake/issues/4615#issuecomment-1463287742

   
   > @d4x1 no, not really.
   > 
   > The key is that when we are booting up the `devlake` container,
   > 
   > there should not be any `running` pipelines/tasks since the executor is not even started.
   > 
   > So, all those `running` pipelines/tasks must be created by the previous process. It happens when users restart the container while some pipelines/tasks are still running.
   > 
   > The only thing we can do is to mark them as FAILED and update the `message` field according.
   > 
   > 
   > 
   > Simply put, adding a `message` to the field is sufficient IMO.
   > 
   > 
   
   I get it.
   
   How about the `panic(err)`? 


-- 
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: commits-unsubscribe@devlake.apache.org

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


[GitHub] [incubator-devlake] klesh commented on issue #4615: [Feature][Framework] Provide error message when check pipeline on startup

Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on issue #4615:
URL: https://github.com/apache/incubator-devlake/issues/4615#issuecomment-1462174689

   @d4x1 I have assigned the issue to you, let me know if you need help or further information. Thank you very much.


-- 
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: commits-unsubscribe@devlake.apache.org

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


[GitHub] [incubator-devlake] d4x1 commented on issue #4615: [Feature][Framework] Provide error message when check pipeline on startup

Posted by "d4x1 (via GitHub)" <gi...@apache.org>.
d4x1 commented on issue #4615:
URL: https://github.com/apache/incubator-devlake/issues/4615#issuecomment-1460132892

   > Sounds interesting and not difficult, do you have any design doc ? I can help to implement this feature.
   
   I have read this [architecture doc](https://devlake.apache.org/docs/Overview/Architecture), it seems that pipeline is working on the `runner` which is a process in another machine theoretically(Am I right?).
   
   And I find `errors.Error` 
   ```
   type Error interface {
   	requiredSupertype
   	// Messages the message associated with this Error.
   	Messages() Messages
   	// GetType gets the Type of this error
   	GetType() *Type
   	// As Attempts to cast this Error to the requested Type, and returns nil if it can't.
   	As(*Type) Error
   	// GetData returns the data associated with this Error (may be nil)
   	GetData() interface{}
   }
   ```
    is the return parameter in `RunPipeline`, it contains some message. Is that enough to produce the target error message to user?
   
   When we get the error message, it should be printed on runner's console? or just return to api server?
   
   


-- 
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: commits-unsubscribe@devlake.apache.org

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


[GitHub] [incubator-devlake] d4x1 commented on issue #4615: [Feature][Framework] Provide error message when check pipeline on startup

Posted by "d4x1 (via GitHub)" <gi...@apache.org>.
d4x1 commented on issue #4615:
URL: https://github.com/apache/incubator-devlake/issues/4615#issuecomment-1463242014

   > 
   
   
   
   > @d4x1 I think @narrowizard was referring to those pipelines/tasks getting marked as `TASK_FAILED` during the bootup process, which are of course got "Terminated Unexpectedly" from the previous container.
   > 
   > I think what we should do is adding a `meesage` when updating the `status` in
   > 
   > https://github.com/apache/incubator-devlake/blob/0467a4db41b71ac5cc385e1b555a0503f2411408/backend/server/services/pipeline.go#L76
   
   Then what I should do is reading all failed tasks and pipelines and log them with the  `globalPipelineLog` ?  I think `warn` level is proper. 
   
   By the way, I have found there are lots of `panic(err)` in function `pipelineServiceInit`(and other places in this project),  I think exposing errors to the caller `ExecuteMigration` will be more golang-idiomatic.  Do you agree ?
   
   If there is no doubleļ¼Œ I'll do it.


-- 
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: commits-unsubscribe@devlake.apache.org

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


[GitHub] [incubator-devlake] klesh commented on issue #4615: [Feature][Framework] Provide error message when check pipeline on startup

Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on issue #4615:
URL: https://github.com/apache/incubator-devlake/issues/4615#issuecomment-1463384898

   @d4x1 I think they are irrelevant, those `panic` would suggest that `devlake` encountered sth wrong during the bootup process. Not necessarily related to what we are trying to solve here. 


-- 
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: commits-unsubscribe@devlake.apache.org

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