IPP: Remove redundant network call from PO Search#7746
Merged
allthesignals merged 10 commits intomainfrom Feb 1, 2023
Merged
Conversation
# Conflicts: # app/controllers/idv/in_person/address_search_controller.rb
60ccb5f to
8c46252
Compare
jess-fortier
approved these changes
Feb 1, 2023
8c46252 to
1367547
Compare
JackRyan1989
reviewed
Feb 1, 2023
app/services/arcgis_api/geocoder.rb
Outdated
| # @param magic_key [String] a magic key value from a previous call to the #suggest method | ||
| # Makes HTTP request to find a full address record using a magic key or single text line | ||
| # @param options [Hash] one of 'magicKey', which is an ID returned from /suggest, | ||
| # or 'SingleLine', which should be a single string address that includes at least city, |
Contributor
There was a problem hiding this comment.
Super nit: City and state? City or state?
Contributor
Author
There was a problem hiding this comment.
Oooh definitely AND. ty.
JackRyan1989
approved these changes
Feb 1, 2023
Contributor
JackRyan1989
left a comment
There was a problem hiding this comment.
Hey this looks good to me! I have one small change which is super nit-picky, but could you clarify the comment you added to geocoder.rb? I just wanna be clear on what the expectations are for the singeline string.
zachmargolis
reviewed
Feb 1, 2023
zachmargolis
reviewed
Feb 1, 2023
zachmargolis
reviewed
Feb 1, 2023
Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
…F/identity-idp into wmg/experiment-single-request
zachmargolis
reviewed
Feb 1, 2023
Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
tomas-nava
reviewed
Feb 1, 2023
|
|
||
| if supported_params.empty? | ||
| raise ArgumentError, <<~MSG | ||
| Unknown parameters: #{options.except(KNOWN_FIND_ADDRESS_CANDIDATES_PARAMETERS)}. |
Contributor
There was a problem hiding this comment.
Suggested change
| Unknown parameters: #{options.except(KNOWN_FIND_ADDRESS_CANDIDATES_PARAMETERS)}. | |
| Unknown parameters: #{options.except(*KNOWN_FIND_ADDRESS_CANDIDATES_PARAMETERS)}. |
needs the * to work as expected
tomas-nava
reviewed
Feb 1, 2023
| @@ -46,7 +46,7 @@ | |||
| it 'returns candidates from magic_key' do | |||
Contributor
There was a problem hiding this comment.
do we need 'returns candidates from single_line' test(s)?
Contributor
Author
There was a problem hiding this comment.
Yes! Adding that in an upcoming PR... ty.
3 tasks
Merged
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.
🛠 Summary of changes
Removes a redundant call to the ArcGIS API from the address_search_controller method.
Further, adds functionality to find_address_canddiates in Arcgis::Geocoder class to allow other usages of the endpoint.
Context: https://gsa-tts.slack.com/archives/C03FA4VBN76/p1675267483423649.
Before:
address_search_controller#index makes a request to
/suggest, then uses themagicKeydata from that response to issue another request to/findAddressCandidatesin order to retrieve the full address record.After:
address_search_controller#index makes a request directly to
/findAddressCandidates, passing the user search term along to the SingleLine param.Context:
/suggestis intended for typeahead search.📜 Testing Plan
Provide a checklist of steps to confirm the changes.