Remove scheduler-side retry policy re-validation - #5090
Open
dejanzele wants to merge 1 commit into
Open
Conversation
…tion is the single home Signed-off-by: Dejan Zele Pejchev <pejcev.dejan@gmail.com>
Contributor
Greptile SummaryThe PR consolidates retry-policy validation in the CRUD service by making scheduler conversion responsible only for parsing values it can map.
Confidence Score: 5/5The PR appears safe to merge because all current policy writes remain validated and scheduler conversion still rejects values it cannot map. Production retry policies flow through validated create or update operations before the cache invokes ConvertPolicy, and no alternate production constructor or unvalidated storage path was found.
|
| Filename | Overview |
|---|---|
| internal/scheduler/retry/convert.go | Removes redundant semantic re-validation while retaining errors for policy data that cannot be converted. |
| internal/scheduler/retry/types.go | Removes the now-unused scheduler-side policy and rule validation helpers. |
| internal/scheduler/retry/engine_test.go | Removes tests dedicated to the deleted validation helpers without reducing engine evaluation coverage. |
Reviews (1): Last reviewed commit: "Remove scheduler-side retry policy re-va..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Retry policies were validated in two places: the CRUD service at write time, and again in the scheduler when ConvertPolicy compiled a stored policy. The two copies checked the same rules (name set, action valid, category set). A rule update had to land in both places, and it was easy to miss one.
This PR makes write-time validation the single home. ConvertPolicy now only parses. It still returns an error for data it cannot map, for example an unknown action enum value. That is corruption handling, not re-validation: the fail-open policy cache logs and skips a policy that fails to convert. The engine-side ValidatePolicy and its tests are removed. The server-side validation and its full test table are unchanged.
The retry policy feature is not live, so no stored policy predates the write-time rules. Nothing needs a migration.