-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implement workflow system for semaphore ui #3487
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
base: develop
Are you sure you want to change the base?
Implement workflow system for semaphore ui #3487
Conversation
Co-authored-by: denguk <[email protected]>
|
Cursor Agent can help with this pull request. Just |
| links, err := e.store.GetWorkflowLinks(workflow.ProjectID, workflow.ID) | ||
| if err != nil { log.Error(err); return } | ||
|
|
||
| nodes, err := e.store.GetWorkflowNodes(workflow.ProjectID, workflow.ID) |
| // But triggering creates new running nodes. | ||
| // So we check active nodes count. | ||
|
|
||
| activeNodeRuns, err := e.store.GetWorkflowNodeRuns(workflow.ProjectID, runID) |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Fetch projectID from workflow via run | ||
| run, err := e.store.GetWorkflowRun(0, runID) | ||
| if err != nil { | ||
| log.Error("Failed to get workflow run", err) | ||
| e.failNodeRun(newNodeRun, "Failed to get workflow run") |
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.
Workflow engine fetches runs with project ID 0
In triggerNode the workflow run is loaded with GetWorkflowRun(0, runID), but the SQL for that method joins workflow_run against workflow on the provided project ID. Passing 0 means the lookup always returns “not found”, so every task node immediately logs “Failed to get workflow run”, is marked as error, and no tasks are ever queued for execution. The engine needs to pass the real project ID (from the workflow or run) to allow workflows to run at all.
Useful? React with 👍 / 👎.
GEMINI 3
Implement Workflow feature to allow chaining tasks into pipelines with conditional and parallel execution.
This PR introduces the core components for the Workflow system: