question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

/tasks/{taskId}/ack always return false

See original GitHub issue

I’m following the add-idents developer lab here and I don’t seem to get the ack task step working.

Question 1 - call to /tasks/{taskId}/ack with correct task id always returns false. Why? Question 2 - (probably because I always get false as the response) I don’t see any changes or effect on Workflow UI being reflected. Is that expected? Question 3 - What does this ack step do exactly? I ended up just skipping this step entirely and the workflow worked fine. The task just changes from SCHEDULED to IN_PROGRESS after polling, and from IN_PROGRESS to COMPLETED after the mocked worker return response. Therefore, I’m confused if the ack call in the middle does anything at all.

For example, here is my response from task polling in this step

{
    "taskType": "add_idents",
    "status": "IN_PROGRESS",
    "inputData": {
        "identType": "animation",
        "contentId": "my_unique_content_id"
    },
    "referenceTaskName": "add_idents_by_type",
    "retryCount": 0,
    "seq": 3,
    "pollCount": 1,
    "taskDefName": "add_idents",
    "scheduledTime": 1579564011353,
    "startTime": 1579564721830,
    "endTime": 0,
    "updateTime": 1579564721830,
    "startDelayInSeconds": 0,
    "retried": false,
    "executed": false,
    "callbackFromWorker": true,
    "responseTimeoutSeconds": 180,
    "workflowInstanceId": "eaa3f523-9f0d-4426-b3f8-36d45a5d78cf",
    "workflowType": "add_netflix_identation",
    "taskId": "8452fcf4-f016-4da3-96a2-ea797068af4e",
    "callbackAfterSeconds": 0,
    "outputData": {},
    "workflowTask": {
        "name": "add_idents",
        "taskReferenceName": "add_idents_by_type",
        "inputParameters": {
            "identType": "${workflow.input.identType}",
            "contentId": "${workflow.input.contentId}"
        },
        "type": "SIMPLE",
        "decisionCases": {},
        "defaultCase": [],
        "forkTasks": [],
        "startDelay": 0,
        "joinOn": [],
        "optional": false,
        "taskDefinition": {
            "createTime": 1579563756480,
            "createdBy": "",
            "name": "add_idents",
            "retryCount": 3,
            "timeoutSeconds": 300,
            "inputKeys": [],
            "outputKeys": [],
            "timeoutPolicy": "TIME_OUT_WF",
            "retryLogic": "FIXED",
            "retryDelaySeconds": 10,
            "responseTimeoutSeconds": 180,
            "inputTemplate": {},
            "rateLimitPerFrequency": 0,
            "rateLimitFrequencyInSeconds": 1
        },
        "defaultExclusiveJoinTask": [],
        "asyncComplete": false,
        "loopOver": []
    },
    "rateLimitPerFrequency": 0,
    "rateLimitFrequencyInSeconds": 0,
    "workflowPriority": 0,
    "iteration": 0,
    "taskDefinition": {
        "present": true
    },
    "loopOverTask": false,
    "queueWaitTime": 710477,
    "taskStatus": "IN_PROGRESS"
}

And then I made the ack call which responded with false

curl --location --request POST 'http://localhost:8080/api/tasks/8452fcf4-f016-4da3-96a2-ea797068af4e/ack' \
--header 'Content-Type: application/json'

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jansonzcommented, Jun 12, 2020

If this is not required anymore why the supplied clients still do that? The Python client doesn’t work for sure as it expects true on Ack action

1reaction
ballooniocommented, Feb 4, 2020

@kishorebanala Cool, I will create a PR and subscribe you guys

Read more comments on GitHub >

github_iconTop Results From Across the Web

This condition will always return false since the types Light ...
I was working on PuruVJ/macos-web with Visual Studio 2019 and got this error: Error TS2367 (TS) This condition will always return false since ......
Read more >
"This condition will always return 'false'" but returns true at ...
src/a.ts:2:9 - error TS2367: This condition will always return 'false' since the types 'string' and 'number' have no overlap.
Read more >
Best practice: Is it ok to [return false] mid-function? : r/javascript
I've always used return false at the start or middle of a function, as a simple check for invalid data that would produce...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found