Skip to content
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

migrate usage if IcnJob to UserAccountJob, with Flipper #18538

Merged
merged 14 commits into from
Sep 24, 2024
Merged

Conversation

MarchandMD
Copy link
Contributor

@MarchandMD MarchandMD commented Sep 19, 2024

Summary

before this PR:

  • VANotify was implementing an IcnJob, which accepted an ICN number as a parameter. A new UserAccountJob had previously been created, though it hadn't been implemented throughout the module

after this PR:

  • VANotify has added a flipper :va_notify_user_account_job to aid in the controlled velocity and rollout of this new UserAccountJob. All instances (3) of IcnJob have been replaced by the UserAccountJob. Also, the README for VANotify was updated.
  • This work is behind a feature toggle (flipper): YES/NO

Yes

  • (Summarize the changes that have been made to the platform)

The only instances of using the IcnJob were internal to VANotify

  • (If bug, how to reproduce)

NA

  • (What is the solution, why is this the solution?)

This solution works because it does not pass an ICN as a parameter, which removes the potential for an ICN to appear within a sidekiq log

  • (Which team do you work for, does your team own the maintenance of this component?)

VANotify

  • (If introducing a flipper, what is the success criteria being targeted?)

Success criteria being targeted is 100% usage of the UserAccountJob instead of IcnJob

The plan for rollout would be a typical rollout cadence using a flipper, 25%, 50%, and then 100%, with 2 days at each interval coupled with monitoring of effectiveness/errors/logs etc. Rolling out from 0 -> 100% over the course of 6 business days.

Related issue(s)

  • Link to ticket created in va.gov-team repo OR screenshot of Jira ticket if your team uses Jira

https://github.com/department-of-veterans-affairs/vanotify-team/issues/1350

  • Link to previous change of the code/bug (if applicable)

This is a link to the PR which created the UserAccountJob

#18215

  • Link to epic if not included in ticket

NA

Testing done

  • New code is covered by unit tests
  • Describe what the old behavior was prior to the change
  • Describe the steps required to verify your changes are working as expected. Exclusively stating 'Specs run' is NOT acceptable as appropriate testing
# for verification entire VANotify spec suite passes
bundle exec rspec modules/va_notify/spec/

# finer grained verification
bundle exec rspec modules/va_notify/spec/services/in_progress_form_reminder_spec.rb
bundle exec rspec modules/va_notify/spec/sidekiq/one_time_in_progress_reminder_spec.rb
bundle exec rspec modules/va_notify/spec/sidekiq/in_progress_1880_form_reminder_spec.rb
bundle exec rspec modules/va_notify/spec/sidekiq/in_progress_form_reminder_spec.rb
bundle exec rspec modules/va_notify/spec/sidekiq/user_account_job_spec.rb
  • If this work is behind a flipper:
  • Tests need to be written for both the flipper on and flipper off scenarios. Docs.

The flipper is used as part of some basic if/else logic; If the Flipper is enabled, user the UserAccountJob, otherwise, use the IcnJob, while we rollout the new job. Hence, existing/passing tests for the IcnJob are used to verify flipper off scenarios.

  • What is the testing plan for rolling out the feature?

Screenshots

Note: Optional

What areas of the site does it impact?

(Describe what parts of the site are impacted andifcode touched other areas)

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

Requested Feedback

(OPTIONAL)What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?

In the OneTimeInProgressReminder, user_account.id is passed as the initial argument; Could user_account_id have been passed instead?

@ryan-mcneil
Copy link
Contributor

ryan-mcneil commented Sep 23, 2024

@nathanbwright Can you add a tad more info to your PR description with an estimated timeline/end date for removing the flipper (You say 100%... but that's always the goal :) ). Thanks!

@MarchandMD
Copy link
Contributor Author

MarchandMD commented Sep 24, 2024

@ryan-mcneil Added the following:

The plan for rollout would use our usual rollout cadence using a flipper, which includes: 25%, 50%, and then 100%, with 2 days at each interval coupled with monitoring of effectiveness/errors/logs etc. Rolling out from 0 -> 100% over the course of 6 business days.

Copy link
Contributor

@ryan-mcneil ryan-mcneil left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link

Backend-review-group approval confirmed.

@MarchandMD MarchandMD merged commit c3a620e into master Sep 24, 2024
23 of 24 checks passed
@MarchandMD MarchandMD deleted the mm/1350-v1 branch September 24, 2024 16:08
bramleyjl pushed a commit that referenced this pull request Sep 24, 2024
* updates documentation RE new job

* attempts to replace all instances of ICNJob with UserAccountJob

* adds va_notify_user_account_job flipper

* updates in_progress_form_reminder and specs

* updates one_time_in_progress_reminder and spec

* updates user_account_job and spec

* lint

* 2nd attempt to clean lint

* runs bundle exec rubocop

* extrapolates abstracted logic that relates to a temporary flipper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants