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

Refactor: rename EligibilityVerifier to EnrollmentFlow #2293

Merged
merged 8 commits into from
Aug 13, 2024

Conversation

thekaveman
Copy link
Member

@thekaveman thekaveman commented Aug 7, 2024

Closes #2282

Testing locally

  1. Checkout the main branch
  2. Make sure that your local_fixtures.json (or whatever fixture you are using) has EligiblityVerifiers
  3. Run bin/reset_db.sh (now your local DB mirrors the structure of the dev environment)
  4. Checkout this PR's branch
  5. Run bin/init.sh (running this PR's migration on top of existing DB structure)
  • For all EligiblityVerifiers, confirm that an instance of EnrollmentFlow now exists in the database with the same data
  • Flows using claims and API verification should still work
  • Can X eligibility verifier permissions are removed
  • Can X enrollment flow permissions are added
  • Cal-ITP group has Can [view|edit] enrollment flow permissions

@thekaveman thekaveman self-assigned this Aug 7, 2024
@github-actions github-actions bot added migrations [auto] Review for potential model changes/needed data migrations updates back-end Django views, sessions, middleware, models, migrations etc. tests Related to automated testing (unit, UI, integration, etc.) deployment-dev [auto] Changes that will trigger a deploy if merged to dev front-end HTML/CSS/JavaScript and Django templates and removed back-end Django views, sessions, middleware, models, migrations etc. labels Aug 7, 2024
@thekaveman thekaveman force-pushed the refactor/eligibilityverifier-enrollmentflow branch from d56d688 to aebbad1 Compare August 7, 2024 23:28
Copy link

github-actions bot commented Aug 7, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  benefits/core
  admin.py
  analytics.py
  context_processors.py
  middleware.py
  models.py
  session.py
  widgets.py
  benefits/eligibility
  forms.py
  verify.py
  views.py
  benefits/enrollment
  views.py
  benefits/oauth
  analytics.py
  client.py
  middleware.py
  views.py
Project Total  

This report was generated by python-coverage-comment-action

@thekaveman thekaveman force-pushed the refactor/eligibilityverifier-enrollmentflow branch 2 times, most recently from 409965e to bdb159d Compare August 8, 2024 03:28
Copy link

github-actions bot commented Aug 8, 2024

@thekaveman thekaveman force-pushed the refactor/eligibilityverifier-enrollmentflow branch 2 times, most recently from 0add0e7 to c12efa1 Compare August 8, 2024 03:56
@thekaveman thekaveman force-pushed the refactor/eligibilityverifier-enrollmentflow branch from 56548bd to fe50fad Compare August 8, 2024 22:55
@thekaveman thekaveman changed the base branch from main to refactor/move-IdG-config August 8, 2024 22:56
@thekaveman thekaveman force-pushed the refactor/eligibilityverifier-enrollmentflow branch from fe50fad to fbaddb9 Compare August 8, 2024 22:56
@lalver1 lalver1 force-pushed the refactor/move-IdG-config branch from 75a9037 to 55c3041 Compare August 8, 2024 23:26
@thekaveman thekaveman force-pushed the refactor/eligibilityverifier-enrollmentflow branch 2 times, most recently from 1513ca1 to 779aaa6 Compare August 8, 2024 23:51
@lalver1 lalver1 force-pushed the refactor/move-IdG-config branch from 55c3041 to e3b44a1 Compare August 8, 2024 23:59
@thekaveman thekaveman force-pushed the refactor/eligibilityverifier-enrollmentflow branch 4 times, most recently from 5d54798 to cf85c7d Compare August 9, 2024 02:52
@lalver1 lalver1 force-pushed the refactor/move-IdG-config branch 3 times, most recently from 99485ff to c5130db Compare August 9, 2024 16:23
@thekaveman thekaveman force-pushed the refactor/eligibilityverifier-enrollmentflow branch from cf85c7d to 16d56f0 Compare August 9, 2024 22:04
@thekaveman thekaveman added this to the Admin tool: agency users milestone Aug 9, 2024
@lalver1 lalver1 force-pushed the refactor/move-IdG-config branch from c5130db to 27f8ad8 Compare August 12, 2024 15:26
@thekaveman thekaveman force-pushed the refactor/eligibilityverifier-enrollmentflow branch 3 times, most recently from a6b73f9 to 91d68c3 Compare August 12, 2024 16:42
@lalver1 lalver1 force-pushed the refactor/move-IdG-config branch from 27f8ad8 to 163054e Compare August 12, 2024 19:20
@thekaveman thekaveman force-pushed the refactor/eligibilityverifier-enrollmentflow branch from 91d68c3 to 4cafc52 Compare August 12, 2024 19:50
Base automatically changed from refactor/move-IdG-config to main August 12, 2024 19:51
@thekaveman thekaveman force-pushed the refactor/eligibilityverifier-enrollmentflow branch from 4cafc52 to 95c7943 Compare August 12, 2024 19:56
@thekaveman thekaveman marked this pull request as ready for review August 12, 2024 20:24
@thekaveman thekaveman requested a review from a team as a code owner August 12, 2024 20:24
@thekaveman thekaveman force-pushed the refactor/eligibilityverifier-enrollmentflow branch from 95c7943 to bbf7ff8 Compare August 12, 2024 20:44
verifier = session.verifier(request)
verifier_name = verifier.name if verifier else None
flow = session.flow(request)
verifier_name = flow.name if flow else None
Copy link
Member

Choose a reason for hiding this comment

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

Would we want to use flow_name instead of verifier_name? Or maybe we decided to use this name since the analytics will still send eligibility_verifier/verifier_name key/values in update_event_properties and update_user_properties. It doesn't affect any functionality but I was wondering about this line.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I think it needs to stay verifier_name so that existing analytics charts still work and then #2248 will take care of updating it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, purposefully ignored the analytics code in this PR, to wait for #2248

@@ -10,7 +10,7 @@ class OAuthEvent(core.Event):

def __init__(self, request, event_type):
super().__init__(request, event_type)
verifier = session.verifier(request)
verifier = session.flow(request)
Copy link
Member

Choose a reason for hiding this comment

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

Similar question, would we want to name this, flow, instead of verifier? If we do, we'd need to update the lines below to also use flow instead of verifier.

Copy link
Member

Choose a reason for hiding this comment

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

Though it's not explicitly listed, I think this update would also be a part of #2248

Copy link
Member

@lalver1 lalver1 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

  • For all EligiblityVerifiers, confirm that an instance of EnrollmentFlow now exists in the database with the same data
  • Flows using claims and API verification should still work (tested both and they still work)
  • Can X eligibility verifier permissions are removed
  • Can X enrollment flow permissions are added
  • Cal-ITP group has Can [view|change] enrollment flow permissions

@thekaveman thekaveman merged commit bd2e78d into main Aug 13, 2024
19 checks passed
@thekaveman thekaveman deleted the refactor/eligibilityverifier-enrollmentflow branch August 13, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment-dev [auto] Changes that will trigger a deploy if merged to dev front-end HTML/CSS/JavaScript and Django templates migrations [auto] Review for potential model changes/needed data migrations updates tests Related to automated testing (unit, UI, integration, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Model refactor: rename EligibilityVerifier to EnrollmentFlow
3 participants