You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/11 01:16:59 UTC

[GitHub] [arrow-ballista] tfeda opened a new pull request, #340: Add `cancel_job` REST API

tfeda opened a new pull request, #340:
URL: https://github.com/apache/arrow-ballista/pull/340

   Hi all! Hope to get more involved with the project over the next few weeks. Thought id start with some easier items.
   
   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   part of #265
   
    # Rationale for this change
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   # What changes are included in this PR?
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   Moved grpc cancellation logic to `SchedulerState` so that it could be reused by the REST interface. Kept error handling behavior the same, but added a 404 return when canceling a job that doesn't exist.
   
   # Are there any user-facing changes?
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   For any long running tasks, users can execute a *PATCH* request on the job. for example: 
   
   
   `curl -X PATCH -v -H 'Accept: application/json'  http://localhost:50050/api/job/25UPl4w | jq`
   
   ### _NOTE_
   When testing out this addition, I found that cancelling the job causes a few errors:
   
   1. The scheduler always fails its grpc call to the executor to `cancel_tasks()`, and returns with an `Unipmlemented` code. From looking at the executor logs, it doesn't seem to even reach them.
   
   3. The scheduler goes into an infinite loop 
          
   ![image](https://user-images.githubusercontent.com/36749299/194974515-d858b9ac-b183-47d3-b0c0-3661e8b48011.png)
   
   I think the bugs are unrelated. I'm happy to help debug, but I thought I'd post what I had since the changes are useful for debugging with `curl`
   
   
   
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->
   


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-ballista] andygrove commented on pull request #340: Add `cancel_job` REST API

Posted by GitBox <gi...@apache.org>.
andygrove commented on PR #340:
URL: https://github.com/apache/arrow-ballista/pull/340#issuecomment-1274034615

   This is looking great. Thanks @tfeda. Could you also update the REST API documentation at `docs/source/user-guide/scheduler.md` ?
   
   I also see that infinite loop issue when jobs fail. I just filed https://github.com/apache/arrow-ballista/issues/341 to track this.


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-ballista] mingmwang commented on pull request #340: Add `cancel_job` REST API

Posted by GitBox <gi...@apache.org>.
mingmwang commented on PR #340:
URL: https://github.com/apache/arrow-ballista/pull/340#issuecomment-1276417749

   Ah, this is a known issue, actually I added the failed job check in the pop_next_task() loop.
   Without such check, the scheduler loop will try to schedule the pending tasks from failed job which would be worse !!
   
   @yahoNanJing 
   Please take a look and have a fix.


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-ballista] andygrove merged pull request #340: Add `cancel_job` REST API

Posted by GitBox <gi...@apache.org>.
andygrove merged PR #340:
URL: https://github.com/apache/arrow-ballista/pull/340


-- 
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: github-unsubscribe@arrow.apache.org

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