Skip to content

ref(cells): Update rpc service methods#110897

Merged
lynnagara merged 2 commits into
masterfrom
workflow-issue-service
Mar 17, 2026
Merged

ref(cells): Update rpc service methods#110897
lynnagara merged 2 commits into
masterfrom
workflow-issue-service

Conversation

@lynnagara
Copy link
Copy Markdown
Member

@lynnagara lynnagara commented Mar 17, 2026

updates rpc methods to accept cell_name in:

  • workflow service
  • issue service
  • hook service
  • sentry_apps service
  • projects service
  • test generation service

@lynnagara lynnagara requested review from a team as code owners March 17, 2026 18:37
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 17, 2026
Comment on lines 39 to 46
def update_action_status_for_sentry_app_installation(
self,
*,
region_name: str,
cell_name: str | None = None, # TODO(cells): make required when all callers are updated
region_name: str | None = None, # TODO(cells): remove when all callers are updated
status: int,
organization_id: int,
sentry_app_id: int,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: The parameters in the concrete service implementations do not match the updated abstract service interfaces, which will cause a startup-time crash.
Severity: CRITICAL

Suggested Fix

Update the method signatures in the concrete service implementations (e.g., DatabaseBackedActionService) to match the abstract interfaces in service.py. This includes adding the cell_name parameter to methods like update_action_status_for_sentry_app_installation.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/sentry/workflow_engine/service/action/service.py#L39-L46

Potential issue: The RPC service interfaces in `ActionService` and `IssueService` were
updated to add a new `cell_name` parameter and make `region_name` optional. However, the
corresponding concrete implementations in `impl.py` files were not updated to match
these new signatures. This discrepancy will cause the application to fail at startup.
The service initialization logic in `_get_and_validate_local_implementation` compares
the parameter sets of the abstract service and the concrete implementation. Since the
sets do not match (the implementation is missing `cell_name`), an
`RpcServiceSetupException` will be raised, preventing the application from starting.

Did we get this right? 👍 / 👎 to inform future reviews.

@lynnagara lynnagara changed the title ref(cells): Update workflow and issue services ref(cells): Update rpc services Mar 17, 2026
@lynnagara lynnagara changed the title ref(cells): Update rpc services ref(cells): Update rpc service methods Mar 17, 2026
Copy link
Copy Markdown
Contributor

@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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread src/sentry/issues/services/issue/service.py
self, *, region_name: str, external_issue_key: str, integration_id: int
self,
*,
cell_name: str | None = None, # TODO(cells): make required when all callers are updated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should cell_name be at the end of the definition to begin with so that it doesn't throw off any *args calls, if any?

Copy link
Copy Markdown
Member Author

@lynnagara lynnagara Mar 17, 2026

Choose a reason for hiding this comment

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

the * is there (similar to the other rpc functions) so can only be called with keyword args and shouldn't have ordering issues when called

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ahh, I forgot that it enforces it, lgtm

@lynnagara lynnagara merged commit 2d0d29b into master Mar 17, 2026
65 checks passed
@lynnagara lynnagara deleted the workflow-issue-service branch March 17, 2026 22:06
JonasBa pushed a commit that referenced this pull request Mar 18, 2026
updates rpc methods to accept cell_name in:
- workflow service
- issue service
- hook service
- sentry_apps service
- projects service
- test generation service
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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