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

[Bug] Compiling a flow from parallel tasks to a single child fails #287

Open
pipoe2h opened this issue Feb 14, 2024 · 1 comment
Open

[Bug] Compiling a flow from parallel tasks to a single child fails #287

pipoe2h opened this issue Feb 14, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@pipoe2h
Copy link

pipoe2h commented Feb 14, 2024

Describe the bug
There is a workflow with a task that depends on two previous tasks running in parallel to complete. This is possible to model in the UI and when using decompile this is the output

image

    @action
    def __install__():

        with parallel() as p0:
            with branch(p0):
                CalmTask.Delay(name="Task 1", delay_seconds=1, target=ref(Service1))

                CalmTask.Delay(name="Task 3", delay_seconds=1, target=ref(Service1))
            with branch(p0):
                CalmTask.Delay(name="Task 2", delay_seconds=1, target=ref(Service1))

                CalmTask.Delay(name="Task 3", delay_seconds=1, target=ref(Service1))

If you try to build a BP from scratch with DSL using this structure, or if you use the decompiled one and push it back AS-IS with create, it fails:

calm create bp -f delete/blueprint.py -n decompiled_dsl_create_parallel_to_single -fc
/usr/local/lib/python3.11/site-packages/requests/__init__.py:102: RequestsDependencyWarning: urllib3 (1.26.18) or chardet (5.2.0)/charset_normalizer (2.0.12) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported "
[2024-02-14 10:57:02] [ERROR] [calm.dsl.api.connection:324] Oops! Something went wrong.
{
    "error": {
        "api_version": "3.1",
        "code": 422,
        "kind": "blueprint",
        "message_list": [
            {
                "details": {},
                "message": "Duplicate task name Task 3",
                "reason": "INVALID_REQUEST"
            }
        ],
        "state": "ERROR"
    },
    "code": 422
}
[2024-02-14 10:57:02] [ERROR] [calm.dsl.cli.bp_commands:218] {'api_version': '3.1', 'code': 422, 'kind': 'blueprint', 'message_list': [{'details': {}, 'message': 'Duplicate task name Task 3', 'reason': 'INVALID_REQUEST'}], 'state': 'ERROR'}

Branch/Container
master

To Reproduce
Steps to reproduce the behavior:

  1. Upload attached BP
  2. Set credential password (dummy)
  3. DSL decompile
  4. DSL create the decompiled BP without modifying

Expected behavior
Be able to replicate the same workflows in the UI but with DSL

System Configuration:

  • OS: Linux
  • Python: 3.11

Additional context
Blueprint attached
dsl_create_parallel_to_single.json

@pipoe2h pipoe2h added the bug Something isn't working label Feb 14, 2024
@abhijeetkaurav1st
Copy link
Collaborator

Tracking under : https://jira.nutanix.com/browse/CALM-39413

dwivediprab pushed a commit that referenced this issue Mar 15, 2024
Change of text coma to comma

(cherry picked from commit c459a80c920647730539cb37e1b9874484321b93)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants