-
-
Notifications
You must be signed in to change notification settings - Fork 24
Implement workflow orchestration #1138
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: main
Are you sure you want to change the base?
Conversation
2ef29a5
to
882a31a
Compare
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
f3acab3
to
81c7420
Compare
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 a new workflow orchestration module by introducing a workflow engine along with related components for executing and monitoring activities.
- Introduces core components like ActivityTaskManager, ActivityTask, ActivityGroup, and ActivityContext.
- Adds client APIs and REST resources for workflow runs along with serializers and test cases.
Reviewed Changes
Copilot reviewed 117 out of 121 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
workflow-engine/src/main/java/org/dependencytrack/workflow/engine/ActivityTaskManager.java | Implements task polling, processing, and abandonment logic for workflow activities. |
workflow-engine/src/main/java/org/dependencytrack/workflow/engine/ActivityTask.java | Defines the record for individual activity tasks. |
workflow-engine/src/main/java/org/dependencytrack/workflow/engine/ActivityGroup.java | Groups activity names and manages concurrency for a set of activities. |
workflow-engine/src/main/java/org/dependencytrack/workflow/engine/ActivityExecutor.java | Declares the interface for activity executors. |
workflow-engine/src/main/java/org/dependencytrack/workflow/engine/ActivityContext.java | Provides context for executing activities including heartbeat logic. |
workflow-engine/src/main/java/org/dependencytrack/workflow/engine/ActivityClient.java | Creates a client wrapper for invoking activity calls. |
workflow-engine/src/main/java/org/dependencytrack/workflow/engine/ActivityCallOptions.java | Specifies options for activity invocation including retry policy. |
apiserver/... | Contains REST resources, response models, and serializers for workflow runs. |
apiserver/src/main/java/org/dependencytrack/context/... | Provides DI support and factory/binder for WorkflowEngine integration. |
Files not reviewed (4)
- apiserver/pom.xml: Language not supported
- coverage-report/pom.xml: Language not supported
- pom.xml: Language not supported
- workflow-engine/pom.xml: Language not supported
Comments suppressed due to low confidence (1)
workflow-engine/src/main/java/org/dependencytrack/workflow/engine/ActivityTaskManager.java:124
- [nitpick] The timeout scenario for task completion is not covered by tests; consider adding tests to validate behavior when a TimeoutException is thrown during task completion.
engine.completeActivityTask(task, result).join();
workflow-engine/src/main/java/org/dependencytrack/workflow/engine/ActivityContext.java
Outdated
Show resolved
Hide resolved
workflow-engine/src/main/java/org/dependencytrack/workflow/engine/ActivityGroup.java
Outdated
Show resolved
Hide resolved
301a1fb
to
3485815
Compare
34b1903
to
0e50355
Compare
910fd99
to
ad4af0a
Compare
9185b32
to
720364a
Compare
Signed-off-by: nscuro <[email protected]>
Description
Adds a new
workflow-engine
module that facilitates orchestration of workflows.This implements ADR-002: Workflow Orchestration with the ultimate goal to implement ADR-001: Drop Kafka Dependency.
This PR does not include actual workflow implementations. Those will be added separately. For the time being, refer to some draft implementations in the older
workflow-v2
branch: https://github.com/DependencyTrack/hyades-apiserver/tree/workflow-v2/src/main/java/org/dependencytrack/workflowAddressed Issue
TODO
Additional Details
TODO
Checklist
This PR fixes a defect, and I have provided tests to verify that the fix is effective