Skip to content

feat(workflow_engine): Add support to handle Activity events in the WorkflowEventData #93580

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

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

saponifi3d
Copy link
Contributor

@saponifi3d saponifi3d commented Jun 14, 2025

Description

Since so much of the system needs access to the WorkflowEventData.event.group and the Activity model doesn't support it (but we do have access to it), so i moved group to the top level of WorkflowEventData -- this allows a majority of the DataConditions to work seamlessly between activities and events.

The core change here is to WorkflowEventData type and everything else is a cascade that needed to be updated. Thanks to all for typing things so well to make this easier to discover / update.

I'll have another PR that starts to send the activities and connects everything in workflow_engine/tasks.py.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 14, 2025
Copy link

codecov bot commented Jun 14, 2025

❌ 13 Tests Failed:

Tests completed Failed Passed Skipped
26639 13 26626 241
View the top 3 failed test(s) by shortest run time
tests.sentry.workflow_engine.models.test_action.TestAction::test_config_schema
Stack Traces | 0.059s run time
#x1B[1m#x1B[.../workflow_engine/models/test_action.py#x1B[0m:16: in setUp
    self.mock_event = WorkflowEventData(event=mock_group, group=mock_group.group)
#x1B[1m#x1B[.../hostedtoolcache/Python/3.13.1.../x64/lib/python3.13/unittest/mock.py#x1B[0m:688: in __getattr__
    raise AttributeError("Mock object has no attribute %r" % name)
#x1B[1m#x1B[31mE   AttributeError: Mock object has no attribute 'group'#x1B[0m
tests.sentry.workflow_engine.models.test_action.TestAction::test_config_schema__invalid
Stack Traces | 0.059s run time
#x1B[1m#x1B[.../workflow_engine/models/test_action.py#x1B[0m:16: in setUp
    self.mock_event = WorkflowEventData(event=mock_group, group=mock_group.group)
#x1B[1m#x1B[.../hostedtoolcache/Python/3.13.1.../x64/lib/python3.13/unittest/mock.py#x1B[0m:688: in __getattr__
    raise AttributeError("Mock object has no attribute %r" % name)
#x1B[1m#x1B[31mE   AttributeError: Mock object has no attribute 'group'#x1B[0m
tests.sentry.workflow_engine.models.test_action.TestAction::test_data_schema
Stack Traces | 0.061s run time
#x1B[1m#x1B[.../workflow_engine/models/test_action.py#x1B[0m:16: in setUp
    self.mock_event = WorkflowEventData(event=mock_group, group=mock_group.group)
#x1B[1m#x1B[.../hostedtoolcache/Python/3.13.1.../x64/lib/python3.13/unittest/mock.py#x1B[0m:688: in __getattr__
    raise AttributeError("Mock object has no attribute %r" % name)
#x1B[1m#x1B[31mE   AttributeError: Mock object has no attribute 'group'#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.

saponifi3d added a commit that referenced this pull request Jun 18, 2025
…93553)

## Description
- Create a celery task namespace for the workflow engine tasks
- Create a task for processing an activity in the workflow_engine --
this will allow us to create a celery task to async execute process
workflows when the issue platform creates an activity

In the code I mention there being a follow-up PR:
#93580 is the initial PR to
support the `Activity` / `Group` models.
@saponifi3d saponifi3d force-pushed the jcallender/aci/support-activity-events branch from c9847a3 to 58289a4 Compare June 19, 2025 00:46
andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
…93553)

## Description
- Create a celery task namespace for the workflow engine tasks
- Create a task for processing an activity in the workflow_engine --
this will allow us to create a celery task to async execute process
workflows when the issue platform creates an activity

In the code I mention there being a follow-up PR:
#93580 is the initial PR to
support the `Activity` / `Group` models.
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.

1 participant