[
https://issues.apache.org/jira/browse/GOBBLIN-1958?focusedWorklogId=891034&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-891034
]
ASF GitHub Bot logged work on GOBBLIN-1958:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 17/Nov/23 01:46
Start Date: 17/Nov/23 01:46
Worklog Time Spent: 10m
Work Description: phet commented on code in PR #3830:
URL: https://github.com/apache/gobblin/pull/3830#discussion_r1396577229
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/restli/GobblinServiceFlowExecutionResourceHandlerWithWarmStandby.java:
##########
@@ -46,56 +48,38 @@ public
GobblinServiceFlowExecutionResourceHandlerWithWarmStandby(FlowExecutionRe
this.dagActionStore = dagActionStore;
}
+ @Override
+ public void resume(ComplexResourceKey<FlowStatusId, EmptyRecord> key) {
+ FlowStatusId id = key.getKey();
+ addDagAction(id.getFlowGroup(), id.getFlowName(), id.getFlowExecutionId(),
DagActionStore.FlowActionType.RESUME);
+ }
Review Comment:
I'm not familiar enough w/ restli to know whether actions like resume can
actually return a result the way HTTP methods like DELETE (kill) do. I see
that [the
`FlowExecutionResource`](https://github.com/apache/gobblin/blob/a70f53913bb587da3471f946b1518c5c34b7f099/gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowExecutionResource.java#L43)
at least is written for the handlers to behave in this way. that said, when I
use curl to do a resume, I do observe a 200 OK coming back at me. perhaps
that's what's sent if a void method doesn't throw an exception. strictly
speaking, in this case where we queue the work, it should probably be HTTP 202
Accepted.
as for no 404, upon an entity not found, I intuitively agree w/ those
semantics and can't think of a counter-argument. do we think it was merely
forgotten? if so, I'm agree on adding, but suggest we do that on a separate
commit, since this is just a quick bug fix
Issue Time Tracking
-------------------
Worklog Id: (was: 891034)
Time Spent: 40m (was: 0.5h)
> Fix /flowexecutions KILL action to return HTTP 409 when already a pending
> action, not 400
> -----------------------------------------------------------------------------------------
>
> Key: GOBBLIN-1958
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1958
> Project: Apache Gobblin
> Issue Type: Improvement
> Components: gobblin-restli
> Reporter: Kip Kohn
> Assignee: Hung Tran
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> when already a pending action, the current implementation returns 409 for
> RESUME, and 400 for KILL. furthermore it provides no message to the user.
>
> this looks like a bug introduced during recent feature development and/or
> refactoring
--
This message was sent by Atlassian Jira
(v8.20.10#820010)