LG-15456: Source AAMVA requested attributes from request#11826
Merged
LG-15456: Source AAMVA requested attributes from request#11826
Conversation
n1zyy
reviewed
Feb 4, 2025
matthinz
reviewed
Feb 4, 2025
n1zyy
reviewed
Feb 5, 2025
Contributor
n1zyy
left a comment
There was a problem hiding this comment.
I agree with Matt's notes.
Overall this looks like a nice improvement. I'm holding off an an approval just since Matt has some suggestions, but otherwise I'm good with this.
| address1: applicant.address1, | ||
| city: applicant.city, | ||
| state: applicant.state, | ||
| zipcode: applicant.zipcode, |
Contributor
There was a problem hiding this comment.
👏 Moving xpath selectors out makes this so much more pleasant. 😄
| end | ||
| end | ||
|
|
||
| context 'when issue / expiration present' do |
Contributor
There was a problem hiding this comment.
Just out of ignorance on my part, why isn't this test needed anymore?
Contributor
Author
There was a problem hiding this comment.
This bit of functionality is covered in the VerificationRequest spec and the individual attribute specs further up.
zachmargolis
reviewed
Feb 6, 2025
8e2657c to
0e95de3
Compare
**Why** Requested attributes are for our internal analytics to ensure that the fields sent match any errors we get back. Prior to this change, the requested attributes were sourced from the response body, which meant that regardless of what attributes were requested, we would only know about the attributes that were "seen" and processed by DLDV. Without knowing which fields were actually requested, troubleshooting certain errors is challenging as there would be a mismatch between what was actually sent and how AAMVA processed the request. **How** * Added the logic for generating requested attributes to `Proofing::Aamva::Request::VerificationRequest` as part of creating the request body. * Instead of Set, we use a Hash. Attributes that have a value are coded as 1. Core attributes (e.g., birthdate), which are always requested, are coded as 0 when blank. * Added a constant for storing a map of attributes to XPaths to reduce duplication. * Updated the `Proofing::Aamva::Proofer` to build the request and "normalize" the requested attributes Hash per previous business logic. Future work should consider making a subclass that solely handles building the request body. changelog: Bug Fixes, Analytics, Log correct DLDV requested attributes
Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com> Co-authored-by: Matt Hinz <matt.hinz@gsa.gov>
0e95de3 to
06c117a
Compare
matthinz
reviewed
Feb 10, 2025
|
|
||
| # @param document [REXML::Document] | ||
| def update_requested_attributes(document) | ||
| VERIFICATION_REQUESTED_ATTRS.each do |attribute, rule| |
Contributor
There was a problem hiding this comment.
This is good, I like that we are sourcing this from the actual XML we are building.
matthinz
approved these changes
Feb 11, 2025
n1zyy
approved these changes
Feb 11, 2025
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.
Why
Requested attributes are for our internal analytics to ensure that the fields sent match any errors we get back. Prior to this change, the requested attributes were sourced from the response body, which meant that regardless of what attributes were requested, we would only know about the attributes that were "seen" and processed by DLDV.
Without knowing which fields were actually requested, troubleshooting certain errors is challenging as there would be a mismatch between what was actually sent and how AAMVA processed the request.
How
Proofing::Aamva::Request::VerificationRequestas part of creating the request body.Proofing::Aamva::Prooferto build the request and "normalize" the requested attributes Hash per previous business logic.Future work should consider making a subclass that solely handles building the request body.
changelog: Bug Fixes, Analytics, Log correct DLDV requested attributes
🎫 Ticket
Link to the relevant ticket:
LG-15456