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] Single VM BP does not keep dependencies in task sequence | calm create bp | calm decompile bp #268

Closed
glover-chris opened this issue Apr 18, 2023 · 2 comments
Assignees
Labels
bug Something isn't working P2 Minor

Comments

@glover-chris
Copy link

Describe the bug
When creating a single VM bp, if you have parallel tasks that then call different sub tasks within each parallel step, all sub tasks are run from each parallel task.

Branch/Container
master

To Reproduce
Steps to reproduce the behavior:

  1. We have a single vm bp with these tasks in the GUI.
    image

  2. DSL decompile of that bp action looks like this .

@action
    def __uninstall__():
        with parallel():
            CalmTask.Exec.powershell(
                name="domain_unjoin",
                filename=os.path.join(
                    "scripts",
                    "Package_Package1_Action___uninstall___Task_domain_unjoin.ps1",
                ),
                cred=ref(BP_CRED_cred_ad),
                target=ref(Service1),
            )
            CalmTask.SetVariable.powershell(
                name="citrix_token",
                filename=os.path.join(
                    "scripts",
                    "Package_Package1_Action___uninstall___Task_citrix_token.ps1",
                ),
                cred=ref(BP_CRED_cred_citrix),
                target=ref(Service1),
                variables=["token"],
            )
        with parallel():
            CalmTask.Exec.powershell(
                name="remove_ad_object",
                filename=os.path.join(
                    "scripts",
                    "Package_Package1_Action___uninstall___Task_remove_ad_object.ps1",
                ),
                cred=ref(BP_CRED_cred_ad),
                target=ref(Service1),
            )
            CalmTask.Exec.powershell(
                name="citrix_cleanup",
                filename=os.path.join(
                    "scripts",
                    "Package_Package1_Action___uninstall___Task_citrix_cleanup.ps1",
                ),
                cred=ref(BP_CRED_cred_citrix),
                target=ref(Service1),
            )
  1. creating the bp with DSL, the tasks looks like this in the GUI. You can see the first parallel tasks run but then also call each sub task when they should only call one sub task under the parent.
    image
    with this code in the bp.
@action
    def __uninstall__():
        with parallel():
            CalmTask.Exec.powershell(
                name="domain_unjoin",
                filename=common_task_library + "windows/uninstall/domain_unjoin.ps1",
                cred=ref(BP_CRED_cred_ad),
                target=ref(Service1),
            )
            CalmTask.SetVariable.powershell(
                name="citrix_token",
                filename=common_task_library + "shared/precreate/citrix_token.ps1",
                cred=ref(BP_CRED_cred_citrix),
                target=ref(Service1),
                variables=["token"],
                target_endpoint=Endpoint.use_existing(poshendpoint),
            )
        with parallel():
            CalmTask.Exec.powershell(
                name="remove_ad_object",
                filename=common_task_library + "windows/uninstall/remove_ad_object.ps1",
                cred=ref(BP_CRED_cred_ad),
                target=ref(Service1),
                target_endpoint=Endpoint.use_existing(poshendpoint),
            )
            CalmTask.Exec.powershell(
                name="citrix_cleanup",
                filename=common_task_library + "windows/uninstall/citrix_cleanup.ps1",
                cred=ref(BP_CRED_cred_citrix),
                target=ref(Service1),
                target_endpoint=Endpoint.use_existing(poshendpoint),
            )

Expected behavior
Expecting the task dependencies and sequence to be the same as when created in the GUI versus with DSL.

** System Configuration:**

@glover-chris glover-chris added the bug Something isn't working label Apr 18, 2023
@glover-chris glover-chris changed the title [Bug] Single VM BP does not keep dependencies in task sequence | calm create bp [Bug] Single VM BP does not keep dependencies in task sequence | calm create bp | calm decompile bp Apr 18, 2023
@abhijeetkaurav1st abhijeetkaurav1st added the P2 Minor label May 5, 2023
@abhijeetkaurav1st
Copy link
Collaborator

@sohammehta23 is working on it

abhijeetkaurav1st added a commit that referenced this issue Aug 22, 2023
contains:
1. Release notes
2. Added warnings for blueprint decompilation
3. Mino fixes for bp decompilation with secrets

---------

Co-authored-by: HSDeshpande <[email protected]>
Co-authored-by: Gaurav Pandvia <[email protected]>
(cherry picked from commit 6fe9e48d1e116f271ab31a7839317a63373d90a6)
@abhijeetkaurav1st
Copy link
Collaborator

Fixed in release 3.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 Minor
Projects
None yet
Development

No branches or pull requests

2 participants