Skip to content

LG-16128: Backfill task for enrollment document type#12149

Merged
lmgeorge merged 1 commit intomainfrom
lmgeorge/LG-16128/backfill-enrollment-document-type
May 19, 2025
Merged

LG-16128: Backfill task for enrollment document type#12149
lmgeorge merged 1 commit intomainfrom
lmgeorge/LG-16128/backfill-enrollment-document-type

Conversation

@lmgeorge
Copy link
Contributor

@lmgeorge lmgeorge commented May 7, 2025

🛠 Summary of changes

Added a Rake task to backfill document_type for 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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we not want to update enrollments that are in_fraud_review and establishing?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am also curious about this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 :establishing or :in_fraud_review status since those will either be updated by the new code in the State ID controller or may be manually updated by the fraud team.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Catching up here. I'm good with changing this PR to update the in_fraud_review enrollments and not update the establishing enrollments. 👍🏻

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! 👍🏻

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lmgeorge I know you already merged this, I just wanted to chime in and say it looks good! 👍

@lmgeorge lmgeorge force-pushed the lmgeorge/LG-16128/backfill-enrollment-document-type branch from 89e0f29 to afe5cf5 Compare May 19, 2025 17:43
changelog: Internal, Maintenance, Add backfill task for InPersonEnrollment document type
@lmgeorge lmgeorge force-pushed the lmgeorge/LG-16128/backfill-enrollment-document-type branch from afe5cf5 to 187cc25 Compare May 19, 2025 17:52
@lmgeorge lmgeorge merged commit b1da700 into main May 19, 2025
1 check passed
@lmgeorge lmgeorge deleted the lmgeorge/LG-16128/backfill-enrollment-document-type branch May 19, 2025 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants