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] Remove ISignalTypeConfigStore from HMA #1724

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

Mackay-Fisher
Copy link
Contributor

@Mackay-Fisher Mackay-Fisher commented Dec 16, 2024

Summary
This resolves the 3rd part of issue #1689
Delete ISignalTypeConfigStore in HMA
In HMA, import ISignalTypeConfigStore from pytx to be included in IUnifiedStore

Test Plan
I was not entirely sure what to test to verify. There was a module issue, so I added the init py to allow for the module usage in HMA. I am not sure if that was the correct approach however that is the pr referenced in #1725

Update: Yay the version change worked!

@Mackay-Fisher Mackay-Fisher changed the title Issue 1689 cli storage move [HMA] Remove ISignalTypeConfigStore from HMA Dec 16, 2024
@Mackay-Fisher Mackay-Fisher force-pushed the Issue-1689-CLI-Storage-Move branch 2 times, most recently from 281084a to 3ccba3d Compare December 17, 2024 19:23
@Mackay-Fisher Mackay-Fisher marked this pull request as ready for review December 17, 2024 19:24
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.

I think you just had a merge collision that resulted in you deleting the docstring in pytx/.../interfaces.py, I can't easily restore it from here, if you fix that you should be good.

Comment on lines 2 to 29

"""
Common interface for persisting pytx configuration and concepts.

Most of the individual components of pytx are find to use piecemeal, and
the full interface covers the most complex and complete useage. A usecase
with one collection of hashes using one algorithm might be better off
hardcoding those things rather than fully implementing the interface.

# Migration Notes
There's an earlier attempt at these interfaces used for CLI at
<@Mackay-Fisher add the right pointer to the CLI storage>.
During the development of Hasher-Matcher-Actioner 2.0
(github.com/facebook/ThreatExchange/tree/main/hasher-matcher-actioner/)
we realized that the original attempt at this wouldn't meet the needs
of that code and wrote a new interface.

As of 12/2024, we are now migrating that interface from HMA into pytx
proper as part of a migration to dbm
(github.com/facebook/ThreatExchange/issues/1687). The general approach is:
1. Copy the interface unchanged from HMA to pytx
2. Release a new version of pytx
3. Delete the copy in HMA and update all references to the pytx version

In parallel, we intend to slowly migrate the CLI storage components to
follow the same interface.
"""

Copy link
Contributor

Choose a reason for hiding this comment

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

blocking: This comment is useful, why delete it?

Comment on lines 2 to 29

"""
Common interface for persisting pytx configuration and concepts.

Most of the individual components of pytx are find to use piecemeal, and
the full interface covers the most complex and complete useage. A usecase
with one collection of hashes using one algorithm might be better off
hardcoding those things rather than fully implementing the interface.

# Migration Notes
There's an earlier attempt at these interfaces used for CLI at
<@Mackay-Fisher add the right pointer to the CLI storage>.
During the development of Hasher-Matcher-Actioner 2.0
(github.com/facebook/ThreatExchange/tree/main/hasher-matcher-actioner/)
we realized that the original attempt at this wouldn't meet the needs
of that code and wrote a new interface.

As of 12/2024, we are now migrating that interface from HMA into pytx
proper as part of a migration to dbm
(github.com/facebook/ThreatExchange/issues/1687). The general approach is:
1. Copy the interface unchanged from HMA to pytx
2. Release a new version of pytx
3. Delete the copy in HMA and update all references to the pytx version

In parallel, we intend to slowly migrate the CLI storage components to
follow the same interface.
"""

Copy link
Contributor

Choose a reason for hiding this comment

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

blocking: This comment is useful, why delete it?

@Mackay-Fisher Mackay-Fisher force-pushed the Issue-1689-CLI-Storage-Move branch from 991e870 to 2b26523 Compare December 18, 2024 17:10
…e and then updated imports through threat exchange after version update
@Mackay-Fisher Mackay-Fisher force-pushed the Issue-1689-CLI-Storage-Move branch from df93168 to 6fca94d Compare December 18, 2024 17:13
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.

LGTM!

@Dcallies Dcallies merged commit 3163d99 into facebook:main Dec 20, 2024
9 checks passed
Dcallies added a commit that referenced this pull request Dec 20, 2024
#1724 moves more things around
Dcallies added a commit that referenced this pull request Dec 20, 2024
#1724 moves more things around
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants