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

[hma] address missing distance field on /for-hash/ result objects #1304

Merged

Conversation

BarrettOlson
Copy link
Contributor

Summary

Had to resolve a set of errors to get to the for-hash api issue (would normally be different PR but the first two are 1 liners)

  1. update python-threatexchange version because of fetch error handling
  2. fetcher IAM policy updated to enable to query of bank member to sub parts of banks_datastore.
  3. Patch signal type check of field check on distance to remove error for for-hash API
    Test Plan

Confirmed that with changes fetcher can get values from API for sample set and build index and with the python code change that a valid matches data will return.

@github-actions github-actions bot added the hma Items related to the hasher-matcher-actioner system label Mar 30, 2023
@BarrettOlson BarrettOlson marked this pull request as ready for review March 30, 2023 18:01
Copy link
Contributor

@Dcallies Dcallies left a comment

Choose a reason for hiding this comment

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

Thanks again for all your hard work on these issues!

@@ -539,6 +540,13 @@ def _matches_for_hash(

return match_objects

def _distance_from_match_if_exits(match: IndexMatch) -> int:
Copy link
Contributor

Choose a reason for hiding this comment

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

blocking: Add a docstring explaining the compatibility issue and whether you think we should move to off-int distance at some future point. Feel free to shorthand to an instance.

@BarrettOlson BarrettOlson merged commit e2a9b31 into facebook:main Apr 2, 2023
5 checks passed
@BarrettOlson BarrettOlson deleted the 23-03-30-for-matches-distance-error branch April 2, 2023 15:29
@BarrettOlson
Copy link
Contributor Author

This should address #1301 and #1299, I will wait for @kyuilgo to validate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed hma Items related to the hasher-matcher-actioner system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants