feat: Move Press Jobs To Code#6159
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #6159 +/- ##
===========================================
+ Coverage 55.93% 56.24% +0.31%
===========================================
Files 910 934 +24
Lines 75826 77582 +1756
Branches 525 525
===========================================
+ Hits 42412 43638 +1226
- Misses 33386 33916 +530
Partials 28 28
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
39b420b to
91d36d8
Compare
27f1910 to
cfca2e2
Compare
cfca2e2 to
2ac199b
Compare
The workflow_name param is configured by WorkflowBuilder class automatically
06fb74d to
5da1414
Compare
5da1414 to
01f375d
Compare
8961980 to
3fc42f0
Compare
Greptile SummaryThis PR migrates all Press Jobs from database-stored job type definitions to code-based workflow classes, leveraging the existing The architecture is solid, but the migration from
Confidence Score: 2/5Not safe to merge — two P0 deserialization bugs will prevent all press jobs from running in production. Two independent P0 bugs exist on the hot path: (1) press_workflow.py:run() uses the old PressWorkflowObject.get_object() on args fields that now store JSON strings, immediately marking every workflow Fatal; (2) press_workflow_task.py calls deserialize_value with one argument instead of two, throwing TypeError on every task with args. Both together mean zero press jobs can complete under the new system. Additionally there is a P1 in press_job.js (wrong status string hides the Retry button) and a P1 AttributeError in increase_disk_size.py. The overall design and all 21 new job files are well-structured. press/workflow_engine/doctype/press_workflow/press_workflow.py (P0 in run()), press/workflow_engine/doctype/press_workflow_task/press_workflow_task.py (P0 in run()), press/workflow_engine/doctype/press_workflow_task/press_workflow_task.json (schema mismatch), press/press/doctype/press_job/press_job.js (P1 wrong status string) Important Files Changed
Sequence DiagramsequenceDiagram
participant PJ as PressJob
participant WB as WorkflowBuilder
participant BF as BoundFlow (@flow)
participant PW as PressWorkflow
participant PWT as PressWorkflowTask
PJ->>WB: after_insert → start_workflow()
WB->>BF: execute.run_as_workflow()
BF->>BF: serialize_and_store_value(args) → ("tuple","[]")
BF->>PW: insert(args="[]", args_type="tuple", ...)
PW-->>PW: after_insert → enqueue_workflow()
PW->>PW: run()
Note over PW: ⚠️ P0: PressWorkflowObject.get_object("[]") → Fatal
PW->>PWT: enqueue task → PressWorkflowTask.run()
Note over PWT: ⚠️ P0: deserialize_value(self.args) missing 2nd arg → TypeError
PWT-->>PWT: execute @task method on reference_doc
PWT->>PW: _resume_workflow()
PW->>PW: on_workflow_success/failure
PW->>PJ: execute_callback → on_workflow_success/failure
PJ->>PJ: status = "Success"/"Failure"
|
f3e14fa to
5d7945e
Compare
eda3467 to
7d47f5d
Compare
|
🎉 This PR is included in version 0.20.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Resolves #5946
Workflow Enginedefer_current_taskmethod to retry current task (Fix the occurrences in Release Pipeline also)Workflow EngineintegrationPress Jobsidempotent in nature (For example, if machine provisioning done, dont reattempt based on the vm state)