Y26-105 - [PR] [Bug] useq_wafer dead-letters on ware-prod#5650
Y26-105 - [PR] [Bug] useq_wafer dead-letters on ware-prod#5650
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5650 +/- ##
===========================================
+ Coverage 87.24% 87.26% +0.02%
===========================================
Files 1461 1461
Lines 33022 33052 +30
Branches 3475 3482 +7
===========================================
+ Hits 28809 28842 +33
+ Misses 4192 4189 -3
Partials 21 21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
BenTopping
left a comment
There was a problem hiding this comment.
Changes look okay, just a question about moving the validation to the models.
| belongs_to :task | ||
| serialize :selection, coder: YAML | ||
|
|
||
| DATE_YEAR_MIN = 1990 |
There was a problem hiding this comment.
Is this to stop cases like the dead letter where we have 62026 as the year?
| end | ||
|
|
||
| def perform | ||
| errors = validate_descriptor_inputs |
There was a problem hiding this comment.
Suggestion: Can we use rails validations here. Make use of the active record errors behaviour and add errors to the task model by running task.valid?. You would need to set validations on descriptor too for this to work I think.
| # Returns an array of validation errors for the submitted descriptor value. | ||
| # The value comes from the Task Details form for a workflow task on a batch. | ||
| # @return [Array] An array of error messages, empty if the value is valid | ||
| def validate_value(submitted_value) |
There was a problem hiding this comment.
Suggestion: Can you move these to active model validations so you can call descriptor.valid?
Closes #
Changes proposed in this pull request
Instructions for Reviewers
[All PRs] - Confirm PR template filled
[Feature Branches] - Review code
[Production Merges to
main]- Check story numbers included
- Check for debug code
- Check version