Skip to content

chore(aci): Remove uses of workflow-engine-post-process-async flag #95382

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

Conversation

kcons
Copy link
Member

@kcons kcons commented Jul 11, 2025

Nobody is opted out anymore, turning this off could pose significant operational risk to post_process, and any value as a kill switch is already covered by the more general opt-in flags.

@kcons kcons requested a review from a team July 11, 2025 21:45
@kcons kcons requested a review from a team as a code owner July 11, 2025 21:45
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jul 11, 2025
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: TypedDict Access Causes KeyError for Optional Keys

The change from job.get() to direct dictionary access job[] for optional keys (group_state, has_reappeared, has_escalated) in the PostProcessJob TypedDict (defined with total=False) will cause KeyError exceptions when these keys are missing, instead of returning None.

src/sentry/tasks/post_process.py#L968-L971

group_id=job["event"].group_id,
group_state=job["group_state"],
has_reappeared=job["has_reappeared"],
has_escalated=job["has_escalated"],

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

Copy link

codecov bot commented Jul 11, 2025

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
27212 2 27210 243
View the top 2 failed test(s) by shortest run time
tests.sentry.incidents.test_metric_issue_post_process.TestMetricDetectorPostProcess::test_occurrence_post_process
Stack Traces | 3.73s run time
#x1B[1m#x1B[.../sentry/incidents/test_metric_issue_post_process.py#x1B[0m:117: in test_occurrence_post_process
    assert mock_process_workflows.call_count == 1
#x1B[1m#x1B[31mE   AssertionError: assert 0 == 1#x1B[0m
#x1B[1m#x1B[31mE    +  where 0 = <MagicMock name='process_workflows' id='140142950133312'>.call_count#x1B[0m
tests.sentry.workflow_engine.test_integration.TestWorkflowEngineIntegrationFromIssuePlatform::test_workflow_engine__workflows
Stack Traces | 6.97s run time
#x1B[1m#x1B[.../sentry/workflow_engine/test_integration.py#x1B[0m:158: in test_workflow_engine__workflows
    mock_process_workflow.assert_called_once()
#x1B[1m#x1B[.../hostedtoolcache/Python/3.13.1.../x64/lib/python3.13/unittest/mock.py#x1B[0m:956: in assert_called_once
    raise AssertionError(msg)
#x1B[1m#x1B[31mE   AssertionError: Expected 'process_workflows' to have been called once. Called 0 times.#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.

@kcons kcons marked this pull request as draft July 11, 2025 22:02
Copy link
Contributor

@saponifi3d saponifi3d left a comment

Choose a reason for hiding this comment

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

the change lgtm, but looks like a test or two might need to be updated now

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