Skip to content

ref(cells): send cell_name on the wire#111218

Merged
lynnagara merged 2 commits intomasterfrom
switch-wire-format
Mar 23, 2026
Merged

ref(cells): send cell_name on the wire#111218
lynnagara merged 2 commits intomasterfrom
switch-wire-format

Conversation

@lynnagara
Copy link
Member

the pydantic models RpcOrganizationMapping and RpcOrganizationMappingUpdate used for rpc now send cell_name instead of region_name on the wire

support for both fields was added in #111039

the pydantic models RpcOrganizationMapping and RpcOrganizationMappingUpdate
used for rpc now send `cell_name` instead of `region_name` on the wire
@lynnagara lynnagara requested a review from a team March 20, 2026 17:47
@lynnagara lynnagara requested a review from a team as a code owner March 20, 2026 17:47
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 20, 2026
status=organization.status,
slug=organization.slug,
region_name=region.name,
cell_name=region.name,
Copy link
Member

Choose a reason for hiding this comment

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

Looking at this locally, we'll still be sending region_name on the wire after these changes.

>>> from sentry.hybridcloud.services.organization_mapping.model import RpcOrganizationMappingUpdate
>>> r = RpcOrganizationMappingUpdate(cell_name='us', customer_id=None, name="test", status=0, slug="test")
>>> r.dict()
{'name': 'test', 'status': 0, 'slug': 'test', 'region_name': 'us', 'customer_id': None, 'requires_2fa': False, 'early_adopter': False, 'codecov_access': False, 'disable_shared_issues': False, 'allow_joinleave': False, 'disable_new_visibility_features': False, 'enhanced_privacy': False, 'require_email_verification': False, 'disable_member_project_creation': False, 'prevent_superuser_access': False, 'disable_member_invite': False}

I think for cell_name to be used on the wire format, the models would need a formal cell_name attribute.

Copy link
Member

Choose a reason for hiding this comment

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

We could also override the dict() method to copy region_name into cell_name so that both fields are present in the wire data.

Copy link
Member Author

@lynnagara lynnagara Mar 20, 2026

Choose a reason for hiding this comment

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

oh i see, updated the models so cell_name is default and region_name is accepted and co-erced into cell_name instead of the other way around

this is deploy safe since both are currently valid now, just flipping the default

@lynnagara lynnagara merged commit 4fc8d12 into master Mar 23, 2026
104 of 105 checks passed
@lynnagara lynnagara deleted the switch-wire-format branch March 23, 2026 20:21
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