wazuh / wazuh-qa

Wazuh - Quality Assurance
GNU General Public License v2.0
61 stars 30 forks source link

Fix task dependencies #5308

Closed mhamra closed 2 weeks ago

mhamra commented 2 weeks ago

Description

Related issue: #5240

This PR fixes the task dependencies on workflow example files.

mhamra commented 2 weeks ago

UPDATE

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

workflow.log

mhamra commented 2 weeks ago

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 commented 2 weeks ago

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