Skip to content

Commit

Permalink
fix(hybridcloud) Remove limit on project key query used in sdk wizard
Browse files Browse the repository at this point in the history
Limiting these results can create user confusion as they aren't able to
find the project/dsn they are interested in. We'll need to revisit this
in the future as unbounded API requests will eventually timeout.
  • Loading branch information
markstory committed Nov 16, 2023
1 parent eab0e8b commit e5e1665
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/sentry/services/hybrid_cloud/project_key/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ def get_project_keys_by_region(
region_name: str,
project_ids: List[str],
role: ProjectKeyRole,
limit: int = 100,
) -> List[RpcProjectKey]:
# TODO: This query is unbounded and will need to be addressed in the future.
project_keys = ProjectKey.objects.filter(
project__in=project_ids,
roles=F("roles").bitor(role.as_orm_role()),
status=ProjectKeyStatus.ACTIVE,
).order_by("-date_added")[:limit]
).order_by("-date_added")
return [serialize_project_key(pk) for pk in project_keys]
1 change: 0 additions & 1 deletion src/sentry/services/hybrid_cloud/project_key/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def get_project_keys_by_region(
region_name: str,
project_ids: List[str],
role: ProjectKeyRole,
limit: int = 100,
) -> List[RpcProjectKey]:
pass

Expand Down

0 comments on commit e5e1665

Please sign in to comment.