LG-11520: Add job to expire old GPO pending profiles#9545
Merged
Conversation
Not enabled yet, just putting the job in place... changelog: Internal, Identity verification, Add background job to expire old GPO profiles.
e8b32e1 to
08a9e9d
Compare
db/primary_migrate/20231102211426_add_gpo_verification_expired_at_to_profiles.rb
Show resolved
Hide resolved
zachmargolis
reviewed
Nov 7, 2023
This column was in place locally for me after working on my old branch.
solipet
approved these changes
Nov 7, 2023
Contributor
solipet
left a comment
There was a problem hiding this comment.
A couple minor comments, otherwise looks good to me.
Ran through the manual test procedure and it worked as expected.
Track when the user originally entered the GPO flow on the expiration analytics event.
Allow limiting scope to profiles older than a certain age.
Includes rollback functionality.
soniaconnolly
approved these changes
Nov 8, 2023
Contributor
|
You will want to add this job to |
Contributor
Author
Current plan is to do that in a separate PR so that we can expire the bulk of the existing profiles via rollplan first. |
matthinz
added a commit
that referenced
this pull request
Nov 13, 2023
Accidentally committed this as part of #9545 [skip changelog]
matthinz
added a commit
that referenced
this pull request
Nov 13, 2023
Accidentally committed this as part of #9545 [skip changelog]
zachmargolis
pushed a commit
that referenced
this pull request
Nov 13, 2023
This was referenced Nov 14, 2023
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.
🎫 Ticket
LG-11520
🛠 Summary of changes
Adds a new job,
GpoExpirationJob, that looks for GPO profiles that are no longer usable and marks them as "expired". The job is meant to eventually run daily, but is not currently set to run automatically (that will be in a subsequent PR).An expired GPO profile:
To mark a Profile expired, we clear the
gpo_pending_verification_atcolumn and set thegpo_verification_expired_atto the current date/time.(Note: This work was broken off from #9475 and does not include any email notifications.)
Update as of 11/8 The deployment plan here is to migrate the bulk of existing profiles via a rollplan (working on the doc for that now) using the rake task this PR includes
📜 Testing Plan
GpoExpirationJob.new.performGpoExpirationJob.new.performGpoExpirationJob.new.performgpo_verification_expired_atis set)GpoExpirationJob.new.performTo test this without a time machine, you will first want to allow yourself to repeatedly request new GPO letters by updating your application.yml:
Then, in the Rails console: