Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurency doesn't cancel runs and recoverMissedSchedules:NONE doesn't skip triggers #7429

Open
NovytskyiD opened this issue Feb 17, 2025 · 1 comment
Assignees
Labels
area/backend Needs backend code changes area/frontend Needs frontend code changes bug Something isn't working

Comments

@NovytskyiD
Copy link

Describe the issue

I have created a flow that executes 1 minute and trigger that run this job every 20 seconds.
I added concurrency limit = 1 and recoverMissedSchedules: NONE so I expect, that missed runs will be skipped, but in API I see, that it uses old triggers and don't see any canceled executions

id: simpleFlowConcurencyTest
namespace: pl.customerflows

concurrency:
  limit: 1
  behavior: CANCEL

tasks:
  - id: wait
    type: "io.kestra.plugin.scripts.python.Script"
    script: |
      import time
      print("Starting script...")
      time.sleep(60)
      print("Script finished after 60 seconds.")

triggers:
  - id: every20secSkipMissed
    type: io.kestra.plugin.core.trigger.Schedule
    disabled: false
    cron: "*/20 * * * * *"  # Runs every 20 seconds
    withSeconds: true
    recoverMissedSchedules: NONE

Image

output from API button - execution created at 08:29:31, but trigger is "date": "2025-02-17T08:25:40Z"

{
 "id": "7XjpVOg5NhO11qm1JpegLM",
 "namespace": "pl.customerflows",
 "flowId": "simpleFlowConcurencyTest",
 "flowRevision": 1,
 "taskRunList": [
   {
     "id": "5TgL4eB5O9kVpjL3voOjZ3",
     "executionId": "7XjpVOg5NhO11qm1JpegLM",
     "namespace": "pl.customerflows",
     "flowId": "simpleFlowConcurencyTest",
     "taskId": "wait",
     "attempts": [
       {
         "state": {
           "current": "SUCCESS",
           "histories": [
             {
               "state": "CREATED",
               "date": "2025-02-17T08:29:31.144Z"
             },
             {
               "state": "RUNNING",
               "date": "2025-02-17T08:29:31.144Z"
             },
             {
               "state": "SUCCESS",
               "date": "2025-02-17T08:30:32.427Z"
             }
           ],
           "endDate": "2025-02-17T08:30:32.427Z",
           "startDate": "2025-02-17T08:29:31.144Z",
           "duration": "PT1M1.283S"
         }
       }
     ],
     "outputs": {
       "vars": {

       },
       "exitCode": 0,
       "taskRunner": {
         "containerId": "c7219185c8499730f2ac949c1f877a028893b10f23cfdb31f22a4bfc65277fc9"
       },
       "outputFiles": {

       }
     },
     "state": {
       "current": "SUCCESS",
       "histories": [
         {
           "state": "CREATED",
           "date": "2025-02-17T08:29:30.263Z"
         },
         {
           "state": "RUNNING",
           "date": "2025-02-17T08:29:31.140Z"
         },
         {
           "state": "SUCCESS",
           "date": "2025-02-17T08:30:32.427Z"
         }
       ],
       "endDate": "2025-02-17T08:30:32.427Z",
       "startDate": "2025-02-17T08:29:30.263Z",
       "duration": "PT1M2.164S"
     }
   }
 ],
 "labels": [],
 "variables": {
   "schedule": {
     "date": "2025-02-17T08:25:40Z",
     "next": "2025-02-17T08:26:00Z",
     "previous": "2025-02-17T08:25:20Z"
   }
 },
 "state": {
   "current": "SUCCESS",
   "histories": [
     {
       "state": "CREATED",
       "date": "2025-02-17T08:29:30.223Z"
     },
     {
       "state": "RUNNING",
       "date": "2025-02-17T08:29:30.263Z"
     },
     {
       "state": "SUCCESS",
       "date": "2025-02-17T08:30:32.864Z"
     }
   ],
   "endDate": "2025-02-17T08:30:32.864Z",
   "startDate": "2025-02-17T08:29:30.223Z",
   "duration": "PT1M2.641S"
 },
 "originalId": "7XjpVOg5NhO11qm1JpegLM",
 "trigger": {
   "id": "every20secSkipMissed",
   "type": "io.kestra.plugin.core.trigger.Schedule",
   "variables": {
     "date": "2025-02-17T08:25:40Z",
     "next": "2025-02-17T08:26:00Z",
     "previous": "2025-02-17T08:25:20Z"
   }
 },
 "deleted": false,
 "metadata": {
   "attemptNumber": 1,
   "originalCreatedDate": "2025-02-17T08:29:30.223Z"
 }
}

Environment

  • Kestra Version: 0.21.2
@NovytskyiD NovytskyiD added area/backend Needs backend code changes area/frontend Needs frontend code changes bug Something isn't working labels Feb 17, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Issues Feb 17, 2025
@tchiotludo
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend Needs backend code changes area/frontend Needs frontend code changes bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

3 participants