-
Notifications
You must be signed in to change notification settings - Fork 32
Implement multi-task multi-agent functionality in Workflows #330
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
Implement multi-task multi-agent functionality in Workflows #330
Conversation
templateRending -> templateRendering Signed-off-by: Jacob Weinstock <[email protected]>
This is required by the spec. Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements multi-task multi-agent functionality in Workflows while fixing a typo in the template rendering field name. The main changes enable workflows to handle tasks assigned to different agents and properly transition between them.
- Implements logic to detect when a workflow should transition between tasks with different agents
- Adds comprehensive tests for multi-agent workflow scenarios
- Fixes the field name from
templateRendingtotemplateRenderingacross API definitions and CRDs
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| reconciler.go | Adds updateAgentIDIfNeeded function and integrates agent transition logic into reconciliation |
| reconciler_test.go | Comprehensive test suite for agent ID updates and multi-task workflow scenarios |
| workflow.go | Fixes typo in API struct field name and kubebuilder annotation |
| tinkerbell.org_workflows.yaml | Updates CRD field names to match corrected API |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…ll#330) ## Description There are no breaking changes in this PR. This fixes a typo in the Workflow status API: `templateRending` -> `templateRendering`. This also implements multi-task, multi-agent Workflows. The example below shows a Template with 2 tasks that are assigned to 2 different Agents. ```yaml apiVersion: tinkerbell.org/v1alpha1 kind: Template metadata: name: multi-agent spec: data: | name: multi-agent global_timeout: 90 tasks: - name: "first task" worker: "{{.agent2}}" actions: - name: "action 1" image: alpine timeout: 60 command: ["sleep", "4"] - name: "second task" worker: "{{.agent2}}" actions: - name: "action 1" image: alpine timeout: 60 command: ["sleep", "4"] ``` Here's the corresponding Workflow: ```yaml apiVersion: "tinkerbell.org/v1alpha1" kind: Workflow metadata: name: multi-agent spec: templateRef: multi-agent hardwareMap: agent1: "1234" agent2: "5678" ``` ## Why is this needed Fixes: # ## How Has This Been Tested? ## 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
…ll#330) ## Description There are no breaking changes in this PR. This fixes a typo in the Workflow status API: `templateRending` -> `templateRendering`. This also implements multi-task, multi-agent Workflows. The example below shows a Template with 2 tasks that are assigned to 2 different Agents. ```yaml apiVersion: tinkerbell.org/v1alpha1 kind: Template metadata: name: multi-agent spec: data: | name: multi-agent global_timeout: 90 tasks: - name: "first task" worker: "{{.agent2}}" actions: - name: "action 1" image: alpine timeout: 60 command: ["sleep", "4"] - name: "second task" worker: "{{.agent2}}" actions: - name: "action 1" image: alpine timeout: 60 command: ["sleep", "4"] ``` Here's the corresponding Workflow: ```yaml apiVersion: "tinkerbell.org/v1alpha1" kind: Workflow metadata: name: multi-agent spec: templateRef: multi-agent hardwareMap: agent1: "1234" agent2: "5678" ``` ## Why is this needed Fixes: # ## How Has This Been Tested? ## 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
…ll#330) ## Description There are no breaking changes in this PR. This fixes a typo in the Workflow status API: `templateRending` -> `templateRendering`. This also implements multi-task, multi-agent Workflows. The example below shows a Template with 2 tasks that are assigned to 2 different Agents. ```yaml apiVersion: tinkerbell.org/v1alpha1 kind: Template metadata: name: multi-agent spec: data: | name: multi-agent global_timeout: 90 tasks: - name: "first task" worker: "{{.agent2}}" actions: - name: "action 1" image: alpine timeout: 60 command: ["sleep", "4"] - name: "second task" worker: "{{.agent2}}" actions: - name: "action 1" image: alpine timeout: 60 command: ["sleep", "4"] ``` Here's the corresponding Workflow: ```yaml apiVersion: "tinkerbell.org/v1alpha1" kind: Workflow metadata: name: multi-agent spec: templateRef: multi-agent hardwareMap: agent1: "1234" agent2: "5678" ``` ## Why is this needed Fixes: # ## How Has This Been Tested? ## 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
Description
There are no breaking changes in this PR. This fixes a typo in the Workflow status API:
templateRending->templateRendering. This also implements multi-task, multi-agent Workflows. The example below shows a Template with 2 tasks that are assigned to 2 different Agents.Here's the corresponding Workflow:
Why is this needed
Fixes: #
How Has This Been Tested?
How are existing users impacted? What migration steps/scripts do we need?
Checklist:
I have: