-
Notifications
You must be signed in to change notification settings - Fork 14
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
Fix magicKey breaking ESRI geocoding #68
Merged
rajadain
merged 5 commits into
azavea:develop
from
rajadain:tt/67/fix-magickey-geocoding
Jan 22, 2024
Merged
Fix magicKey breaking ESRI geocoding #68
rajadain
merged 5 commits into
azavea:develop
from
rajadain:tt/67/fix-magickey-geocoding
Jan 22, 2024
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
This is currently failing, to replicate the bug reported in #67. Will add a fix for this next.
Previously we assumed that Loc_name would always be provided, given that we ask for it in the requested field list. However, when using the magicKey, the Loc_name is not provided, causing geocoding to fail. By making it optional, we allow those geocoding requests to succeed. Also, add a WARNING to the log when there's a missing key, instead of just silently passing, for better observability.
This new value is used for many responses now, need to include it for the tests to pass.
Tests are failing because the API keys setup in this repository may be out of date? |
Disable Google test if credentials are missing. Not sure what was wrong with the Philadelphia address for Census purposes, but switching to an Alexandria address fixes that.
rachelekm
approved these changes
Jan 22, 2024
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.
Success! Updated my local python-omgeo
package to your branch and location search works again as expected.
rajadain
added a commit
to WikiWatershed/model-my-watershed
that referenced
this pull request
Jan 22, 2024
Location search was broken because of azavea/python-omgeo#67. By upgrading to the latest version of omgeo that includes azavea/python-omgeo#68, this issue is fixed. PyPI release of omgeo is blocked for now azavea/python-omgeo#70, so we use the tag directly from GitHub instead.
1 task
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.
Overview
At some point the ESRI
/findAddressCandidates
endpoint stopped returning theLoc_name
attribute ifmagicKey
is specified. Since the endpoint is not open source and they don't seem to have a changelog that I could find, I don't know exactly when this happened, but reports in MMW (WikiWatershed/model-my-watershed#3604, WikiWatershed/model-my-watershed#3605) seem to indicate it has been the case for a while.This fixes that by making that attribute optional.
Also adds a test for this. Also adds warning logging for when other keys are missing.
Demo
You can see MMW production not working using the main library, and my local version that uses this branch's omgeo working correctly:
2024-01-19.18.42.20.mp4
Closes #67