Skip to content

feat(workflow_engine): Hook up activity updates to process_workflows #94678

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 3 commits into
base: master
Choose a base branch
from

Conversation

saponifi3d
Copy link
Contributor

Description

Complete support for Activity updates from the issue platform. This will filter to known activities that we can handle (right now, it's just issue resolution).

  • Needed to fix a few areas of logic to support the full end to end of process_workflows with an activity update.
  • Added Tests to ensure we could create an activity, run the task and it will fetch any associated data an evaluate as exected.

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

sentry-io bot commented Jul 1, 2025

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: src/sentry/workflow_engine/processors/workflow.py

Function Unhandled Issue
evaluate_workflows_action_filters SoftTimeLimitExceeded: SoftTimeLimitExceeded('SoftTimeLimitExceeded()\nSQL: SELECT "workflow_engine_workflow"."id", "workflow_engine_workflow"."date_updated", "workflow_engine_workflow"."date_added", "workflow_engine_workflow"."config", "workflow_engine_workflow"."owner_user_... ...
Event Count: 2

Did you find this useful? React with a 👍 or 👎

Copy link

codecov bot commented Jul 1, 2025

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
27137 2 27135 247
View the top 2 failed test(s) by shortest run time
tests.sentry.workflow_engine.test_task_integration.IssuePlatformIntegrationTests::test_handler_invoked__when_resolved
Stack Traces | 2.25s run time
#x1B[1m#x1B[.../sentry/workflow_engine/test_task_integration.py#x1B[0m:69: in test_handler_invoked__when_resolved
    mock_incr.assert_called_with(
#x1B[1m#x1B[.../hostedtoolcache/Python/3.13.1.../x64/lib/python3.13/unittest/mock.py#x1B[0m:977: in assert_called_with
    raise AssertionError(_error_message()) from cause
#x1B[1m#x1B[31mE   AssertionError: expected call not found.#x1B[0m
#x1B[1m#x1B[31mE   Expected: incr('workflow_engine.process_workflow.activity_update', tags={'activity_type': 1})#x1B[0m
#x1B[1m#x1B[31mE     Actual: incr('jobs.all.dispatched', skip_internal=False)#x1B[0m
tests.sentry.workflow_engine.test_task_integration.IssuePlatformIntegrationTests::test_handler_invoked__when_update_status_called
Stack Traces | 2.41s run time
#x1B[1m#x1B[.../sentry/workflow_engine/test_task_integration.py#x1B[0m:47: in test_handler_invoked__when_update_status_called
    mock_incr.assert_called_with(
#x1B[1m#x1B[.../hostedtoolcache/Python/3.13.1.../x64/lib/python3.13/unittest/mock.py#x1B[0m:977: in assert_called_with
    raise AssertionError(_error_message()) from cause
#x1B[1m#x1B[31mE   AssertionError: expected call not found.#x1B[0m
#x1B[1m#x1B[31mE   Expected: incr('workflow_engine.process_workflow.activity_update', tags={'activity_type': 1})#x1B[0m
#x1B[1m#x1B[31mE     Actual: incr('jobs.all.dispatched', skip_internal=False)#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.

1 participant