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 multi-worker workflows: #875

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

jacobweinstock
Copy link
Member

Description

This fixes multi worker workflows. Previously, across workers, multitask workflows updating of the workflow status of each action after the first task didn't take previous tasks into account. Now it does.

Why is this needed

Fixes: #

How Has This Been Tested?

manually tested with Tink stack v0.4.3 helm chart.

Here's the template I tested with:

apiVersion: "tinkerbell.org/v1alpha1"
kind: Template
metadata:
  name: multiworker
  namespace: tink-system
spec:
  data: |
    version: "0.1"
    name: multiworker
    global_timeout: 9800
    tasks:
      - name: "task 1"
        worker: "{{.device_1}}"
        volumes:
          - /dev:/dev
          - /dev/console:/dev/console
          - /lib/firmware:/lib/firmware:ro
        actions:
          - name: "action 1"
            image: alpine
            timeout: 120
            command: ["sleep", "2"]
          - name: "action 2"
            image: alpine
            timeout: 120
            command: ["sleep", "2"]
          - name: "action 3"
            image: alpine
            timeout: 120
            command: ["sleep", "2"]
      - name: "task 2"
        worker: "{{.device_1}}"
        volumes:
          - /dev:/dev
          - /dev/console:/dev/console
          - /lib/firmware:/lib/firmware:ro
        actions:
          - name: "action 1"
            image: alpine
            timeout: 120
            command: ["sleep", "2"]
          - name: "action 2"
            image: alpine
            timeout: 120
            command: ["sleep", "2"]
          - name: "action 3"
            image: alpine
            timeout: 120
            command: ["sleep", "2"]
      - name: "task 3"
        worker: "{{.device_2}}"
        volumes:
          - /dev:/dev
          - /dev/console:/dev/console
          - /lib/firmware:/lib/firmware:ro
        actions:
          - name: "sleep 1"
            image: alpine
            timeout: 120
            command: ["sleep", "2"]
          - name: "sleep 2"
            image: alpine
            timeout: 120
            command: ["sleep", "2"]
      - name: "task 4"
        worker: "{{.device_2}}"
        volumes:
          - /dev:/dev
          - /dev/console:/dev/console
          - /lib/firmware:/lib/firmware:ro
        actions:
          - name: "action 1"
            image: alpine
            timeout: 120
            command: ["sleep", "2"]
          - name: "action 2"
            image: alpine
            timeout: 120
            command: ["sleep", "2"]

How are existing users impacted? What migration steps/scripts do we need?

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • added unit or e2e tests
  • provided instructions on how to upgrade

Previously, multitask workflows updating
of the workflow status of each action after
the first task didn't take previous tasks into
account. Now it does.

Signed-off-by: Jacob Weinstock <[email protected]>
@jacobweinstock jacobweinstock added the kind/bug Categorizes issue or PR as related to a bug. label Feb 1, 2024
Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f2c141f) 51.09% compared to head (af82c36) 51.23%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #875      +/-   ##
==========================================
+ Coverage   51.09%   51.23%   +0.13%     
==========================================
  Files          33       33              
  Lines        1456     1460       +4     
==========================================
+ Hits          744      748       +4     
  Misses        666      666              
  Partials       46       46              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jacobweinstock jacobweinstock added the ready-to-merge Signal to Mergify to merge the PR. label Feb 1, 2024
@mergify mergify bot merged commit 26be9ca into tinkerbell:main Feb 1, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. ready-to-merge Signal to Mergify to merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants