SbloodyS commented on PR #18464:
URL:
https://github.com/apache/dolphinscheduler/pull/18464#issuecomment-5235064686
Thanks for addressing the previous frontend serialization and legacy-update
compatibility issues. Those paths now look correct.
### Reject invalid policy values instead of silently applying another policy
`JSONUtils` enables `READ_UNKNOWN_ENUM_VALUES_AS_NULL`, so an invalid
request such as:
```json
{
"missedFirePolicy": "FIRE_ONCE_NWO"
}
invokes ScheduleParam#setMissedFirePolicy(null) and marks the field as
present.
The current service behavior then silently handles it as follows:
- Create: insertSchedule replaces the invalid value with FIRE_ALL_MISSED.
- Update: updateSchedule ignores it and preserves the previous policy.
Both requests return successfully even though the requested policy was not
applied. The create case is particularly risky because FIRE_ALL_MISSED may
trigger multiple unexpected workflow executions after scheduler downtime.
Please reject an explicitly provided null or unrecognized policy with a
request-validation error. Only an omitted field should use the create default
or preserve the existing update value. Please add regression tests for explicit
null and an unknown enum value, in addition to the existing omitted-field tests.
```
@liang-wenjie
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]