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

Fix task dependencies #5308

Merged
merged 1 commit into from
May 3, 2024

Conversation

mhamra
Copy link
Contributor

@mhamra mhamra commented Apr 29, 2024

Description

Related issue: #5240

This PR fixes the task dependencies on workflow example files.

@mhamra
Copy link
Contributor Author

mhamra commented Apr 29, 2024

UPDATE

I've run the modified workflow file for the AWS provider and I obtained the following log file:

workflow.log

Copy link
Member

@rauldpm rauldpm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provided log has errors, please review and justify them

#5308 (comment)

Add a log for each YAML file

@mhamra
Copy link
Contributor Author

mhamra commented Apr 30, 2024

EXPLANATION OF THE ERRORS IN THE LOG FILE

The workflow.log file of the previouse comment includes errors because previous runs of the workflow_engine are in the same file.

This log file clean of errors is the result of running the workflow yaml file.

workflow.log

@mhamra
Copy link
Contributor Author

mhamra commented May 2, 2024

UPDATE

I've run this vagrant workflow file. By commenting on some lines, I've reduced the number of virtual machines to reduce the total run time.

dtt1-managers-poc-vagrant.yaml
version: 0.1
description: This workflow is used to test manager deployment for DDT1 PoC
variables:
  manager-os:
    - linux-ubuntu-20.04-amd64
    - linux-ubuntu-22.04-amd64
    - linux-centos-7-amd64
    # - linux-oracle-9-amd64
    # - linux-amazon-2-amd64
    # - linux-redhat-7-amd64
    # - linux-redhat-8-amd64
    # - linux-redhat-9-amd64
    # - linux-centos-8-amd64
    # - linux-debian-10-amd64
    # - linux-debian-11-amd64
    # - linux-debian-12-amd64
  infra-provider: vagrant
  working-dir: /tmp/dtt1-poc

tasks:
  # Unique manager allocate task
  - task: "allocate-manager-{manager}"
    description: "Allocate resources for the manager."
    do:
      this: process
      with:
        path: python3
        args:
          - modules/allocation/main.py
          - action: create
          - provider: "{infra-provider}"
          - size: large
          - composite-name: "{manager}"
          - inventory-output: "{working-dir}/manager-{manager}/inventory.yaml"
          - track-output: "{working-dir}/manager-{manager}/track.yaml"
    on-error: "abort-all"
    foreach:
      - variable: manager-os
        as: manager

  # Generic manager test task
  - task: "run-manager-tests"
    description: "Run tests install for the manager."
    do:
      this: process
      with:
        path: python3
        args:
          - modules/testing/main.py
          - targets:
            - wazuh-1: "{working-dir}/manager-linux-centos-7-amd64/inventory.yaml"
            - wazuh-2: "{working-dir}/manager-linux-ubuntu-20.04-amd64/inventory.yaml"
            - wazuh-3: "{working-dir}/manager-linux-ubuntu-22.04-amd64/inventory.yaml"
            # - wazuh-4: "{working-dir}/manager-linux-oracle-9-amd64/inventory.yaml"
            # - wazuh-5: "{working-dir}/manager-linux-amazon-2-amd64/inventory.yaml"
            # - wazuh-6: "{working-dir}/manager-linux-redhat-7-amd64/inventory.yaml"
            # - wazuh-7: "{working-dir}/manager-linux-redhat-8-amd64/inventory.yaml"
            # - wazuh-8: "{working-dir}/manager-linux-redhat-9-amd64/inventory.yaml"
            # - wazuh-9: "{working-dir}/manager-linux-centos-8-amd64/inventory.yaml"
            # - wazuh-10: "{working-dir}/manager-linux-debian-10-amd64/inventory.yaml"
            # - wazuh-11: "{working-dir}/manager-linux-debian-11-amd64/inventory.yaml"
            # - wazuh-12: "{working-dir}/manager-linux-debian-12-amd64/inventory.yaml"
          - tests: "install,restart,stop,uninstall"
          - component: "manager"
          - wazuh-version: "4.7.4"
          - wazuh-revision: "40717"
          - live: "True"
    depends-on:
      - "allocate-manager-linux-ubuntu-20.04-amd64"
      - "allocate-manager-linux-ubuntu-22.04-amd64"
      - "allocate-manager-linux-centos-7-amd64"
      # - "allocate-manager-linux-amazon-2-amd64"
      # - "allocate-manager-linux-redhat-7-amd64"
      # - "allocate-manager-linux-redhat-8-amd64"
      # - "allocate-manager-linux-redhat-9-amd64"
      # - "allocate-manager-linux-centos-8-amd64"
      # - "allocate-manager-linux-debian-10-amd64"
      # - "allocate-manager-linux-debian-11-amd64"
      # - "allocate-manager-linux-debian-12-amd64"
      # - "allocate-manager-linux-oracle-9-amd64"

Results

No failures observed in the workflow.log file

@pro-akim pro-akim self-requested a review May 3, 2024 12:30
Copy link
Member

@pro-akim pro-akim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Notes

LGTM

@pro-akim pro-akim self-assigned this May 3, 2024
@rauldpm rauldpm merged commit 38d421c into 4495-dtt1-release May 3, 2024
@rauldpm rauldpm deleted the fix/5240-workflow-example-dependencies branch May 3, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DTT1 - The example dtt1-managers-poc-vagrant.yaml fails running the workflow with multiple threads
3 participants