Flaky test: tests/sentry/incidents/serializers/test_workflow_engine_incident.py::TestIncidentSerializer::test_detailed
Open
Nobody has claimed this yet.
flaky-test
Tests
- Dominant language
- Python
- Stars
- 44.8k
- Forks
- 4.9k
- Avg merge
- 21h 23m
- Merged PRs (30d)
- 607
Description
Failing test: tests/sentry/incidents/serializers/test_workflow_engine_incident.py::TestIncidentSerializer::test_detailed
Sentry sha: 4a8dadc9c184ad93a761561c5f57437a29cd3300
Run: https://github.com/getsentry/sentry/actions/runs/22283663600
[1m[31mtests/sentry/incidents/serializers/test_workflow_engine_incident.py[0m:54: in test_detailed
assert serialized_incident == self.incident_expected
[1m[31mE AssertionError: assert {'activities'...one.utc), ...} == {'activities'...one.utc), ...}[0m
[1m[31mE [0m
[1m[31mE Omitting 14 identical items, use -vv to show[0m
[1m[31mE Differing items:[0m
[1m[31mE {'alertRule': {'aggregate': 'count()', 'createdBy': None, 'dateCreated': datetime.datetime(2024, 12, 11, 3, 21, 34, tz...datetime.timezone.utc), 'dateModified': datetime.datetime(2024, 12, 11, 3, 21, 34, tzinfo=datetime.timezone.utc), ...}} != {'alertRule': {'aggregate': 'count()', 'createdBy': None, 'dateCreated': datetime.datetime(2024, 12, 11, 3, 21, 34, tz...datetime.timezone.utc), 'dateModified': datetime.datetime(2024, 12, 11, 3, 21, 34, tzinfo=datetime.timezone.utc), ...}}[0m
[1m[31mE [0m
[1m[31mE Full diff:[0m
[1m[31mE {[0m
[1m[31mE 'activities': None,[0m
[1m[31mE 'alertRule': {[0m
[1m[31mE 'aggregate': 'count()',[0m
[1m[31mE 'createdBy': None,[0m
[1m[31mE 'dateCreated': datetime.datetime(2024, 12, 11, 3, 21, 34, tzinfo=datetime.timezone.utc),[0m
[1m[31mE 'dateModified': datetime.datetime(2024, 12, 11, 3, 21, 34, tzinfo=datetime.timezone.utc),[0m
[1m[31mE 'description': '',[0m
[1m[31mE 'detectionType': 'static',[0m
[1m[31mE 'id': '82',[0m
[1m[31mE 'name': 'Enabled Seagull',[0m
[1m[31mE 'organizationId': '4555195392327680',[0m
[1m[31mE 'owner': None,[0m
[1m[31mE 'projects': [[0m
[1m[31mE 'bar',[0m
[1m[31mE ],[0m
[1m[31mE 'query': 'level:error',[0m
[1m[31mE 'resolution': 1.0,[0m
[1m[31mE 'status': 0,[0m
[1m[31mE 'thresholdPeriod': 1,[0m
[1m[31mE 'timeWindow': 10.0,[0m
[1m[31mE 'triggers': [[0m
[1m[31mE {[0m
[1m[31mE 'actions': [[0m
[1m[31mE {[0m
[1m[31mE + 'alertRuleTriggerId': '58',[0m
[1m[31mE + 'dateCreated': datetime.datetime(2024, 12, 11, 3, 21, 34, tzinfo=datetime.timezone.utc),[0m
[1m[31mE + 'desc': 'Send a notification to admin@localhost',[0m
[1m[31mE + 'id': '54',[0m
[1m[31mE + 'inputChannelId': None,[0m
[1m[31mE + 'integrationId': None,[0m
[1m[31mE + 'priority': None,[0m
[1m[31mE + 'sentryAppId': None,[0m
[1m[31mE + 'targetIdentifier': '1970',[0m
[1m[31mE + 'targetType': 'user',[0m
[1m[31mE + 'type': 'email',[0m
[1m[31mE + },[0m
[1m[31mE + ],[0m
[1m[31mE + 'alertRuleId': '82',[0m
[1m[31mE + 'alertThreshold': 50,[0m
[1m[31mE + 'dateCreated': datetime.datetime(2024, 12, 11, 3, 21, 34, tzinfo=datetime.timezone.utc),[0m
[1m[31mE + 'id': '58',[0m
[1m[31mE + 'label': 'warning',[0m
[1m[31mE + 'resolveThreshold': 50,[0m
[1m[31mE + 'thresholdType': 0,[0m
[1m[31mE + },[0m
[1m[31mE + {[0m
[1m[31mE + 'actions': [[0m
[1m[31mE + {[0m
[1m[31mE 'alertRuleTriggerId': '57',[0m
[1m[31mE 'dateCreated': datetime.datetime(2024, 12, 11, 3, 21, 34, tzinfo=datetime.timezone.utc),[0m
[1m[31mE 'desc': 'Send a notification to admin@localhost',[0m
[1m[31mE 'id': '53',[0m
[1m[31mE 'inputChannelId': None,[0m
[1m[31mE 'integrationId': None,[0m
[1m[31mE 'priority': None,[0m
[1m[31mE 'sentryAppId': None,[0m
[1m[31mE 'targetIdentifier': '1970',[0m
[1m[31mE 'targetType': 'user',[0m
[1m[31mE 'type': 'email',[0m
[1m[31mE },[0m
[1m[31mE ],[0m
[1m[31mE 'alertRuleId': '82',[0m
[1m[31mE 'alertThreshold': 100,[0m
[1m[31mE 'dateCreated': datetime.datetime(2024, 12, 11, 3, 21, 34, tzinfo=datetime.timezone.utc),[0m
[1m[31mE 'id': '57',[0m
[1m[31mE 'label': 'critical',[0m
[1m[31mE 'resolveThreshold': 50,[0m
[1m[31mE 'thresholdType': 0,[0m
[1m[31mE },[0m
[1m[31mE - {[0m
[1m[31mE - 'actions': [[0m
[1m[31mE - {[0m
[1m[31mE - 'alertRuleTriggerId': '58',[0m
[1m[31mE - 'dateCreated': datetime.datetime(2024, 12, 11, 3, 21, 34, tzinfo=datetime.timezone.utc),[0m
[1m[31mE - 'desc': 'Send a notification to admin@localhost',[0m
[1m[31mE - 'id': '54',[0m
[1m[31mE - 'inputChannelId': None,[0m
[1m[31mE - 'integrationId': None,[0m
[1m[31mE - 'priority': None,[0m
[1m[31mE - 'sentryAppId': None,[0m
[1m[31mE - 'targetIdentifier': '1970',[0m
[1m[31mE - 'targetType': 'user',[0m
[1m[31mE - 'type': 'email',[0m
[1m[31mE - },[0m
[1m[31mE - ],[0m
[1m[31mE - 'alertRuleId': '82',[0m
[1m[31mE - 'alertThreshold': 50,[0m
[1m[31mE - 'dateCreated': datetime.datetime(2024, 12, 11, 3, 21, 34, tzinfo=datetime.timezone.utc),[0m
[1m[31mE - 'id': '58',[0m
[1m[31mE - 'label': 'warning',[0m
[1m[31mE - 'resolveThreshold': 50,[0m
[1m[31mE - 'thresholdType': 0,[0m
[1m[31mE - },[0m
[1m[31mE ],[0m
[1m[31mE },[0m
[1m[31mE 'dateClosed': None,[0m
[1m[31mE 'dateCreated': datetime.datetime(2024, 12, 11, 3, 21, 34, tzinfo=datetime.timezone.utc),[0m
[1m[31mE 'dateDetected': datetime.datetime(2024, 12, 11, 3, 21, 34, tzinfo=datetime.timezone.utc),[0m
[1m[31mE 'dateStarted': datetime.datetime(2024, 12, 11, 3, 21, 34, tzinfo=datetime.timezone.utc),[0m
[1m[31mE 'discoverQuery': '(event.type:error) AND (level:error)',[0m
[1m[31mE 'id': '24',[0m
[1m[31mE 'identifier': '1',[0m
[1m[31mE 'organizationId': '4555195392327680',[0m
[1m[31mE 'projects': [[0m
[1m[31mE 'bar',[0m
[1m[31mE ],[0m
[1m[31mE 'status': 20,[0m
[1m[31mE 'statusMethod': 3,[0m
[1m[31mE 'title': 'Hello world',[0m
[1m[31mE 'type': 2,[0m
[1m[31mE }[0m
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with tests/sentry/incidents/serializers/test_workflow_engine_incident.py::TestIncidentSerializer::test_detailed and reproduce the failure from the linked Actions run. Inspect the full assertion diff, especially the alertRule triggers and actions ordering. Done means the test passes reliably without depending on intermittent serialized output ordering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100