Add ability to re-run single jobs
Problem
Please add the ability to re-run single jobs of a workflow. This is such a basic feature. Please keep the environment in mind while prioritizing features. ๐
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Implement Re-run Functionality for Individual Workflow Jobs
Currently, the workflow management system does not support the re-execution of individual jobs within a workflow. This limitation is due to the design of the job orchestration logic, which treats workflows as atomic units, preventing granular control over individual job executions. Enhancing this functionality requires modifications to the job state management and user interface to allow users to select and re-run specific jobs without restarting the entire workflow.
Awaiting Verification
Be the first to verify this fix
- 1
Modify Job State Management
Update the job state management logic to track individual job statuses separately, allowing for re-execution without affecting the overall workflow state.
javascriptfunction updateJobState(jobId, newState) { // Logic to update the state of a specific job jobs[jobId].state = newState; } - 2
Add Re-run Button in UI
Implement a 'Re-run' button in the user interface for each job within the workflow view. This button should trigger the re-execution of the selected job while maintaining the state of other jobs.
html<button onclick='rerunJob(jobId)'>Re-run</button> - 3
Implement API Endpoint for Job Re-execution
Create a new API endpoint that allows users to request the re-execution of a specific job by its ID. This endpoint should handle job dependencies and ensure that the job can be safely re-run.
javascriptapp.post('/api/jobs/:jobId/rerun', (req, res) => { const jobId = req.params.jobId; // Logic to re-run the job res.send('Job re-executed successfully'); }); - 4
Update Documentation
Revise the user documentation to include instructions on how to use the new re-run feature, including any limitations or considerations.
markdown## Re-running Jobs To re-run a job, click the 'Re-run' button next to the job in the workflow view. Ensure that the job dependencies are met before re-execution.
Validation
To confirm the fix worked, execute a workflow with multiple jobs, intentionally fail one job, and then use the 'Re-run' button to re-execute that specific job. Verify that only the selected job runs again and that the overall workflow state remains intact.
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep