Skip to content

chore(aci milestone 3): detector status class #93881

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mifu67
Copy link
Contributor

@mifu67 mifu67 commented Jun 18, 2025

We want to add a SNOOZED state, which doesn't apply to all objects, so make a new class for detector status.

@mifu67 mifu67 requested review from saponifi3d and ceorourke June 18, 2025 22:23
@mifu67 mifu67 requested a review from a team as a code owner June 18, 2025 22:23
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 18, 2025
@@ -57,7 +77,7 @@ class Detector(DefaultFieldsModel, OwnerModel, JSONConfigBase):
enabled = models.BooleanField(db_default=True)

# The detector's status - used for tracking deletion state
Copy link
Member

Choose a reason for hiding this comment

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

should this comment be updated since it won't just be tracking deletion anymore?

Copy link

codecov bot commented Jun 18, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
26630 1 26629 241
View the top 1 failed test(s) by shortest run time
tests.sentry.workflow_engine.processors.test_data_sources.TestProcessDataSources::test_disabled_detector
Stack Traces | 3.56s run time
#x1B[1m#x1B[.../workflow_engine/processors/test_data_sources.py#x1B[0m:59: in test_disabled_detector
    assert process_data_sources(self.data_packets, "test") == [
#x1B[1m#x1B[31mE   AssertionError: assert [(DataPacket(...9c0: id=38>])] == [(DataPacket(...050: id=38>])]#x1B[0m
#x1B[1m#x1B[31mE     #x1B[0m
#x1B[1m#x1B[31mE     At index 0 diff: (DataPacket(source_id='81', packet={'source_id': 81, 'foo': 'bar'}), [<Detector at 0x7facbd005f30: id=37>]) != (DataPacket(source_id='82', packet={'source_id': 82, 'foo': 'baz'}), [<Detector at 0x7facdc2e0050: id=38>])#x1B[0m
#x1B[1m#x1B[31mE     Left contains one more item: (DataPacket(source_id='82', packet={'source_id': 82, 'foo': 'baz'}), [<Detector at 0x7facbd0069c0: id=38>])#x1B[0m
#x1B[1m#x1B[31mE     #x1B[0m
#x1B[1m#x1B[31mE     Full diff:#x1B[0m
#x1B[1m#x1B[31mE       [#x1B[0m
#x1B[1m#x1B[31mE     +     (#x1B[0m
#x1B[1m#x1B[31mE     +         DataPacket(#x1B[0m
#x1B[1m#x1B[31mE     +             source_id='81',#x1B[0m
#x1B[1m#x1B[31mE     +             packet={#x1B[0m
#x1B[1m#x1B[31mE     +                        'foo': 'bar',#x1B[0m
#x1B[1m#x1B[31mE     +                        'source_id': 81,#x1B[0m
#x1B[1m#x1B[31mE     +                    },#x1B[0m
#x1B[1m#x1B[31mE     +         ),#x1B[0m
#x1B[1m#x1B[31mE     +         [#x1B[0m
#x1B[1m#x1B[31mE     +             <Detector at 0x7facbd005f30: id=37>,#x1B[0m
#x1B[1m#x1B[31mE     +         ],#x1B[0m
#x1B[1m#x1B[31mE     +     ),#x1B[0m
#x1B[1m#x1B[31mE           (#x1B[0m
#x1B[1m#x1B[31mE               DataPacket(#x1B[0m
#x1B[1m#x1B[31mE                   source_id='82',#x1B[0m
#x1B[1m#x1B[31mE                   packet={#x1B[0m
#x1B[1m#x1B[31mE                              'foo': 'baz',#x1B[0m
#x1B[1m#x1B[31mE                              'source_id': 82,#x1B[0m
#x1B[1m#x1B[31mE                          },#x1B[0m
#x1B[1m#x1B[31mE               ),#x1B[0m
#x1B[1m#x1B[31mE               [#x1B[0m
#x1B[1m#x1B[31mE     -             <Detector at 0x7facdc2e0050: id=38>,#x1B[0m
#x1B[1m#x1B[31mE     ?                                 ---  ^#x1B[0m
#x1B[1m#x1B[31mE     +             <Detector at 0x7facbd0069c0: id=38>,#x1B[0m
#x1B[1m#x1B[31mE     ?                                +   ^^^#x1B[0m
#x1B[1m#x1B[31mE               ],#x1B[0m
#x1B[1m#x1B[31mE           ),#x1B[0m
#x1B[1m#x1B[31mE       ]#x1B[0m

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants