-
Notifications
You must be signed in to change notification settings - Fork 10
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: use ClaimsVerificationRequest
model from cdt_identity
#2782
Merged
+145
−118
Conversation
This file contains 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
ClaimsVerificationRequest
model from cdt_identity
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
1335c1b
to
4937247
Compare
thekaveman
reviewed
Mar 26, 2025
4937247
to
15c72d9
Compare
thekaveman
reviewed
Mar 27, 2025
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.
Code changes look good 👍
Tested the data migration locally 👍
creates ClaimsVerificationRequests for IdG systems and sets up the relationship between EnrollmentFlows and ClaimsVerificationRequest.
claims_scope, claims_eligibility_claim, claims_extra_claims, and claims_scheme_override are all redundant fields in EnrollmentFlow. They will all be derived from the ClaimsVerificationRequest model.
EnrollmentFlow.claims_all_claims is a managed property that is made redundant by the ClaimsVerificationRequest.claims_list property. Some tests were simplified since there is no need to test the case when extra_claims=None since ClaimsVerificationRequest.extra_claims is a string ("") when it is not set.
15c72d9
to
d56e0d6
Compare
thekaveman
approved these changes
Mar 27, 2025
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.
🚀
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
migrations
[auto] Review for potential model changes/needed data migrations updates
tests
Related to automated testing (unit, UI, integration, etc.)
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.
Closes #2721
This PR implements the
ClaimsVerificationRequest
refactor. We first add aclaims_request
field (which is a foreign key toClaimsVerificationRequest
, a new model fromcdt_identity
) toEnrollmentFlow
, migrate data fromEnrollmentFlow
toClaimsVerificationRequest
, and finally remove fromEnrollmentFlow
claims_scope
claims_eligibility_claim
claims_extra_claims
claims_scheme_override
since they now reside in
ClaimsVerificationRequest
. This schematic shows how the fields forEnrollmentFlow
ended up:EnrollmentFlow
ClaimsVerificationRequest
id
id
system_name
system_name
claims_scope
scopes
claims_eligibility_claim
eligibility_claim
claims_extra_claims
extra_claims
claims_scheme_override
scheme
claims_request
(ClaimsVerificationRequest fk
)...
To review
main
DJANGO_DB_FIXTURES
tolocal_fixtures.json
and runbin/reset_db.sh
to reset your databasebin/init.sh
to run the migrations in this branch and test that the data was migrated successfully fromEnrollmentFlow
toClaimsVerificationRequest
and thatclaims_request
inEnrollmentFlow
points to the correctClaimsVerificationRequest
Older Adult
):calitp-user
bin/reset_db.sh