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

Workflow stuck with concurrency value of 0. #259

Closed
nzlosh opened this issue Oct 24, 2023 · 0 comments · Fixed by #260
Closed

Workflow stuck with concurrency value of 0. #259

nzlosh opened this issue Oct 24, 2023 · 0 comments · Fixed by #260
Labels

Comments

@nzlosh
Copy link
Contributor

nzlosh commented Oct 24, 2023

Orquesta workflow

If a workflow is defined with a concurrency of 0, Orquesta will remain in a running blocked state.

meta

---
name: count_loop
pack: test
description: Count the number of with items executed using concurrency 1.
runner_type: orquesta
entry_point: "workflows/count_loop.yaml"
enabled: true
parameters:
  iterations:
    type: integer
    default: 5

workflow

version: 1.0

input:
  - iterations

tasks:
  display_message:
    with:
      items: <% range(ctx(iterations)) %>
      concurrency: 0
    action: core.local
    input:
      cmd: "echo <% item() %> ; sleep 2"

Actual result

# st2 execution get 653780da88bb8d51b229d4c0                                                                                                            
id: 653780da88bb8d51b229d4c0                                                                                                                                        
action.ref: test.count_loop                                                                                                                                         
parameters:                                                                                                                                                         
  iterations: 10                                                                                                                                                    
status: running (21s elapsed)                                                                                                                                       
start_timestamp: Tue, 24 Oct 2023 08:31:22 UTC                                                                                                                      
end_timestamp:                                                                                                                                                      
log:                                                                                                                                                                
  - status: requested                                                                                                                                               
    timestamp: '2023-10-24T08:31:22.178000Z'                                                                                                                        
  - status: scheduled                                                                                                                                               
    timestamp: '2023-10-24T08:31:22.229000Z'                                                                                                                        
  - status: running                                                                                                                                                 
    timestamp: '2023-10-24T08:31:22.272000Z'                                                                                                                        
result:                                                                                                                                                                                           
  output: null

Expected result

In the case of negative numbers, Orquesta raises an error. `0` should also be classed as an error like negative numbers.
# st2 execution get 653788d088bb8d51b229d4c9
id: 653788d088bb8d51b229d4c9
action.ref: test.count_loop
parameters: 
  iterations: 10
status: failed (0s elapsed)
start_timestamp: Tue, 24 Oct 2023 09:05:20 UTC
end_timestamp: Tue, 24 Oct 2023 09:05:20 UTC
log: 
  - status: requested
    timestamp: '2023-10-24T09:05:20.688000Z'
  - status: scheduled
    timestamp: '2023-10-24T09:05:20.741000Z'
  - status: running
    timestamp: '2023-10-24T09:05:20.786000Z'
  - status: failed
    timestamp: '2023-10-24T09:05:20.845000Z'
result: 
  errors:
  - message: -1 is not valid under any of the given schemas
    schema_path: properties.tasks.patternProperties.^\w+$.properties.with.properties.concurrency.oneOf
    spec_path: tasks.display_message.with.concurrency
    type: syntax
  output: null
@arm4b arm4b added the bug label Oct 24, 2023
@nzlosh nzlosh linked a pull request Oct 24, 2023 that will close this issue
guzzijones added a commit that referenced this issue Jan 18, 2024
Set concurrency to 1 if 0 supplied. Fix #259
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants