LG-16128: Backfill task for enrollment document type#12149
Conversation
There was a problem hiding this comment.
Why do we not want to update enrollments that are in_fraud_review and establishing?
There was a problem hiding this comment.
I am also curious about this.
There was a problem hiding this comment.
I mention this in the rollplan, so copying here:
To prevent potential race conditions with concurrent writes to the same record, the task excludes enrollments with
:establishingor:in_fraud_review statussince those will either be updated by the new code in the State ID controller or may be manually updated by the fraud team.
There was a problem hiding this comment.
One thing I didn't mention, is that it is likely that an establishing enrollment is currently being worked on as well.
When we did ACs for setting document_type on enrollments, we said that only "successful" submissions would have document_type updated, so instead of filtering on status I can try to pull any enrollment IDs that have cleared the state id step successfully based on CW events. Obviously, that won't cover all enrollments in the database. Thoughts?
There was a problem hiding this comment.
I think establishing make sense to skip. I wasn't thinking about the fact that we have deployed code to update the status already. However, I do think that in_fraud_review enrollments should be updated... those enrollments will be updated by a manual update via a script. If we give the fraud team a heads up that we are running a data migration and they should not perform any updated until it is completed. That would allow us to run the data migration without in_fraud_review enrollments being updated. What do you think about adding that to the plan?
There was a problem hiding this comment.
I think this is a good compromise. After I update the PR and roll plan, I'll ping y'all on Slack for re-review, thanks!
There was a problem hiding this comment.
Catching up here. I'm good with changing this PR to update the in_fraud_review enrollments and not update the establishing enrollments. 👍🏻
There was a problem hiding this comment.
Looks good to me! 👍🏻
There was a problem hiding this comment.
@lmgeorge I know you already merged this, I just wanted to chime in and say it looks good! 👍
89e0f29 to
afe5cf5
Compare
changelog: Internal, Maintenance, Add backfill task for InPersonEnrollment document type
afe5cf5 to
187cc25
Compare
🛠 Summary of changes
Added a Rake task to backfill
document_typefor enrollments that are not considered "in progress" (:establishing).Related PRs:
🎫 Ticket
[LG-16128] Backfill document_type values with state_id
📜 Testing Plan
See roll plan linked in ticket.