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

THREAT-397 Reformat deep_get(event to event.deep_get( #1374

Merged

Conversation

akozlovets098
Copy link
Contributor

Changes

  • Reformatted deep_get(event to event.deep_get(
  • Reformatted deep_walk(event to event.deep_walk(

@akozlovets098 akozlovets098 requested a review from a team as a code owner October 2, 2024 15:31
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file was reformatted by black

@akozlovets098 akozlovets098 marked this pull request as draft October 2, 2024 15:33
@ben-githubs
Copy link
Contributor

Some of the helper unit tests are failing because ImmutableDict doesn't have a deep_get field. I'm not sure of this is a problem with the test or the new changes. A couple of the failing tests have been due to us defining events as ImmutableDicts instead of PantherEvent, but I haven't worked through all of them. Please don't merge yet. :)

@ben-githubs
Copy link
Contributor

The issue with the test is that the test setup functions were using ImmutableCaseSentitiveDict to simulate events. i changed those to PantherEvent objects to reflect the actual runtime environment.

I also replaced some deep_get calls with get where the call was only 1 layer deep (like Ariel mentioned in the meeting this morning).

@akozlovets098
Copy link
Contributor Author

@ben-githubs Thanks for your help!
I fixed some linter issues and think that now the PR is ready for review

@akozlovets098 akozlovets098 marked this pull request as ready for review October 3, 2024 09:48
@arielkr256 arielkr256 added the enhancement New feature or request label Oct 3, 2024
@arielkr256
Copy link
Contributor

Very nice! Does it make sense to refactor data_models as well?

@akozlovets098
Copy link
Contributor Author

Very nice! Does it make sense to refactor data_models as well?

I don't think we can. It appears that while using data models PantherEvent gets transformed into ImmutableCaseInsensitiveDict which doesn't have deep_get method

@arielkr256 arielkr256 enabled auto-merge (squash) October 7, 2024 15:32
@arielkr256 arielkr256 merged commit 039ad9a into release Oct 7, 2024
9 checks passed
@arielkr256 arielkr256 deleted the THREAT-397-Reformat-deep_get(event-to-event.deep_get( branch October 7, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants