[jira] [Commented] (FLINK-24275) Allow idempotent job cancellation

2022-02-10 Thread Chesnay Schepler (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-24275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17490322#comment-17490322
 ] 

Chesnay Schepler commented on FLINK-24275:
--

IMO we should only document things (in particular in the open api spec) if we 
can enforce&guarantee it in some way, which currently isn't possible due to 
technical limitations. This improvement is tracked in 
https://issues.apache.org/jira/browse/FLINK-26045.

Instead we noted it in the release notes.

> Allow idempotent job cancellation
> -
>
> Key: FLINK-24275
> URL: https://issues.apache.org/jira/browse/FLINK-24275
> Project: Flink
>  Issue Type: Improvement
>  Components: Runtime / REST
>Reporter: Austin Cawley-Edwards
>Assignee: Chesnay Schepler
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.15.0
>
>
> As a user of Flink, I want to be able to cancel a job from an external system 
> in a fault-tolerant way without guessing if the job has already been 
> cancelled.
>  
> Currently, the cancel endpoint (PATCH /jobs/:jobid?mode=cancel) will return a 
> 404 if the job is already cancelled. This makes it hard to detect if the job 
> truly doesn't exist, or if it is already in the desired state.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (FLINK-24275) Allow idempotent job cancellation

2022-02-10 Thread Joe Moser (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-24275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17490310#comment-17490310
 ] 

Joe Moser commented on FLINK-24275:
---

[~chesnay] i was referring to {_}409{_}, so not a successful operation.

> Allow idempotent job cancellation
> -
>
> Key: FLINK-24275
> URL: https://issues.apache.org/jira/browse/FLINK-24275
> Project: Flink
>  Issue Type: Improvement
>  Components: Runtime / REST
>Reporter: Austin Cawley-Edwards
>Assignee: Chesnay Schepler
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.15.0
>
>
> As a user of Flink, I want to be able to cancel a job from an external system 
> in a fault-tolerant way without guessing if the job has already been 
> cancelled.
>  
> Currently, the cancel endpoint (PATCH /jobs/:jobid?mode=cancel) will return a 
> 404 if the job is already cancelled. This makes it hard to detect if the job 
> truly doesn't exist, or if it is already in the desired state.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (FLINK-24275) Allow idempotent job cancellation

2022-02-09 Thread Chesnay Schepler (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-24275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17489361#comment-17489361
 ] 

Chesnay Schepler commented on FLINK-24275:
--

The exit codes for successful operations have not changed.

> Allow idempotent job cancellation
> -
>
> Key: FLINK-24275
> URL: https://issues.apache.org/jira/browse/FLINK-24275
> Project: Flink
>  Issue Type: Improvement
>  Components: Runtime / REST
>Reporter: Austin Cawley-Edwards
>Assignee: Chesnay Schepler
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.15.0
>
>
> As a user of Flink, I want to be able to cancel a job from an external system 
> in a fault-tolerant way without guessing if the job has already been 
> cancelled.
>  
> Currently, the cancel endpoint (PATCH /jobs/:jobid?mode=cancel) will return a 
> 404 if the job is already cancelled. This makes it hard to detect if the job 
> truly doesn't exist, or if it is already in the desired state.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (FLINK-24275) Allow idempotent job cancellation

2022-02-09 Thread Joe Moser (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-24275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17489347#comment-17489347
 ] 

Joe Moser commented on FLINK-24275:
---

[~chesnay] wouldn't it make sense to document the newly introduced response 
codes? (or did i just miss that)

> Allow idempotent job cancellation
> -
>
> Key: FLINK-24275
> URL: https://issues.apache.org/jira/browse/FLINK-24275
> Project: Flink
>  Issue Type: Improvement
>  Components: Runtime / REST
>Reporter: Austin Cawley-Edwards
>Assignee: Chesnay Schepler
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.15.0
>
>
> As a user of Flink, I want to be able to cancel a job from an external system 
> in a fault-tolerant way without guessing if the job has already been 
> cancelled.
>  
> Currently, the cancel endpoint (PATCH /jobs/:jobid?mode=cancel) will return a 
> 404 if the job is already cancelled. This makes it hard to detect if the job 
> truly doesn't exist, or if it is already in the desired state.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (FLINK-24275) Allow idempotent job cancellation

2021-09-20 Thread Austin Cawley-Edwards (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-24275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17417720#comment-17417720
 ] 

Austin Cawley-Edwards commented on FLINK-24275:
---

I see two options:
 * Treat the endpoint imperatively ("Switch this Job to Cancelled")
 ** Fail on already cancelled (i.e. 409)
 * Treat the endpoint declaratively ("Ensure this Job is Cancelled")
 ** Return a success message (i.e., 200, or 202 like is currently returned)

 

You know which fits better with the Flink API concepts than I do, but I would 
lean towards the second option to simplify how users handle it. If duplicate 
calls return an error, users have to classify this error as acceptable. I don't 
see any case where a 409 error is handled any differently than a success.

 

 

 

> Allow idempotent job cancellation
> -
>
> Key: FLINK-24275
> URL: https://issues.apache.org/jira/browse/FLINK-24275
> Project: Flink
>  Issue Type: Improvement
>  Components: Runtime / REST
>Reporter: Austin Cawley-Edwards
>Priority: Major
>
> As a user of Flink, I want to be able to cancel a job from an external system 
> in a fault-tolerant way without guessing if the job has already been 
> cancelled.
>  
> Currently, the cancel endpoint (PATCH /jobs/:jobid?mode=cancel) will return a 
> 404 if the job is already cancelled. This makes it hard to detect if the job 
> truly doesn't exist, or if it is already in the desired state.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FLINK-24275) Allow idempotent job cancellation

2021-09-20 Thread Chesnay Schepler (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-24275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17417544#comment-17417544
 ] 

Chesnay Schepler commented on FLINK-24275:
--

Which response code would you expect? I assume we want a separate one for the 
case where the cancellation was already triggered; like 409 because the job was 
already cancelled?

> Allow idempotent job cancellation
> -
>
> Key: FLINK-24275
> URL: https://issues.apache.org/jira/browse/FLINK-24275
> Project: Flink
>  Issue Type: Improvement
>  Components: Runtime / REST
>Reporter: Austin Cawley-Edwards
>Priority: Major
>
> As a user of Flink, I want to be able to cancel a job from an external system 
> in a fault-tolerant way without guessing if the job has already been 
> cancelled.
>  
> Currently, the cancel endpoint (PATCH /jobs/:jobid?mode=cancel) will return a 
> 404 if the job is already cancelled. This makes it hard to detect if the job 
> truly doesn't exist, or if it is already in the desired state.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)