Description
JobFlow accepts UPDATE requests, but normal spec changes are not handled by the controller.
This was found by checking the JobFlow admission and controller code paths. The webhook registers JobFlow validation for CREATE and UPDATE, so an updated JobFlow can pass admission. In the controller, the JobFlow update path is explicitly reserved for future use and does not apply normal JobFlow process changes.
That leaves users with an accepted JobFlow spec update that does not affect the running workflow.
Steps to reproduce the issue
- Create a JobFlow, for example from
example/jobflow/JobFlow.yaml.
- Change
spec.flows or one of the spec.flows[*].dependsOn entries.
- Apply the manifest again.
Evidence and production path
Permalinks are pinned to d34c571c.
The JobFlow validating webhook is registered for both CREATE and UPDATE:
|
Operations: []whv1.OperationType{whv1.Create, whv1.Update}, |
The handler currently validates CREATE and UPDATE through the same path:
|
err := OperationNotCreateOrUpdate |
The JobFlow controller registers an update handler:
|
UpdateFunc: jf.updateJobFlow, |
But the update handler says JobFlow update is reserved for future use and current updates do not affect the JobFlow process:
|
//Todo The update operation of JobFlow is reserved for possible future use. The current update operation on JobFlow will not affect the JobFlow process |
So a JobFlow spec update can pass admission, while the controller does not apply that changed workflow behavior.
Describe the results you received and expected
Actual:
The JobFlow update is accepted.
Expected:
Unsupported JobFlow spec updates should be rejected by admission, or the controller should actually reconcile them.
What version of Volcano are you using?
master
Any other relevant information
No response
Description
JobFlow accepts UPDATE requests, but normal spec changes are not handled by the controller.
This was found by checking the JobFlow admission and controller code paths. The webhook registers JobFlow validation for CREATE and UPDATE, so an updated JobFlow can pass admission. In the controller, the JobFlow update path is explicitly reserved for future use and does not apply normal JobFlow process changes.
That leaves users with an accepted JobFlow spec update that does not affect the running workflow.
Steps to reproduce the issue
example/jobflow/JobFlow.yaml.spec.flowsor one of thespec.flows[*].dependsOnentries.Evidence and production path
Permalinks are pinned to
d34c571c.The JobFlow validating webhook is registered for both
CREATEandUPDATE:volcano/pkg/webhooks/admission/jobflows/validate/validate_jobflow.go
Line 53 in d34c571
The handler currently validates
CREATEandUPDATEthrough the same path:volcano/pkg/webhooks/admission/jobflows/validate/validate_jobflow.go
Line 84 in d34c571
The JobFlow controller registers an update handler:
volcano/pkg/controllers/jobflow/jobflow_controller.go
Line 101 in d34c571
But the update handler says JobFlow update is reserved for future use and current updates do not affect the JobFlow process:
volcano/pkg/controllers/jobflow/jobflow_controller_handler.go
Line 68 in d34c571
So a JobFlow spec update can pass admission, while the controller does not apply that changed workflow behavior.
Describe the results you received and expected
Actual:
The JobFlow update is accepted.
Expected:
Unsupported JobFlow spec updates should be rejected by admission, or the controller should actually reconcile them.
What version of Volcano are you using?
master
Any other relevant information
No response