-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LG-11520: Add job to expire old GPO pending profiles #9545
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
This column was in place locally for me after working on my old branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
You will want to add this job to |
Current plan is to do that in a separate PR so that we can expire the bulk of the existing profiles via rollplan first. |
Accidentally committed this as part of #9545 [skip changelog]
Accidentally committed this as part of #9545 [skip changelog]
🎫 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_at
column and set thegpo_verification_expired_at
to 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.perform
GpoExpirationJob.new.perform
GpoExpirationJob.new.perform
gpo_verification_expired_at
is set)GpoExpirationJob.new.perform
To 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: