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] Unable to decompile parallel tasks back to sequential in command calm decompile bp #286

Open
pipoe2h opened this issue Feb 14, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@pipoe2h
Copy link

pipoe2h commented Feb 14, 2024

Describe the bug
In the UI is possible to move from parallel tasks back to sequential. This is not supported with DSL, either using decompile or by creating a new one from scratch

Branch/Container
master

To Reproduce
Steps to reproduce the behavior:

  1. Create a workflow like the screenshot in the UI
  2. Decompile with DSL

Expected behavior
DSL should be able to handle this workflow

Findings/Troubleshooting Done
If there is some findings when/why it happens

Available Logs/Data

[2024-02-14 10:37:28] [INFO] [calm.dsl.decompile.decompile_render:46] Formatting blueprint file using black
Traceback (most recent call last):
  File "/usr/local/bin/calm", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/calm/dsl/cli/utils.py", line 147, in invoke
    return super().invoke(ctx)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/calm/dsl/cli/utils.py", line 147, in invoke
    return super().invoke(ctx)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/calm/dsl/cli/bp_commands.py", line 160, in _decompile_bp
    decompile_bp(name, bp_file, with_secrets, prefix, bp_dir, passphrase)
  File "/usr/local/lib/python3.11/site-packages/calm/dsl/cli/bps.py", line 554, in decompile_bp
    decompile_bp_from_server(
  File "/usr/local/lib/python3.11/site-packages/calm/dsl/cli/bps.py", line 582, in decompile_bp_from_server
    _decompile_bp(
  File "/usr/local/lib/python3.11/site-packages/calm/dsl/cli/bps.py", line 668, in _decompile_bp
    create_bp_dir(
  File "/usr/local/lib/python3.11/site-packages/calm/dsl/decompile/decompile_render.py", line 47, in create_bp_dir
    bp_data = format_str(bp_data, mode=FileMode())
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/black/__init__.py", line 1163, in format_str
    dst_contents = _format_str_once(src_contents, mode=mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/black/__init__.py", line 1173, in _format_str_once
    src_node = lib2to3_parse(src_contents.lstrip(), mode.target_versions)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/black/parsing.py", line 128, in lib2to3_parse
    raise exc from None
black.parsing.InvalidInput: Cannot parse: 64:0:                     with branch(p2):

Screenshots
image

** System Configuration:**

  • OS: Linux
  • Python: 3.11.2

Additional context
Blueprint attached
dsl_decompile_parallel.json

@pipoe2h pipoe2h added the bug Something isn't working label Feb 14, 2024
dwivediprab pushed a commit that referenced this issue Mar 15, 2024
Change of string text from "existing_markeplace_runbook" to
**existing_marketplace_runbook**

(cherry picked from commit ddfd8edee8e31b8cde76bf9250ff4e2ccad21949)
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