Skip to content

feat(billing): Add get orgs with usage endpoint#112214

Draft
brendanhsentry wants to merge 7 commits intomasterfrom
brendan/get-orgs-with-usage
Draft

feat(billing): Add get orgs with usage endpoint#112214
brendanhsentry wants to merge 7 commits intomasterfrom
brendan/get-orgs-with-usage

Conversation

@brendanhsentry
Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 3, 2026
Comment thread src/sentry/billing/platform/services/usage/service.py
Comment thread src/sentry/billing/platform/services/usage/_outcomes_query.py
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

Backend Test Failures

Failures on 8ce67e9 in this run:

tests/sentry/billing/platform/services/usage/test_outcomes_query.py::TestQueryOrgsWithUsage::test_returns_org_idslog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/billing/platform/services/usage/test_outcomes_query.py:390: in test_returns_org_ids
    response = query_orgs_with_usage(request)
src/sentry/billing/platform/services/usage/_outcomes_query.py:62: in query_orgs_with_usage
    limit = request.limit if request.HasField("limit") else _QUERY_LIMIT
E   ValueError: Field sentry_protos.billing.v1.services.usage.v1.GetOrgsWithUsageRequest.limit does not have presence.
tests/sentry/billing/platform/services/usage/test_outcomes_query.py::TestQueryOrgsWithUsage::test_empty_resultslog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/billing/platform/services/usage/test_outcomes_query.py:403: in test_empty_results
    response = query_orgs_with_usage(request)
src/sentry/billing/platform/services/usage/_outcomes_query.py:62: in query_orgs_with_usage
    limit = request.limit if request.HasField("limit") else _QUERY_LIMIT
E   ValueError: Field sentry_protos.billing.v1.services.usage.v1.GetOrgsWithUsageRequest.limit does not have presence.
tests/sentry/billing/platform/services/usage/test_outcomes_query.py::TestQueryOrgsWithUsage::test_query_has_no_org_id_filterlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/billing/platform/services/usage/test_outcomes_query.py:416: in test_query_has_no_org_id_filter
    query_orgs_with_usage(request)
src/sentry/billing/platform/services/usage/_outcomes_query.py:62: in query_orgs_with_usage
    limit = request.limit if request.HasField("limit") else _QUERY_LIMIT
E   ValueError: Field sentry_protos.billing.v1.services.usage.v1.GetOrgsWithUsageRequest.limit does not have presence.
tests/sentry/billing/platform/services/usage/test_outcomes_query.py::TestQueryOrgsWithUsage::test_pagination_no_more_resultslog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/billing/platform/services/usage/test_outcomes_query.py:432: in test_pagination_no_more_results
    response = query_orgs_with_usage(request)
src/sentry/billing/platform/services/usage/_outcomes_query.py:62: in query_orgs_with_usage
    limit = request.limit if request.HasField("limit") else _QUERY_LIMIT
E   ValueError: Field sentry_protos.billing.v1.services.usage.v1.GetOrgsWithUsageRequest.limit does not have presence.
tests/sentry/billing/platform/services/usage/test_outcomes_query.py::TestQueryOrgsWithUsage::test_pagination_has_morelog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/billing/platform/services/usage/test_outcomes_query.py:445: in test_pagination_has_more
    response = query_orgs_with_usage(request)
src/sentry/billing/platform/services/usage/_outcomes_query.py:62: in query_orgs_with_usage
    limit = request.limit if request.HasField("limit") else _QUERY_LIMIT
E   ValueError: Field sentry_protos.billing.v1.services.usage.v1.GetOrgsWithUsageRequest.limit does not have presence.
tests/sentry/billing/platform/services/usage/test_outcomes_query.py::TestQueryOrgsWithUsage::test_pagination_with_page_tokenlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/billing/platform/services/usage/test_outcomes_query.py:462: in test_pagination_with_page_token
    response = query_orgs_with_usage(request)
src/sentry/billing/platform/services/usage/_outcomes_query.py:62: in query_orgs_with_usage
    limit = request.limit if request.HasField("limit") else _QUERY_LIMIT
E   ValueError: Field sentry_protos.billing.v1.services.usage.v1.GetOrgsWithUsageRequest.limit does not have presence.
tests/sentry/billing/platform/services/usage/test_outcomes_query.py::TestQueryOrgsWithUsage::test_pagination_next_offset_accounts_for_currentlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/billing/platform/services/usage/test_outcomes_query.py:478: in test_pagination_next_offset_accounts_for_current
    response = query_orgs_with_usage(request)
src/sentry/billing/platform/services/usage/_outcomes_query.py:62: in query_orgs_with_usage
    limit = request.limit if request.HasField("limit") else _QUERY_LIMIT
E   ValueError: Field sentry_protos.billing.v1.services.usage.v1.GetOrgsWithUsageRequest.limit does not have presence.
tests/sentry/billing/platform/services/usage/test_outcomes_query.py::TestQueryOrgsWithUsage::test_default_limit_used_when_not_setlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/billing/platform/services/usage/test_outcomes_query.py:491: in test_default_limit_used_when_not_set
    query_orgs_with_usage(request)
src/sentry/billing/platform/services/usage/_outcomes_query.py:62: in query_orgs_with_usage
    limit = request.limit if request.HasField("limit") else _QUERY_LIMIT
E   ValueError: Field sentry_protos.billing.v1.services.usage.v1.GetOrgsWithUsageRequest.limit does not have presence.
tests/sentry/billing/platform/services/usage/test_outcomes_query.py::TestQueryOrgsWithUsage::test_queries_with_limit_plus_onelog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/billing/platform/services/usage/test_outcomes_query.py:505: in test_queries_with_limit_plus_one
    query_orgs_with_usage(request)
src/sentry/billing/platform/services/usage/_outcomes_query.py:62: in query_orgs_with_usage
    limit = request.limit if request.HasField("limit") else _QUERY_LIMIT
E   ValueError: Field sentry_protos.billing.v1.services.usage.v1.GetOrgsWithUsageRequest.limit does not have presence.

Comment thread src/sentry/billing/platform/services/usage/_outcomes_query.py Outdated
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.

1 participant