ref(cells): send cell_name on the wire#111218
Merged
Conversation
the pydantic models RpcOrganizationMapping and RpcOrganizationMappingUpdate used for rpc now send `cell_name` instead of `region_name` on the wire
markstory
reviewed
Mar 20, 2026
| status=organization.status, | ||
| slug=organization.slug, | ||
| region_name=region.name, | ||
| cell_name=region.name, |
Member
There was a problem hiding this comment.
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.
Member
There was a problem hiding this comment.
We could also override the dict() method to copy region_name into cell_name so that both fields are present in the wire data.
Member
Author
There was a problem hiding this comment.
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
markstory
approved these changes
Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
the pydantic models RpcOrganizationMapping and RpcOrganizationMappingUpdate used for rpc now send
cell_nameinstead ofregion_nameon the wiresupport for both fields was added in #111039