Skip to content

ref(control_silo): Move UserAvatar model to users module #76190

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

Merged

Conversation

Christinarlong
Copy link
Contributor

Part of moving control silo user related resources into the users module, this PR does not include an old UserRole import shim as it's not used in getsentry. Includes adding of types for functions.

Apart of (#73856)

Part of moving control silo user related resources into the users module, this PR does not include an old UserRole import shim as it's not used in getsentry. Includes adding of types for functions.

Apart of (#73856)
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 14, 2024
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Broke test_avatar into these two files

  • test_organization_avatar
  • test_user_avatar

@@ -63,7 +63,7 @@ def outboxes_for_update(self, shard_identifier: int | None = None) -> list[Contr
)

@contextlib.contextmanager
def _maybe_prepare_outboxes(self, *, outbox_before_super: bool):
def _maybe_prepare_outboxes(self, *, outbox_before_super: bool) -> Generator[None]:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not rlly familiar with the convention here, should this be `Generator[None, None, None] from following this, or does it not matter ?

Copy link
Member

Choose a reason for hiding this comment

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

Generator[None] is the simpler form and one we should use. Recently all Generator[none, none, none] were updated. See 16b7563

@Christinarlong Christinarlong marked this pull request as ready for review August 14, 2024 18:45
@Christinarlong Christinarlong requested a review from a team as a code owner August 14, 2024 18:45
Copy link
Member

@markstory markstory left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@@ -63,7 +63,7 @@ def outboxes_for_update(self, shard_identifier: int | None = None) -> list[Contr
)

@contextlib.contextmanager
def _maybe_prepare_outboxes(self, *, outbox_before_super: bool):
def _maybe_prepare_outboxes(self, *, outbox_before_super: bool) -> Generator[None]:
Copy link
Member

Choose a reason for hiding this comment

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

Generator[None] is the simpler form and one we should use. Recently all Generator[none, none, none] were updated. See 16b7563

@Christinarlong Christinarlong merged commit a85dd40 into master Aug 15, 2024
48 checks passed
@Christinarlong Christinarlong deleted the christinarlong/consolidate-users-models-useravatar branch August 15, 2024 23:22
@github-actions github-actions bot locked and limited conversation to collaborators Aug 31, 2024
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