diff --git a/src/sentry/api/urls.py b/src/sentry/api/urls.py index 3d2d704719de6f..e514c53a5eb52c 100644 --- a/src/sentry/api/urls.py +++ b/src/sentry/api/urls.py @@ -390,6 +390,7 @@ from .endpoints.organization_events_trends_v2 import OrganizationEventsNewTrendsStatsEndpoint from .endpoints.organization_events_vitals import OrganizationEventsVitalsEndpoint from .endpoints.organization_group_index_stats import OrganizationGroupIndexStatsEndpoint +from .endpoints.organization_id_or_slugs import SlugsUpdateEndpoint from .endpoints.organization_index import OrganizationIndexEndpoint from .endpoints.organization_integration_issues import OrganizationIntegrationIssuesEndpoint from .endpoints.organization_integration_repos import OrganizationIntegrationReposEndpoint @@ -471,7 +472,6 @@ from .endpoints.organization_search_details import OrganizationSearchDetailsEndpoint from .endpoints.organization_sessions import OrganizationSessionsEndpoint from .endpoints.organization_shortid import ShortIdLookupEndpoint -from .endpoints.organization_slugs import SlugsUpdateEndpoint from .endpoints.organization_spans_fields import ( OrganizationSpansFieldsEndpoint, OrganizationSpansFieldValuesEndpoint, @@ -1133,7 +1133,7 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-organization-alert-rules", ), re_path( - r"^(?P[^\/]+)/alert-rules/available-actions/$", + r"^(?P[^\/]+)/alert-rules/available-actions/$", OrganizationAlertRuleAvailableActionIndexEndpoint.as_view(), name="sentry-api-0-organization-alert-rule-available-actions", ), @@ -1148,70 +1148,70 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-organization-alert-rule-activations", ), re_path( # fetch combined metric and issue alert rules - r"^(?P[^\/]+)/combined-rules/$", + r"^(?P[^\/]+)/combined-rules/$", OrganizationCombinedRuleIndexEndpoint.as_view(), name="sentry-api-0-organization-combined-rules", ), # Data Export re_path( - r"^(?P[^\/]+)/data-export/$", + r"^(?P[^\/]+)/data-export/$", DataExportEndpoint.as_view(), name="sentry-api-0-organization-data-export", ), re_path( - r"^(?P[^\/]+)/data-export/(?P[^\/]+)/$", + r"^(?P[^\/]+)/data-export/(?P[^\/]+)/$", DataExportDetailsEndpoint.as_view(), name="sentry-api-0-organization-data-export-details", ), # Incidents re_path( - r"^(?P[^\/]+)/incidents/(?P[^\/]+)/activity/$", + r"^(?P[^\/]+)/incidents/(?P[^\/]+)/activity/$", OrganizationIncidentActivityIndexEndpoint.as_view(), name="sentry-api-0-organization-incident-activity", ), re_path( - r"^(?P[^\/]+)/incidents/(?P[^\/]+)/comments/$", + r"^(?P[^\/]+)/incidents/(?P[^\/]+)/comments/$", OrganizationIncidentCommentIndexEndpoint.as_view(), name="sentry-api-0-organization-incident-comments", ), re_path( - r"^(?P[^\/]+)/incidents/(?P[^\/]+)/comments/(?P[^\/]+)/$", + r"^(?P[^\/]+)/incidents/(?P[^\/]+)/comments/(?P[^\/]+)/$", OrganizationIncidentCommentDetailsEndpoint.as_view(), name="sentry-api-0-organization-incident-comment-details", ), re_path( - r"^(?P[^\/]+)/incidents/(?P[^\/]+)/$", + r"^(?P[^\/]+)/incidents/(?P[^\/]+)/$", OrganizationIncidentDetailsEndpoint.as_view(), name="sentry-api-0-organization-incident-details", ), re_path( - r"^(?P[^\/]+)/incidents/$", + r"^(?P[^\/]+)/incidents/$", OrganizationIncidentIndexEndpoint.as_view(), name="sentry-api-0-organization-incident-index", ), re_path( - r"^(?P[^\/]+)/incidents/(?P[^\/]+)/seen/$", + r"^(?P[^\/]+)/incidents/(?P[^\/]+)/seen/$", OrganizationIncidentSeenEndpoint.as_view(), name="sentry-api-0-organization-incident-seen", ), re_path( - r"^(?P[^\/]+)/incidents/(?P[^\/]+)/subscriptions/$", + r"^(?P[^\/]+)/incidents/(?P[^\/]+)/subscriptions/$", OrganizationIncidentSubscriptionIndexEndpoint.as_view(), name="sentry-api-0-organization-incident-subscription-index", ), re_path( - r"^(?P[^\/]+)/chunk-upload/$", + r"^(?P[^\/]+)/chunk-upload/$", ChunkUploadEndpoint.as_view(), name="sentry-api-0-chunk-upload", ), # Code Path Mappings re_path( - r"^(?P[^\/]+)/code-mappings/$", + r"^(?P[^\/]+)/code-mappings/$", OrganizationCodeMappingsEndpoint.as_view(), name="sentry-api-0-organization-code-mappings", ), re_path( - r"^(?P[^\/]+)/derive-code-mappings/$", + r"^(?P[^\/]+)/derive-code-mappings/$", OrganizationDeriveCodeMappingsEndpoint.as_view(), name="sentry-api-0-organization-derive-code-mappings", ), @@ -1227,59 +1227,59 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-organization-code-mapping-codeowners", ), re_path( - r"^(?P[^\/]+)/codeowners-associations/$", + r"^(?P[^\/]+)/codeowners-associations/$", OrganizationCodeOwnersAssociationsEndpoint.as_view(), name="sentry-api-0-organization-codeowners-associations", ), # Discover re_path( - r"^(?P[^\/]+)/discover/homepage/$", + r"^(?P[^\/]+)/discover/homepage/$", DiscoverHomepageQueryEndpoint.as_view(), name="sentry-api-0-discover-homepage-query", ), re_path( - r"^(?P[^\/]+)/discover/saved/$", + r"^(?P[^\/]+)/discover/saved/$", DiscoverSavedQueriesEndpoint.as_view(), name="sentry-api-0-discover-saved-queries", ), re_path( - r"^(?P[^\/]+)/discover/saved/(?P\d+)/$", + r"^(?P[^\/]+)/discover/saved/(?P\d+)/$", DiscoverSavedQueryDetailEndpoint.as_view(), name="sentry-api-0-discover-saved-query-detail", ), re_path( - r"^(?P[^\/]+)/discover/saved/(?P\d+)/visit/$", + r"^(?P[^\/]+)/discover/saved/(?P\d+)/visit/$", DiscoverSavedQueryVisitEndpoint.as_view(), name="sentry-api-0-discover-saved-query-visit", ), re_path( - r"^(?P[^\/]+)/key-transactions/$", + r"^(?P[^\/]+)/key-transactions/$", KeyTransactionEndpoint.as_view(), name="sentry-api-0-organization-key-transactions", ), re_path( - r"^(?P[^\/]+)/key-transactions-list/$", + r"^(?P[^\/]+)/key-transactions-list/$", KeyTransactionListEndpoint.as_view(), name="sentry-api-0-organization-key-transactions-list", ), re_path( - r"^(?P[^\/]+)/related-issues/$", + r"^(?P[^\/]+)/related-issues/$", OrganizationEventsRelatedIssuesEndpoint.as_view(), name="sentry-api-0-organization-related-issues", ), re_path( - r"^(?P[^\/]+)/project-transaction-threshold-override/$", + r"^(?P[^\/]+)/project-transaction-threshold-override/$", ProjectTransactionThresholdOverrideEndpoint.as_view(), name="sentry-api-0-organization-project-transaction-threshold-override", ), # Dashboards re_path( - r"^(?P[^\/]+)/dashboards/$", + r"^(?P[^\/]+)/dashboards/$", OrganizationDashboardsEndpoint.as_view(), name="sentry-api-0-organization-dashboards", ), re_path( - r"^(?P[^\/]+)/dashboards/widgets/$", + r"^(?P[^\/]+)/dashboards/widgets/$", OrganizationDashboardWidgetDetailsEndpoint.as_view(), name="sentry-api-0-organization-dashboard-widget-details", ), @@ -1304,22 +1304,22 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-event-id-lookup", ), re_path( - r"^(?P[^\/]+)/data-scrubbing-selector-suggestions/$", + r"^(?P[^\/]+)/data-scrubbing-selector-suggestions/$", DataScrubbingSelectorSuggestionsEndpoint.as_view(), name="sentry-api-0-data-scrubbing-selector-suggestions", ), re_path( - r"^(?P[^\/]+)/slugs/$", + r"^(?P[^\/]+)/slugs/$", SlugsUpdateEndpoint.as_view(), name="sentry-api-0-short-ids-update", ), re_path( - r"^(?P[^\/]+)/access-requests/$", + r"^(?P[^\/]+)/access-requests/$", OrganizationAccessRequestDetailsEndpoint.as_view(), name="sentry-api-0-organization-access-requests", ), re_path( - r"^(?P[^\/]+)/access-requests/(?P\d+)/$", + r"^(?P[^\/]+)/access-requests/(?P\d+)/$", OrganizationAccessRequestDetailsEndpoint.as_view(), name="sentry-api-0-organization-access-request-details", ), @@ -1329,62 +1329,62 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-organization-activity", ), re_path( - r"^(?P[^\/]+)/api-keys/$", + r"^(?P[^\/]+)/api-keys/$", OrganizationApiKeyIndexEndpoint.as_view(), name="sentry-api-0-organization-api-key-index", ), re_path( - r"^(?P[^\/]+)/api-keys/(?P[^\/]+)/$", + r"^(?P[^\/]+)/api-keys/(?P[^\/]+)/$", OrganizationApiKeyDetailsEndpoint.as_view(), name="sentry-api-0-organization-api-key-details", ), re_path( - r"^(?P[^\/]+)/audit-logs/$", + r"^(?P[^\/]+)/audit-logs/$", OrganizationAuditLogsEndpoint.as_view(), name="sentry-api-0-organization-audit-logs", ), re_path( - r"^(?P[^\/]+)/auth-provider/$", + r"^(?P[^\/]+)/auth-provider/$", OrganizationAuthProviderDetailsEndpoint.as_view(), name="sentry-api-0-organization-auth-provider", ), re_path( - r"^(?P[^\/]+)/auth-providers/$", + r"^(?P[^\/]+)/auth-providers/$", OrganizationAuthProvidersEndpoint.as_view(), name="sentry-api-0-organization-auth-providers", ), re_path( - r"^(?P[^\/]+)/auth-provider/send-reminders/$", + r"^(?P[^\/]+)/auth-provider/send-reminders/$", OrganizationAuthProviderSendRemindersEndpoint.as_view(), name="sentry-api-0-organization-auth-provider-send-reminders", ), re_path( - r"^(?P[^\/]+)/avatar/$", + r"^(?P[^\/]+)/avatar/$", OrganizationAvatarEndpoint.as_view(), name="sentry-api-0-organization-avatar", ), re_path( - r"^(?P[^\/]+)/artifactbundle/assemble/$", + r"^(?P[^\/]+)/artifactbundle/assemble/$", OrganizationArtifactBundleAssembleEndpoint.as_view(), name="sentry-api-0-organization-artifactbundle-assemble", ), re_path( - r"^(?P[^\/]+)/config/integrations/$", + r"^(?P[^\/]+)/config/integrations/$", OrganizationConfigIntegrationsEndpoint.as_view(), name="sentry-api-0-organization-config-integrations", ), re_path( - r"^(?P[^\/]+)/config/repos/$", + r"^(?P[^\/]+)/config/repos/$", OrganizationConfigRepositoriesEndpoint.as_view(), name="sentry-api-0-organization-config-repositories", ), re_path( - r"^(?P[^\/]+)/sdk-updates/$", + r"^(?P[^\/]+)/sdk-updates/$", OrganizationSdkUpdatesEndpoint.as_view(), name="sentry-api-0-organization-sdk-updates", ), re_path( - r"^(?P[^\/]+)/sdks/$", + r"^(?P[^\/]+)/sdks/$", OrganizationSdksEndpoint.as_view(), name="sentry-api-0-organization-sdks", ), @@ -1399,169 +1399,169 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-organization-event-details", ), re_path( - r"^(?P[^\/]+)/events-stats/$", + r"^(?P[^\/]+)/events-stats/$", OrganizationEventsStatsEndpoint.as_view(), name="sentry-api-0-organization-events-stats", ), re_path( - r"^(?P[^\/]+)/traces/$", + r"^(?P[^\/]+)/traces/$", OrganizationTracesEndpoint.as_view(), name="sentry-api-0-organization-traces", ), re_path( - r"^(?P[^\/]+)/spans/fields/$", + r"^(?P[^\/]+)/spans/fields/$", OrganizationSpansFieldsEndpoint.as_view(), name="sentry-api-0-organization-spans-fields", ), re_path( - r"^(?P[^\/]+)/spans/fields/(?P[^/]+)/values/$", + r"^(?P[^\/]+)/spans/fields/(?P[^/]+)/values/$", OrganizationSpansFieldValuesEndpoint.as_view(), name="sentry-api-0-organization-spans-fields-values", ), re_path( - r"^(?P[^\/]+)/metrics-estimation-stats/$", + r"^(?P[^\/]+)/metrics-estimation-stats/$", OrganizationMetricsEstimationStatsEndpoint.as_view(), name="sentry-api-0-organization-metrics-estimation-stats", ), re_path( - r"^(?P[^\/]+)/events-facets/$", + r"^(?P[^\/]+)/events-facets/$", OrganizationEventsFacetsEndpoint.as_view(), name="sentry-api-0-organization-events-facets", ), re_path( - r"^(?P[^\/]+)/events-facets-performance/$", + r"^(?P[^\/]+)/events-facets-performance/$", OrganizationEventsFacetsPerformanceEndpoint.as_view(), name="sentry-api-0-organization-events-facets-performance", ), re_path( - r"^(?P[^\/]+)/events-facets-performance-histogram/$", + r"^(?P[^\/]+)/events-facets-performance-histogram/$", OrganizationEventsFacetsPerformanceHistogramEndpoint.as_view(), name="sentry-api-0-organization-events-facets-performance-histogram", ), re_path( - r"^(?P[^\/]+)/events-span-ops/$", + r"^(?P[^\/]+)/events-span-ops/$", OrganizationEventsSpanOpsEndpoint.as_view(), name="sentry-api-0-organization-events-span-ops", ), re_path( - r"^(?P[^\/]+)/events-spans/$", + r"^(?P[^\/]+)/events-spans/$", OrganizationEventsSpansExamplesEndpoint.as_view(), name="sentry-api-0-organization-events-spans", ), re_path( - r"^(?P[^\/]+)/events-spans-performance/$", + r"^(?P[^\/]+)/events-spans-performance/$", OrganizationEventsSpansPerformanceEndpoint.as_view(), name="sentry-api-0-organization-events-spans-performance", ), re_path( - r"^(?P[^\/]+)/events-spans-stats/$", + r"^(?P[^\/]+)/events-spans-stats/$", OrganizationEventsSpansStatsEndpoint.as_view(), name="sentry-api-0-organization-events-spans-stats", ), re_path( - r"^(?P[^\/]+)/events-root-cause-analysis/$", + r"^(?P[^\/]+)/events-root-cause-analysis/$", OrganizationEventsRootCauseAnalysisEndpoint.as_view(), name="sentry-api-0-organization-events-root-cause-analysis", ), re_path( - r"^(?P[^\/]+)/events-meta/$", + r"^(?P[^\/]+)/events-meta/$", OrganizationEventsMetaEndpoint.as_view(), name="sentry-api-0-organization-events-meta", ), re_path( - r"^(?P[^\/]+)/spans-samples/$", + r"^(?P[^\/]+)/spans-samples/$", OrganizationSpansSamplesEndpoint.as_view(), name="sentry-api-0-organization-spans-samples", ), re_path( - r"^(?P[^\/]+)/metrics-compatibility/$", + r"^(?P[^\/]+)/metrics-compatibility/$", OrganizationMetricsCompatibility.as_view(), name="sentry-api-0-organization-metrics-compatibility", ), re_path( - r"^(?P[^\/]+)/metrics-compatibility-sums/$", + r"^(?P[^\/]+)/metrics-compatibility-sums/$", OrganizationMetricsCompatibilitySums.as_view(), name="sentry-api-0-organization-metrics-compatibility-sums", ), re_path( - r"^(?P[^\/]+)/missing-members/$", + r"^(?P[^\/]+)/missing-members/$", OrganizationMissingMembersEndpoint.as_view(), name="sentry-api-0-organization-missing-members", ), re_path( - r"^(?P[^\/]+)/events-histogram/$", + r"^(?P[^\/]+)/events-histogram/$", OrganizationEventsHistogramEndpoint.as_view(), name="sentry-api-0-organization-events-histogram", ), re_path( - r"^(?P[^\/]+)/events-spans-histogram/$", + r"^(?P[^\/]+)/events-spans-histogram/$", OrganizationEventsSpansHistogramEndpoint.as_view(), name="sentry-api-0-organization-events-spans-histogram", ), re_path( - r"^(?P[^\/]+)/events-trends/$", + r"^(?P[^\/]+)/events-trends/$", OrganizationEventsTrendsEndpoint.as_view(), name="sentry-api-0-organization-events-trends", ), re_path( - r"^(?P[^\/]+)/events-vitals/$", + r"^(?P[^\/]+)/events-vitals/$", OrganizationEventsVitalsEndpoint.as_view(), name="sentry-api-0-organization-events-vitals", ), re_path( - r"^(?P[^\/]+)/events-has-measurements/$", + r"^(?P[^\/]+)/events-has-measurements/$", OrganizationEventsHasMeasurementsEndpoint.as_view(), name="sentry-api-0-organization-events-has-measurements", ), re_path( - r"^(?P[^\/]+)/events-trends-stats/$", + r"^(?P[^\/]+)/events-trends-stats/$", OrganizationEventsTrendsStatsEndpoint.as_view(), name="sentry-api-0-organization-events-trends-stats", ), re_path( - r"^(?P[^\/]+)/spans-aggregation/$", + r"^(?P[^\/]+)/spans-aggregation/$", OrganizationSpansAggregationEndpoint.as_view(), name="sentry-api-0-organization-spans-aggregation", ), # This endpoint is for experimentation only # Once this feature is developed, the endpoint will replace /events-trends-stats re_path( - r"^(?P[^\/]+)/events-trends-statsv2/$", + r"^(?P[^\/]+)/events-trends-statsv2/$", OrganizationEventsNewTrendsStatsEndpoint.as_view(), name="sentry-api-0-organization-events-trends-statsv2", ), re_path( - r"^(?P[^\/]+)/events-trace-light/(?P(?:\d+|[A-Fa-f0-9-]{32,36}))/$", + r"^(?P[^\/]+)/events-trace-light/(?P(?:\d+|[A-Fa-f0-9-]{32,36}))/$", OrganizationEventsTraceLightEndpoint.as_view(), name="sentry-api-0-organization-events-trace-light", ), re_path( - r"^(?P[^\/]+)/events-trace/(?P(?:\d+|[A-Fa-f0-9-]{32,36}))/$", + r"^(?P[^\/]+)/events-trace/(?P(?:\d+|[A-Fa-f0-9-]{32,36}))/$", OrganizationEventsTraceEndpoint.as_view(), name="sentry-api-0-organization-events-trace", ), re_path( - r"^(?P[^\/]+)/events-trace-meta/(?P(?:\d+|[A-Fa-f0-9-]{32,36}))/$", + r"^(?P[^\/]+)/events-trace-meta/(?P(?:\d+|[A-Fa-f0-9-]{32,36}))/$", OrganizationEventsTraceMetaEndpoint.as_view(), name="sentry-api-0-organization-events-trace-meta", ), re_path( - r"^(?P[^\/]+)/measurements-meta/$", + r"^(?P[^\/]+)/measurements-meta/$", OrganizationMeasurementsMeta.as_view(), name="sentry-api-0-organization-measurements-meta", ), re_path( - r"^(?P[^\/]+)/issues/$", + r"^(?P[^\/]+)/issues/$", OrganizationGroupIndexEndpoint.as_view(), name="sentry-api-0-organization-group-index", ), re_path( - r"^(?P[^\/]+)/issues-count/$", + r"^(?P[^\/]+)/issues-count/$", OrganizationIssuesCountEndpoint.as_view(), name="sentry-api-0-organization-issues-count", ), re_path( - r"^(?P[^\/]+)/issues-stats/$", + r"^(?P[^\/]+)/issues-stats/$", OrganizationGroupIndexStatsEndpoint.as_view(), name="sentry-api-0-organization-group-index-stats", ), @@ -1571,7 +1571,7 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-organization-integrations", ), re_path( - r"^(?P[^\/]+)/integrations/(?P[^\/]+)/$", + r"^(?P[^\/]+)/integrations/(?P[^\/]+)/$", OrganizationIntegrationDetailsEndpoint.as_view(), name="sentry-api-0-organization-integration-details", ), @@ -1601,7 +1601,7 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-organization-member-index", ), re_path( - r"^(?P[^\/]+)/external-users/$", + r"^(?P[^\/]+)/external-users/$", ExternalUserEndpoint.as_view(), name="sentry-api-0-organization-external-user", ), @@ -1611,12 +1611,12 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-organization-external-user-details", ), re_path( - r"^(?P[^\/]+)/integration-requests/$", + r"^(?P[^\/]+)/integration-requests/$", OrganizationIntegrationRequestEndpoint.as_view(), name="sentry-api-0-organization-integration-request", ), re_path( - r"^(?P[^\/]+)/invite-requests/$", + r"^(?P[^\/]+)/invite-requests/$", OrganizationInviteRequestIndexEndpoint.as_view(), name="sentry-api-0-organization-invite-request-index", ), @@ -1694,12 +1694,12 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: ), # Pinned and saved search re_path( - r"^(?P[^\/]+)/pinned-searches/$", + r"^(?P[^\/]+)/pinned-searches/$", OrganizationPinnedSearchEndpoint.as_view(), name="sentry-api-0-organization-pinned-searches", ), re_path( - r"^(?P[^\/]+)/recent-searches/$", + r"^(?P[^\/]+)/recent-searches/$", OrganizationRecentSearchesEndpoint.as_view(), name="sentry-api-0-organization-recent-searches", ), @@ -1709,7 +1709,7 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-organization-search-details", ), re_path( - r"^(?P[^\/]+)/searches/$", + r"^(?P[^\/]+)/searches/$", OrganizationSearchesEndpoint.as_view(), name="sentry-api-0-organization-searches", ), @@ -1719,7 +1719,7 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-organization-sessions", ), re_path( - r"^(?P[^\/]+)/releases/(?P[^/]+)/resolved/$", + r"^(?P[^\/]+)/releases/(?P[^/]+)/resolved/$", OrganizationIssuesResolvedInReleaseEndpoint.as_view(), name="sentry-api-0-organization-release-resolved", ), @@ -1739,12 +1739,12 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-organization-member-team-details", ), re_path( - r"^(?P[^\/]+)/onboarding-continuation-email/$", + r"^(?P[^\/]+)/onboarding-continuation-email/$", OrganizationOnboardingContinuationEmail.as_view(), name="sentry-api-0-organization-onboarding-continuation-email", ), re_path( - r"^(?P[^\/]+)/processingissues/$", + r"^(?P[^\/]+)/processingissues/$", OrganizationProcessingIssuesEndpoint.as_view(), name="sentry-api-0-organization-processing-issues", ), @@ -1754,22 +1754,22 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-organization-projects", ), re_path( - r"^(?P[^\/]+)/minimal-projects/$", + r"^(?P[^\/]+)/minimal-projects/$", OrganizationMinimalProjectsEndpoint.as_view(), name="sentry-api-0-organization-minimal-projects", ), re_path( - r"^(?P[^\/]+)/experimental/projects/$", + r"^(?P[^\/]+)/experimental/projects/$", OrganizationProjectsExperimentEndpoint.as_view(), name="sentry-api-0-organization-projects-experiment", ), re_path( - r"^(?P[^\/]+)/projects-count/$", + r"^(?P[^\/]+)/projects-count/$", OrganizationProjectsCountEndpoint.as_view(), name="sentry-api-0-organization-projects-count", ), re_path( - r"^(?P[^\/]+)/sent-first-event/$", + r"^(?P[^\/]+)/sent-first-event/$", OrganizationProjectsSentFirstEventEndpoint.as_view(), name="sentry-api-0-organization-sent-first-event", ), @@ -1789,12 +1789,12 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-organization-repository-commits", ), re_path( - r"^(?P[^\/]+)/plugins/$", + r"^(?P[^\/]+)/plugins/$", OrganizationPluginsEndpoint.as_view(), name="sentry-api-0-organization-plugins", ), re_path( - r"^(?P[^\/]+)/plugins/configs/$", + r"^(?P[^\/]+)/plugins/configs/$", OrganizationPluginsConfigsEndpoint.as_view(), name="sentry-api-0-organization-plugins-configs", ), @@ -1865,22 +1865,22 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-organization-release-previous-with-commits", ), re_path( - r"^(?P[^\/]+)/user-feedback/$", + r"^(?P[^\/]+)/user-feedback/$", OrganizationUserReportsEndpoint.as_view(), name="sentry-api-0-organization-user-feedback", ), re_path( - r"^(?P[^\/]+)/user-teams/$", + r"^(?P[^\/]+)/user-teams/$", OrganizationUserTeamsEndpoint.as_view(), name="sentry-api-0-organization-user-teams", ), re_path( - r"^(?P[^\/]+)/users/$", + r"^(?P[^\/]+)/users/$", OrganizationUsersEndpoint.as_view(), name="sentry-api-0-organization-users", ), re_path( - r"^(?P[^\/]+)/users/(?P[^\/]+)/$", + r"^(?P[^\/]+)/users/(?P[^\/]+)/$", OrganizationUserDetailsEndpoint.as_view(), name="sentry-api-0-organization-user-details", ), @@ -1890,27 +1890,27 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-sentry-app-installations", ), re_path( - r"^(?P[^\/]+)/sentry-apps/$", + r"^(?P[^\/]+)/sentry-apps/$", OrganizationSentryAppsEndpoint.as_view(), name="sentry-api-0-organization-sentry-apps", ), re_path( - r"^(?P[^\/]+)/sentry-app-components/$", + r"^(?P[^\/]+)/sentry-app-components/$", OrganizationSentryAppComponentsEndpoint.as_view(), name="sentry-api-0-organization-sentry-app-components", ), re_path( - r"^(?P[^\/]+)/org-auth-tokens/$", + r"^(?P[^\/]+)/org-auth-tokens/$", OrgAuthTokensEndpoint.as_view(), name="sentry-api-0-org-auth-tokens", ), re_path( - r"^(?P[^\/]+)/org-auth-tokens/(?P[^\/]+)/$", + r"^(?P[^\/]+)/org-auth-tokens/(?P[^\/]+)/$", OrgAuthTokenDetailsEndpoint.as_view(), name="sentry-api-0-org-auth-token-details", ), re_path( - r"^(?P[^\/]+)/stats/$", + r"^(?P[^\/]+)/stats/$", OrganizationStatsEndpoint.as_view(), name="sentry-api-0-organization-stats", ), @@ -1930,37 +1930,37 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-organization-teams", ), re_path( - r"^(?P[^\/]+)/tags/$", + r"^(?P[^\/]+)/tags/$", OrganizationTagsEndpoint.as_view(), name="sentry-api-0-organization-tags", ), re_path( - r"^(?P[^\/]+)/tags/(?P[^/]+)/values/$", + r"^(?P[^\/]+)/tags/(?P[^/]+)/values/$", OrganizationTagKeyValuesEndpoint.as_view(), name="sentry-api-0-organization-tagkey-values", ), re_path( - r"^(?P[^\/]+)/onboarding-tasks/$", + r"^(?P[^\/]+)/onboarding-tasks/$", OrganizationOnboardingTaskEndpoint.as_view(), name="sentry-api-0-organization-onboardingtasks", ), re_path( - r"^(?P[^\/]+)/environments/$", + r"^(?P[^\/]+)/environments/$", OrganizationEnvironmentsEndpoint.as_view(), name="sentry-api-0-organization-environments", ), re_path( - r"^(?P[^\/]+)/broadcasts/$", + r"^(?P[^\/]+)/broadcasts/$", BroadcastIndexEndpoint.as_view(), name="sentry-api-0-organization-broadcasts", ), re_path( - r"^(?P[^\/]+)/join-request/$", + r"^(?P[^\/]+)/join-request/$", OrganizationJoinRequestEndpoint.as_view(), name="sentry-api-0-organization-join-request", ), re_path( - r"^(?P[^\/]+)/transaction-anomaly-detection/$", + r"^(?P[^\/]+)/transaction-anomaly-detection/$", OrganizationTransactionAnomalyDetectionEndpoint.as_view(), name="sentry-api-0-organization-transaction-anomaly-detection", ), @@ -2033,47 +2033,47 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: ), ), re_path( - r"^(?P[^/]+)/metrics/code-locations/$", + r"^(?P[^/]+)/metrics/code-locations/$", OrganizationMetricsCodeLocationsEndpoint.as_view(), name="sentry-api-0-organization-metrics-code-locations", ), re_path( - r"^(?P[^/]+)/metrics/meta/$", + r"^(?P[^/]+)/metrics/meta/$", OrganizationMetricsDetailsEndpoint.as_view(), name="sentry-api-0-organization-metrics-details", ), re_path( - r"^(?P[^/]+)/metrics/meta/(?P[^/]+)/$", + r"^(?P[^/]+)/metrics/meta/(?P[^/]+)/$", OrganizationMetricDetailsEndpoint.as_view(), name="sentry-api-0-organization-metric-details", ), re_path( - r"^(?P[^/]+)/metrics/data/$", + r"^(?P[^/]+)/metrics/data/$", OrganizationMetricsDataEndpoint.as_view(), name="sentry-api-0-organization-metrics-data", ), re_path( - r"^(?P[^/]+)/metrics/query/$", + r"^(?P[^/]+)/metrics/query/$", OrganizationMetricsQueryEndpoint.as_view(), name="sentry-api-0-organization-metrics-query", ), re_path( - r"^(?P[^/]+)/metrics/samples/$", + r"^(?P[^/]+)/metrics/samples/$", OrganizationMetricsSamplesEndpoint.as_view(), name="sentry-api-0-organization-metrics-samples", ), re_path( - r"^(?P[^/]+)/metrics/tags/$", + r"^(?P[^/]+)/metrics/tags/$", OrganizationMetricsTagsEndpoint.as_view(), name="sentry-api-0-organization-metrics-tags", ), re_path( - r"^(?P[^/]+)/metrics/tags/(?P[^/]+)/$", + r"^(?P[^/]+)/metrics/tags/(?P[^/]+)/$", OrganizationMetricsTagDetailsEndpoint.as_view(), name="sentry-api-0-organization-metrics-tag-details", ), re_path( - r"^(?P[^/]+)/profiling/", + r"^(?P[^/]+)/profiling/", include( [ re_path( @@ -2095,7 +2095,7 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: ), ), re_path( - r"^(?P[^/]+)/dynamic-sampling/", + r"^(?P[^/]+)/dynamic-sampling/", include( [ re_path( @@ -2108,13 +2108,13 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: ), # Symbolicator Builtin Sources re_path( - r"^(?P[^/]+)/builtin-symbol-sources/$", + r"^(?P[^/]+)/builtin-symbol-sources/$", BuiltinSymbolSourcesEndpoint.as_view(), name="sentry-api-0-organization-builtin-symbol-sources", ), # Grouping configs re_path( - r"^(?P[^/]+)/grouping-configs/$", + r"^(?P[^/]+)/grouping-configs/$", GroupingConfigsEndpoint.as_view(), name="sentry-api-0-organization-grouping-configs", ), @@ -2130,7 +2130,7 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-organization-unsubscribe-issue", ), re_path( - r"^(?P[^/]+)/prompts-activity/$", + r"^(?P[^/]+)/prompts-activity/$", PromptsActivityEndpoint.as_view(), name="sentry-api-0-organization-prompts-activity", ), @@ -2148,7 +2148,7 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-projects", ), re_path( - r"^(?P[^\/]+)/rule-conditions/$", + r"^(?P[^\/]+)/rule-conditions/$", ProjectAgnosticRuleConditionsEndpoint.as_view(), name="sentry-api-0-project-agnostic-rule-conditions", ), @@ -2158,47 +2158,47 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-project-details", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/alert-rules/(?P[^\/]+)/$", + r"^(?P[^\/]+)/(?P[^\/]+)/alert-rules/(?P[^\/]+)/$", ProjectAlertRuleDetailsEndpoint.as_view(), name="sentry-api-0-project-alert-rule-details", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/alert-rules/$", + r"^(?P[^\/]+)/(?P[^\/]+)/alert-rules/$", ProjectAlertRuleIndexEndpoint.as_view(), name="sentry-api-0-project-alert-rules", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/alert-rule-task/(?P[^\/]+)/$", + r"^(?P[^\/]+)/(?P[^\/]+)/alert-rule-task/(?P[^\/]+)/$", ProjectAlertRuleTaskDetailsEndpoint.as_view(), name="sentry-api-0-project-alert-rule-task-details", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/create-sample/$", + r"^(?P[^\/]+)/(?P[^\/]+)/create-sample/$", ProjectCreateSampleEndpoint.as_view(), name="sentry-api-0-project-create-sample", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/create-sample-transaction/$", + r"^(?P[^\/]+)/(?P[^\/]+)/create-sample-transaction/$", ProjectCreateSampleTransactionEndpoint.as_view(), name="sentry-api-0-project-create-sample-transaction", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/docs/(?P[\w-]+)/$", + r"^(?P[^\/]+)/(?P[^\/]+)/docs/(?P[\w-]+)/$", ProjectDocsPlatformEndpoint.as_view(), name="sentry-api-0-project-docs-platform", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/environments/$", + r"^(?P[^\/]+)/(?P[^\/]+)/environments/$", ProjectEnvironmentsEndpoint.as_view(), name="sentry-api-0-project-environments", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/environments/(?P[^/]+)/$", + r"^(?P[^\/]+)/(?P[^\/]+)/environments/(?P[^/]+)/$", ProjectEnvironmentDetailsEndpoint.as_view(), name="sentry-api-0-project-environment-details", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/platforms/$", + r"^(?P[^\/]+)/(?P[^\/]+)/platforms/$", ProjectPlatformsEndpoint.as_view(), name="sentry-api-0-project-platform-details", ), @@ -2218,32 +2218,32 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-event-grouping-info", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/events/(?P[\w-]+)/ai-fix-suggest/$", + r"^(?P[^\/]+)/(?P[^\/]+)/events/(?P[\w-]+)/ai-fix-suggest/$", EventAiSuggestedFixEndpoint.as_view(), name="sentry-api-0-event-ai-fix-suggest", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/events/(?P[\w-]+)/apple-crash-report$", + r"^(?P[^\/]+)/(?P[^\/]+)/events/(?P[\w-]+)/apple-crash-report$", EventAppleCrashReportEndpoint.as_view(), name="sentry-api-0-event-apple-crash-report", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/events/(?P[\w-]+)/attachments/$", + r"^(?P[^\/]+)/(?P[^\/]+)/events/(?P[\w-]+)/attachments/$", EventAttachmentsEndpoint.as_view(), name="sentry-api-0-event-attachments", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/events/(?P[\w-]+)/reprocessable/$", + r"^(?P[^\/]+)/(?P[^\/]+)/events/(?P[\w-]+)/reprocessable/$", EventReprocessableEndpoint.as_view(), name="sentry-api-0-event-attachments", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/events/(?P[\w-]+)/attachments/(?P[\w-]+)/$", + r"^(?P[^\/]+)/(?P[^\/]+)/events/(?P[\w-]+)/attachments/(?P[\w-]+)/$", EventAttachmentDetailsEndpoint.as_view(), name="sentry-api-0-event-attachment-details", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/events/(?P[\w-]+)/committers/$", + r"^(?P[^\/]+)/(?P[^\/]+)/events/(?P[\w-]+)/committers/$", EventFileCommittersEndpoint.as_view(), name="sentry-api-0-event-file-committers", ), @@ -2253,7 +2253,7 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-event-json", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/events/(?P[\w-]+)/owners/$", + r"^(?P[^\/]+)/(?P[^\/]+)/events/(?P[\w-]+)/owners/$", EventOwnersEndpoint.as_view(), name="sentry-api-0-event-owners", ), @@ -2268,7 +2268,7 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-event-source-map-debug-blue-thunder-edition", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/events/(?P[\w-]+)/actionable-items/$", + r"^(?P[^\/]+)/(?P[^\/]+)/events/(?P[\w-]+)/actionable-items/$", ActionableItemsEndpoint.as_view(), name="sentry-api-0-event-actionable-items", ), @@ -2283,22 +2283,22 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-source-maps", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/files/artifact-bundles/$", + r"^(?P[^\/]+)/(?P[^\/]+)/files/artifact-bundles/$", ArtifactBundlesEndpoint.as_view(), name="sentry-api-0-artifact-bundles", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/files/proguard-artifact-releases", + r"^(?P[^\/]+)/(?P[^\/]+)/files/proguard-artifact-releases", ProguardArtifactReleasesEndpoint.as_view(), name="sentry-api-0-proguard-artifact-releases", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/files/difs/assemble/$", + r"^(?P[^\/]+)/(?P[^\/]+)/files/difs/assemble/$", DifAssembleEndpoint.as_view(), name="sentry-api-0-assemble-dif-files", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/files/dsyms/unknown/$", + r"^(?P[^\/]+)/(?P[^\/]+)/files/dsyms/unknown/$", UnknownDebugFilesEndpoint.as_view(), name="sentry-api-0-unknown-dsym-files", ), @@ -2308,7 +2308,7 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-associate-dsym-files", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/filters/$", + r"^(?P[^\/]+)/(?P[^\/]+)/filters/$", ProjectFiltersEndpoint.as_view(), name="sentry-api-0-project-filters", ), @@ -2332,12 +2332,12 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: ProjectServiceHookStatsEndpoint.as_view(), ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/(?:issues|groups)/$", + r"^(?P[^\/]+)/(?P[^\/]+)/(?:issues|groups)/$", ProjectGroupIndexEndpoint.as_view(), name="sentry-api-0-project-group-index", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/(?:issues|groups)/stats/$", + r"^(?P[^\/]+)/(?P[^\/]+)/(?:issues|groups)/stats/$", ProjectGroupStatsEndpoint.as_view(), name="sentry-api-0-project-group-stats", ), @@ -2352,21 +2352,21 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-project-key-details", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/keys/(?P[^\/]+)/stats/$", + r"^(?P[^\/]+)/(?P[^\/]+)/keys/(?P[^\/]+)/stats/$", ProjectKeyStatsEndpoint.as_view(), ), re_path( - r"^(?P[^/]+)/(?P[^/]+)/members/$", + r"^(?P[^/]+)/(?P[^/]+)/members/$", ProjectMemberIndexEndpoint.as_view(), name="sentry-api-0-project-member-index", ), re_path( - r"^(?P[^/]+)/(?P[^/]+)/metrics/visibility/$", + r"^(?P[^/]+)/(?P[^/]+)/metrics/visibility/$", ProjectMetricsVisibilityEndpoint.as_view(), name="sentry-api-0-project-metrics-visibility", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/releases/$", + r"^(?P[^\/]+)/(?P[^\/]+)/releases/$", ProjectReleasesEndpoint.as_view(), name="sentry-api-0-project-releases", ), @@ -2381,22 +2381,22 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-project-release-thresholds-details", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/commits/$", + r"^(?P[^\/]+)/(?P[^\/]+)/commits/$", ProjectCommitsEndpoint.as_view(), name="sentry-api-0-project-commits", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/releases/token/$", + r"^(?P[^\/]+)/(?P[^\/]+)/releases/token/$", ProjectReleasesTokenEndpoint.as_view(), name="sentry-api-0-project-releases-token", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/releases/completion/$", + r"^(?P[^\/]+)/(?P[^\/]+)/releases/completion/$", ProjectReleaseSetupCompletionEndpoint.as_view(), name="sentry-api-0-project-releases-completion-status", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/releases/(?P[^/]+)/$", + r"^(?P[^\/]+)/(?P[^\/]+)/releases/(?P[^/]+)/$", ProjectReleaseDetailsEndpoint.as_view(), name="sentry-api-0-project-release-details", ), @@ -2406,27 +2406,27 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-project-release-commits", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/releases/(?P[^/]+)/repositories/$", + r"^(?P[^\/]+)/(?P[^\/]+)/releases/(?P[^/]+)/repositories/$", ProjectReleaseRepositories.as_view(), name="sentry-api-0-project-release-repositories", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/releases/(?P[^/]+)/resolved/$", + r"^(?P[^\/]+)/(?P[^\/]+)/releases/(?P[^/]+)/resolved/$", ProjectIssuesResolvedInReleaseEndpoint.as_view(), name="sentry-api-0-project-release-resolved", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/releases/(?P[^/]+)/stats/$", + r"^(?P[^\/]+)/(?P[^\/]+)/releases/(?P[^/]+)/stats/$", ProjectReleaseStatsEndpoint.as_view(), name="sentry-api-0-project-release-stats", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/artifact-bundles/(?P[^/]+)/files/$", + r"^(?P[^\/]+)/(?P[^\/]+)/artifact-bundles/(?P[^/]+)/files/$", ProjectArtifactBundleFilesEndpoint.as_view(), name="sentry-api-0-project-artifact-bundle-files", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/artifact-bundles/(?P[^/]+)/files/(?P[^/]+)/$", + r"^(?P[^\/]+)/(?P[^\/]+)/artifact-bundles/(?P[^/]+)/files/(?P[^/]+)/$", ProjectArtifactBundleFileDetailsEndpoint.as_view(), name="sentry-api-0-project-artifact-bundle-file-details", ), @@ -2486,7 +2486,7 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-project-replay-video-details", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/rules/configuration/$", + r"^(?P[^\/]+)/(?P[^\/]+)/rules/configuration/$", ProjectRulesConfigurationEndpoint.as_view(), name="sentry-api-0-project-rules-configuration", ), @@ -2496,27 +2496,27 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-project-rule-details", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/rules/(?P[^\/]+)/enable/$", + r"^(?P[^\/]+)/(?P[^\/]+)/rules/(?P[^\/]+)/enable/$", ProjectRuleEnableEndpoint.as_view(), name="sentry-api-0-project-rule-enable", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/rules/(?P[^\/]+)/snooze/$", + r"^(?P[^\/]+)/(?P[^\/]+)/rules/(?P[^\/]+)/snooze/$", RuleSnoozeEndpoint.as_view(), name="sentry-api-0-rule-snooze", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/alert-rules/(?P[^\/]+)/snooze/$", + r"^(?P[^\/]+)/(?P[^\/]+)/alert-rules/(?P[^\/]+)/snooze/$", MetricRuleSnoozeEndpoint.as_view(), name="sentry-api-0-metric-rule-snooze", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/rules/preview/$", + r"^(?P[^\/]+)/(?P[^\/]+)/rules/preview/$", ProjectRulePreviewEndpoint.as_view(), name="sentry-api-0-project-rule-preview", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/rule-actions/$", + r"^(?P[^\/]+)/(?P[^\/]+)/rule-actions/$", ProjectRuleActionsEndpoint.as_view(), name="sentry-api-0-project-rule-actions", ), @@ -2561,7 +2561,7 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-project-tagkey-values", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/teams/$", + r"^(?P[^\/]+)/(?P[^\/]+)/teams/$", ProjectTeamsEndpoint.as_view(), name="sentry-api-0-project-teams", ), @@ -2571,7 +2571,7 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-project-team-details", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/transfer/$", + r"^(?P[^\/]+)/(?P[^\/]+)/transfer/$", ProjectTransferEndpoint.as_view(), name="sentry-api-0-project-transfer", ), @@ -2581,27 +2581,27 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-project-users", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/(?:user-feedback|user-reports)/$", + r"^(?P[^\/]+)/(?P[^\/]+)/(?:user-feedback|user-reports)/$", ProjectUserReportsEndpoint.as_view(), name="sentry-api-0-project-user-reports", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/user-stats/$", + r"^(?P[^\/]+)/(?P[^\/]+)/user-stats/$", ProjectUserStatsEndpoint.as_view(), name="sentry-api-0-project-userstats", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/processingissues/$", + r"^(?P[^\/]+)/(?P[^\/]+)/processingissues/$", ProjectProcessingIssuesEndpoint.as_view(), name="sentry-api-0-project-processing-issues", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/reprocessing/$", + r"^(?P[^\/]+)/(?P[^\/]+)/reprocessing/$", ProjectReprocessingEndpoint.as_view(), name="sentry-api-0-project-reprocessing", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/processingissues/discard/$", + r"^(?P[^\/]+)/(?P[^\/]+)/processingissues/discard/$", ProjectProcessingIssuesDiscardEndpoint.as_view(), name="sentry-api-0-project-discard-processing-issues", ), @@ -2611,7 +2611,7 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-project-ownership", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/codeowners/$", + r"^(?P[^\/]+)/(?P[^\/]+)/codeowners/$", ProjectCodeOwnersEndpoint.as_view(), name="sentry-api-0-project-codeowners", ), @@ -2621,124 +2621,124 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-project-codeowners-details", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/transaction-threshold/configure/$", + r"^(?P[^\/]+)/(?P[^\/]+)/transaction-threshold/configure/$", ProjectTransactionThresholdEndpoint.as_view(), name="sentry-api-0-project-transaction-threshold", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/performance-issues/configure/$", + r"^(?P[^\/]+)/(?P[^\/]+)/performance-issues/configure/$", ProjectPerformanceIssueSettingsEndpoint.as_view(), name="sentry-api-0-project-performance-issue-settings", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/performance/configure/$", + r"^(?P[^\/]+)/(?P[^\/]+)/performance/configure/$", ProjectPerformanceGeneralSettingsEndpoint.as_view(), name="sentry-api-0-project-performance-general-settings", ), # Load plugin project urls re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/plugins/$", + r"^(?P[^\/]+)/(?P[^\/]+)/plugins/$", ProjectPluginsEndpoint.as_view(), name="sentry-api-0-project-plugins", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/plugins/(?P[^\/]+)/$", + r"^(?P[^\/]+)/(?P[^\/]+)/plugins/(?P[^\/]+)/$", ProjectPluginDetailsEndpoint.as_view(), name="sentry-api-0-project-plugin-details", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/cluster-transaction-names/$", + r"^(?P[^\/]+)/(?P[^\/]+)/cluster-transaction-names/$", ProjectTransactionNamesCluster.as_view(), name="sentry-api-0-organization-project-cluster-transaction-names", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/plugins?/", + r"^(?P[^\/]+)/(?P[^\/]+)/plugins?/", include("sentry.plugins.base.project_api_urls"), ), # Tombstone re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/tombstones/$", + r"^(?P[^\/]+)/(?P[^\/]+)/tombstones/$", GroupTombstoneEndpoint.as_view(), name="sentry-api-0-group-tombstones", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/tombstones/(?P\d+)/$", + r"^(?P[^\/]+)/(?P[^\/]+)/tombstones/(?P\d+)/$", GroupTombstoneDetailsEndpoint.as_view(), name="sentry-api-0-group-tombstone-details", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/stacktrace-coverage/$", + r"^(?P[^\/]+)/(?P[^\/]+)/stacktrace-coverage/$", ProjectStacktraceCoverageEndpoint.as_view(), name="sentry-api-0-project-stacktrace-coverage", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/stacktrace-link/$", + r"^(?P[^\/]+)/(?P[^\/]+)/stacktrace-link/$", ProjectStacktraceLinkEndpoint.as_view(), name="sentry-api-0-project-stacktrace-link", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/repo-path-parsing/$", + r"^(?P[^\/]+)/(?P[^\/]+)/repo-path-parsing/$", ProjectRepoPathParsingEndpoint.as_view(), name="sentry-api-0-project-repo-path-parsing", ), # Grouping configs re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/grouping-configs/$", + r"^(?P[^\/]+)/(?P[^\/]+)/grouping-configs/$", ProjectGroupingConfigsEndpoint.as_view(), name="sentry-api-0-project-grouping-configs", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/appstoreconnect/$", + r"^(?P[^\/]+)/(?P[^\/]+)/appstoreconnect/$", AppStoreConnectCreateCredentialsEndpoint.as_view(), name="sentry-api-0-project-appstoreconnect-credentials-create", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/appstoreconnect/apps/$", + r"^(?P[^\/]+)/(?P[^\/]+)/appstoreconnect/apps/$", AppStoreConnectAppsEndpoint.as_view(), name="sentry-api-0-project-appstoreconnect-apps", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/appstoreconnect/status/$", + r"^(?P[^\/]+)/(?P[^\/]+)/appstoreconnect/status/$", AppStoreConnectStatusEndpoint.as_view(), name="sentry-api-0-project-appstoreconnect-status", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/appstoreconnect/(?P[^\/]+)/$", + r"^(?P[^\/]+)/(?P[^\/]+)/appstoreconnect/(?P[^\/]+)/$", AppStoreConnectUpdateCredentialsEndpoint.as_view(), name="sentry-api-0-project-appstoreconnect-credentials-update", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/appstoreconnect/(?P[^\/]+)/refresh/$", + r"^(?P[^\/]+)/(?P[^\/]+)/appstoreconnect/(?P[^\/]+)/refresh/$", AppStoreConnectRefreshEndpoint.as_view(), name="sentry-api-0-project-appstoreconnect-refresh", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/profiling/functions/$", + r"^(?P[^\/]+)/(?P[^\/]+)/profiling/functions/$", ProjectProfilingFunctionsEndpoint.as_view(), name="sentry-api-0-project-profiling-functions", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/profiling/profiles/(?P(?:\d+|[A-Fa-f0-9-]{32,36}))/$", + r"^(?P[^\/]+)/(?P[^\/]+)/profiling/profiles/(?P(?:\d+|[A-Fa-f0-9-]{32,36}))/$", ProjectProfilingProfileEndpoint.as_view(), name="sentry-api-0-project-profiling-profile", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/profiling/raw_profiles/(?P(?:\d+|[A-Fa-f0-9-]{32,36}))/$", + r"^(?P[^\/]+)/(?P[^\/]+)/profiling/raw_profiles/(?P(?:\d+|[A-Fa-f0-9-]{32,36}))/$", ProjectProfilingRawProfileEndpoint.as_view(), name="sentry-api-0-project-profiling-raw-profile", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/profiling/flamegraph/$", + r"^(?P[^\/]+)/(?P[^\/]+)/profiling/flamegraph/$", ProjectProfilingFlamegraphEndpoint.as_view(), name="sentry-api-0-project-profiling-flamegraph", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/profiling/transactions/(?P(?:\d+|[A-Fa-f0-9-]{32,36}))/$", + r"^(?P[^\/]+)/(?P[^\/]+)/profiling/transactions/(?P(?:\d+|[A-Fa-f0-9-]{32,36}))/$", ProjectProfilingTransactionIDProfileIDEndpoint.as_view(), name="sentry-api-0-project-profiling-transactions", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/statistical-detector/$", + r"^(?P[^\/]+)/(?P[^\/]+)/statistical-detector/$", ProjectStatisticalDetectors.as_view(), name="sentry-api-0-project-statistical-detector", ), @@ -2763,7 +2763,7 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-project-monitor-environment-details", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/processing-errors/(?P[^\/]+)/$", + r"^(?P[^\/]+)/(?P[^\/]+)/processing-errors/(?P[^\/]+)/$", ProjectProcessingErrorsDetailsEndpoint.as_view(), name="sentry-api-0-project-processing-errors-details", ), @@ -2778,12 +2778,12 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]: name="sentry-api-0-project-monitor-stats", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/autofix/codebase-index/status/$", + r"^(?P[^\/]+)/(?P[^\/]+)/autofix/codebase-index/status/$", ProjectAutofixCodebaseIndexStatusEndpoint.as_view(), name="sentry-api-0-project-autofix-codebase-index-status", ), re_path( - r"^(?P[^\/]+)/(?P[^\/]+)/autofix/codebase-index/create/$", + r"^(?P[^\/]+)/(?P[^\/]+)/autofix/codebase-index/create/$", ProjectAutofixCreateCodebaseIndexEndpoint.as_view(), name="sentry-api-0-project-autofix-codebase-index-create", ), diff --git a/tests/sentry/api/endpoints/test_artifact_bundles.py b/tests/sentry/api/endpoints/test_artifact_bundles.py index c93f9c8271a5a7..82ee01da715d69 100644 --- a/tests/sentry/api/endpoints/test_artifact_bundles.py +++ b/tests/sentry/api/endpoints/test_artifact_bundles.py @@ -77,7 +77,7 @@ def test_get_artifact_bundles_with_multiple_bundles(self): url = reverse( "sentry-api-0-artifact-bundles", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -219,7 +219,7 @@ def test_get_artifact_bundles_with_single_bundle_without_release_dist_pair(self) url = reverse( "sentry-api-0-artifact-bundles", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -281,7 +281,7 @@ def test_get_artifact_bundles_with_multiple_release_dist_pairs_to_same_bundle(se url = reverse( "sentry-api-0-artifact-bundles", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -357,7 +357,7 @@ def test_get_artifact_bundles_with_no_bundles(self): url = reverse( "sentry-api-0-artifact-bundles", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -386,7 +386,7 @@ def test_get_artifact_bundles_pagination(self): url = reverse( "sentry-api-0-artifact-bundles", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -416,7 +416,7 @@ def test_get_artifact_bundles_sorting(self): url = reverse( "sentry-api-0-artifact-bundles", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -473,7 +473,7 @@ def test_delete_artifact_bundle_with_single_project_connected(self): url = reverse( "sentry-api-0-artifact-bundles", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -528,7 +528,7 @@ def test_delete_artifact_bundle_with_multiple_projects_connected(self): url = reverse( "sentry-api-0-artifact-bundles", kwargs={ - "organization_slug": project_a.organization.slug, + "organization_id_or_slug": project_a.organization.slug, "project_id_or_slug": project_a.slug, }, ) @@ -584,7 +584,7 @@ def test_delete_artifact_bundles_with_same_bundle_id_and_connected_to_the_same_p url = reverse( "sentry-api-0-artifact-bundles", kwargs={ - "organization_slug": project_a.organization.slug, + "organization_id_or_slug": project_a.organization.slug, "project_id_or_slug": project_a.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_event_ai_suggested_fix.py b/tests/sentry/api/endpoints/test_event_ai_suggested_fix.py index a32ae144acf36f..b1029c188a3fab 100644 --- a/tests/sentry/api/endpoints/test_event_ai_suggested_fix.py +++ b/tests/sentry/api/endpoints/test_event_ai_suggested_fix.py @@ -64,7 +64,7 @@ def setUp(self): self.path = reverse( "sentry-api-0-event-ai-fix-suggest", kwargs={ - "organization_slug": self.organization.slug, + "organization_id_or_slug": self.organization.slug, "project_id_or_slug": self.project.slug, "event_id": self.event.event_id, }, diff --git a/tests/sentry/api/endpoints/test_event_committers.py b/tests/sentry/api/endpoints/test_event_committers.py index da7e6a9b294b8d..f2a9b6fe7c15e7 100644 --- a/tests/sentry/api/endpoints/test_event_committers.py +++ b/tests/sentry/api/endpoints/test_event_committers.py @@ -38,7 +38,7 @@ def test_simple(self): kwargs={ "event_id": event.event_id, "project_id_or_slug": event.project.slug, - "organization_slug": event.project.organization.slug, + "organization_id_or_slug": event.project.organization.slug, }, ) @@ -68,7 +68,7 @@ def test_no_group(self): kwargs={ "event_id": event.event_id, "project_id_or_slug": event.project.slug, - "organization_slug": event.project.organization.slug, + "organization_id_or_slug": event.project.organization.slug, }, ) @@ -91,7 +91,7 @@ def test_no_release(self): kwargs={ "event_id": event.event_id, "project_id_or_slug": event.project.slug, - "organization_slug": event.project.organization.slug, + "organization_id_or_slug": event.project.organization.slug, }, ) @@ -134,7 +134,7 @@ def test_null_stacktrace(self): kwargs={ "event_id": event.event_id, "project_id_or_slug": event.project.slug, - "organization_slug": event.project.organization.slug, + "organization_id_or_slug": event.project.organization.slug, }, ) @@ -178,7 +178,7 @@ def test_with_commit_context(self): kwargs={ "event_id": event.event_id, "project_id_or_slug": event.project.slug, - "organization_slug": event.project.organization.slug, + "organization_id_or_slug": event.project.organization.slug, }, ) @@ -238,7 +238,7 @@ def test_with_commit_context_pull_request(self): kwargs={ "event_id": event.event_id, "project_id_or_slug": event.project.slug, - "organization_slug": event.project.organization.slug, + "organization_id_or_slug": event.project.organization.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_event_owners.py b/tests/sentry/api/endpoints/test_event_owners.py index b86a283e51f7c9..cec2ad9d1e5281 100644 --- a/tests/sentry/api/endpoints/test_event_owners.py +++ b/tests/sentry/api/endpoints/test_event_owners.py @@ -36,7 +36,7 @@ def test_no_rules(self): self.path = reverse( "sentry-api-0-event-owners", kwargs={ - "organization_slug": self.organization.slug, + "organization_id_or_slug": self.organization.slug, "project_id_or_slug": self.project.slug, "event_id": event1.event_id, }, @@ -62,7 +62,7 @@ def test_no_matching_owners(self): self.path = reverse( "sentry-api-0-event-owners", kwargs={ - "organization_slug": self.organization.slug, + "organization_id_or_slug": self.organization.slug, "project_id_or_slug": self.project.slug, "event_id": event1.event_id, }, @@ -88,7 +88,7 @@ def test_matching_non_existing_owner(self): self.path = reverse( "sentry-api-0-event-owners", kwargs={ - "organization_slug": self.organization.slug, + "organization_id_or_slug": self.organization.slug, "project_id_or_slug": self.project.slug, "event_id": event1.event_id, }, @@ -114,7 +114,7 @@ def test_one_owner(self): self.path = reverse( "sentry-api-0-event-owners", kwargs={ - "organization_slug": self.organization.slug, + "organization_id_or_slug": self.organization.slug, "project_id_or_slug": self.project.slug, "event_id": event1.event_id, }, @@ -146,7 +146,7 @@ def test_multiple_owners(self): self.path = reverse( "sentry-api-0-event-owners", kwargs={ - "organization_slug": self.organization.slug, + "organization_id_or_slug": self.organization.slug, "project_id_or_slug": self.project.slug, "event_id": event1.event_id, }, @@ -179,7 +179,7 @@ def test_multiple_owners_order_matters(self): self.path = reverse( "sentry-api-0-event-owners", kwargs={ - "organization_slug": self.organization.slug, + "organization_id_or_slug": self.organization.slug, "project_id_or_slug": self.project.slug, "event_id": event1.event_id, }, @@ -214,7 +214,7 @@ def test_owners_of_different_types_ordered_correctly(self): self.path = reverse( "sentry-api-0-event-owners", kwargs={ - "organization_slug": self.organization.slug, + "organization_id_or_slug": self.organization.slug, "project_id_or_slug": self.project.slug, "event_id": event1.event_id, }, diff --git a/tests/sentry/api/endpoints/test_group_tombstone.py b/tests/sentry/api/endpoints/test_group_tombstone.py index 7bdea7d502e13b..a1fc31108ecad8 100644 --- a/tests/sentry/api/endpoints/test_group_tombstone.py +++ b/tests/sentry/api/endpoints/test_group_tombstone.py @@ -27,7 +27,10 @@ def test_simple(self): path = reverse( "sentry-api-0-group-tombstones", - kwargs={"organization_slug": self.org.slug, "project_id_or_slug": self.project.slug}, + kwargs={ + "organization_id_or_slug": self.org.slug, + "project_id_or_slug": self.project.slug, + }, ) response = self.client.get(path) diff --git a/tests/sentry/api/endpoints/test_group_tombstone_details.py b/tests/sentry/api/endpoints/test_group_tombstone_details.py index 592645d2ef5b0e..e48ed07d57f126 100644 --- a/tests/sentry/api/endpoints/test_group_tombstone_details.py +++ b/tests/sentry/api/endpoints/test_group_tombstone_details.py @@ -29,7 +29,7 @@ def test_delete(self): path = reverse( "sentry-api-0-group-tombstone-details", kwargs={ - "organization_slug": self.org.slug, + "organization_id_or_slug": self.org.slug, "project_id_or_slug": self.project.slug, "tombstone_id": tombstone.id, }, @@ -67,7 +67,7 @@ def test_dont_delete_from_other_proj(self): path = reverse( "sentry-api-0-group-tombstone-details", kwargs={ - "organization_slug": self.org.slug, + "organization_id_or_slug": self.org.slug, "project_id_or_slug": self.other_project.slug, "tombstone_id": tombstone.id, }, diff --git a/tests/sentry/api/endpoints/test_organization_dashboard_widget_details.py b/tests/sentry/api/endpoints/test_organization_dashboard_widget_details.py index 94a8af5da8ec92..0df170b81a4210 100644 --- a/tests/sentry/api/endpoints/test_organization_dashboard_widget_details.py +++ b/tests/sentry/api/endpoints/test_organization_dashboard_widget_details.py @@ -28,7 +28,7 @@ class OrganizationDashboardWidgetDetailsTestCase(OrganizationDashboardWidgetTest def url(self): return reverse( "sentry-api-0-organization-dashboard-widget-details", - kwargs={"organization_slug": self.organization.slug}, + kwargs={"organization_id_or_slug": self.organization.slug}, ) def test_valid_widget(self): diff --git a/tests/sentry/api/endpoints/test_organization_dashboards.py b/tests/sentry/api/endpoints/test_organization_dashboards.py index fddccd1c2209ca..f55ca07e086385 100644 --- a/tests/sentry/api/endpoints/test_organization_dashboards.py +++ b/tests/sentry/api/endpoints/test_organization_dashboards.py @@ -21,7 +21,7 @@ def setUp(self): self.login_as(self.user) self.url = reverse( "sentry-api-0-organization-dashboards", - kwargs={"organization_slug": self.organization.slug}, + kwargs={"organization_id_or_slug": self.organization.slug}, ) self.dashboard_2 = Dashboard.objects.create( title="Dashboard 2", created_by_id=self.user.id, organization=self.organization diff --git a/tests/sentry/api/endpoints/test_organization_invite_request_index.py b/tests/sentry/api/endpoints/test_organization_invite_request_index.py index 5f4855256289eb..946747626ccc85 100644 --- a/tests/sentry/api/endpoints/test_organization_invite_request_index.py +++ b/tests/sentry/api/endpoints/test_organization_invite_request_index.py @@ -86,7 +86,7 @@ def setUp(self): self.url = reverse( "sentry-api-0-organization-invite-request-index", - kwargs={"organization_slug": self.organization.slug}, + kwargs={"organization_id_or_slug": self.organization.slug}, ) def test_simple(self): diff --git a/tests/sentry/api/endpoints/test_organization_metrics.py b/tests/sentry/api/endpoints/test_organization_metrics.py index e41997d947b056..f93ca53fea920a 100644 --- a/tests/sentry/api/endpoints/test_organization_metrics.py +++ b/tests/sentry/api/endpoints/test_organization_metrics.py @@ -128,7 +128,7 @@ def setUp(self): def do_request(self, query, **kwargs): return self.client.get( - reverse(self.view, kwargs={"organization_slug": self.organization.slug}), + reverse(self.view, kwargs={"organization_id_or_slug": self.organization.slug}), query, format="json", **kwargs, diff --git a/tests/sentry/api/endpoints/test_organization_plugins.py b/tests/sentry/api/endpoints/test_organization_plugins.py index f605831a9391d3..6d5c78129e7411 100644 --- a/tests/sentry/api/endpoints/test_organization_plugins.py +++ b/tests/sentry/api/endpoints/test_organization_plugins.py @@ -17,7 +17,7 @@ def setUp(self): def test_exposes_all_plugins_available_no_enabled_state(self): url = reverse( "sentry-api-0-organization-plugins", - kwargs={"organization_slug": self.projectA.organization.slug}, + kwargs={"organization_id_or_slug": self.projectA.organization.slug}, ) url = f"{url}?plugins=_all" @@ -37,7 +37,7 @@ def test_exposes_all_plugins_available_no_enabled_state(self): def test_exposes_plugins_across_all_org_projects(self): url = reverse( "sentry-api-0-organization-plugins", - kwargs={"organization_slug": self.projectA.organization.slug}, + kwargs={"organization_id_or_slug": self.projectA.organization.slug}, ) url = f"{url}?plugins=slack&plugins=webhooks" @@ -56,7 +56,7 @@ def test_exposes_plugins_across_all_org_projects(self): def test_exposes_specific_plugins_across_all_org_projects(self): url = reverse( "sentry-api-0-organization-plugins", - kwargs={"organization_slug": self.projectA.organization.slug}, + kwargs={"organization_id_or_slug": self.projectA.organization.slug}, ) url = f"{url}?plugins=slack" @@ -74,7 +74,7 @@ def test_exposes_specific_plugins_across_all_org_projects(self): def test_ignore_plugins_that_dont_exist(self): url = reverse( "sentry-api-0-organization-plugins", - kwargs={"organization_slug": self.projectA.organization.slug}, + kwargs={"organization_id_or_slug": self.projectA.organization.slug}, ) url = f"{url}?plugins=nope&plugins=beep&plugins=slack" diff --git a/tests/sentry/api/endpoints/test_organization_plugins_configs.py b/tests/sentry/api/endpoints/test_organization_plugins_configs.py index e898c63c16c2fc..14ea558b80931f 100644 --- a/tests/sentry/api/endpoints/test_organization_plugins_configs.py +++ b/tests/sentry/api/endpoints/test_organization_plugins_configs.py @@ -14,7 +14,7 @@ def setUp(self): self.url = reverse( "sentry-api-0-organization-plugins-configs", - kwargs={"organization_slug": self.organization.slug}, + kwargs={"organization_id_or_slug": self.organization.slug}, ) self.login_as(user=self.user) diff --git a/tests/sentry/api/endpoints/test_organization_projects_sent_first_event.py b/tests/sentry/api/endpoints/test_organization_projects_sent_first_event.py index 02884c94a4968f..0399e193cb549d 100644 --- a/tests/sentry/api/endpoints/test_organization_projects_sent_first_event.py +++ b/tests/sentry/api/endpoints/test_organization_projects_sent_first_event.py @@ -12,7 +12,7 @@ def setUp(self): self.team = self.create_team(organization=self.org) self.url = reverse( "sentry-api-0-organization-sent-first-event", - kwargs={"organization_slug": self.org.slug}, + kwargs={"organization_id_or_slug": self.org.slug}, ) def test_simple_sent_first_event(self): diff --git a/tests/sentry/api/endpoints/test_organization_sdk_updates.py b/tests/sentry/api/endpoints/test_organization_sdk_updates.py index e100dbda8216d0..5625a2213546d0 100644 --- a/tests/sentry/api/endpoints/test_organization_sdk_updates.py +++ b/tests/sentry/api/endpoints/test_organization_sdk_updates.py @@ -16,7 +16,7 @@ def setUp(self): self.url = reverse( "sentry-api-0-organization-sdk-updates", - kwargs={"organization_slug": self.organization.slug}, + kwargs={"organization_id_or_slug": self.organization.slug}, ) self.features = {} @@ -81,7 +81,7 @@ def test_no_projects(self): url = reverse( "sentry-api-0-organization-sdk-updates", - kwargs={"organization_slug": org.slug}, + kwargs={"organization_id_or_slug": org.slug}, ) with self.feature(self.features): diff --git a/tests/sentry/api/endpoints/test_organization_spans_fields.py b/tests/sentry/api/endpoints/test_organization_spans_fields.py index fabeff9c96fbde..7021f83037e530 100644 --- a/tests/sentry/api/endpoints/test_organization_spans_fields.py +++ b/tests/sentry/api/endpoints/test_organization_spans_fields.py @@ -18,7 +18,7 @@ def do_request(self, features=None, **kwargs): features = ["organizations:performance-trace-explorer"] with self.feature(features): return self.client.get( - reverse(self.view, kwargs={"organization_slug": self.organization.slug}), + reverse(self.view, kwargs={"organization_id_or_slug": self.organization.slug}), format="json", **kwargs, ) @@ -71,7 +71,8 @@ def do_request(self, key: str, features=None, **kwargs): with self.feature(features): return self.client.get( reverse( - self.view, kwargs={"organization_slug": self.organization.slug, "key": key} + self.view, + kwargs={"organization_id_or_slug": self.organization.slug, "key": key}, ), format="json", **kwargs, diff --git a/tests/sentry/api/endpoints/test_organization_traces.py b/tests/sentry/api/endpoints/test_organization_traces.py index 0cf9755d89ade4..33673a46214ab6 100644 --- a/tests/sentry/api/endpoints/test_organization_traces.py +++ b/tests/sentry/api/endpoints/test_organization_traces.py @@ -24,7 +24,7 @@ def do_request(self, query, features=None, **kwargs): features = ["organizations:performance-trace-explorer"] with self.feature(features): return self.client.get( - reverse(self.view, kwargs={"organization_slug": self.organization.slug}), + reverse(self.view, kwargs={"organization_id_or_slug": self.organization.slug}), query, format="json", **kwargs, diff --git a/tests/sentry/api/endpoints/test_organization_transaction_anomaly_detection.py b/tests/sentry/api/endpoints/test_organization_transaction_anomaly_detection.py index 58e37d6ed44a27..7785c3e139be6c 100644 --- a/tests/sentry/api/endpoints/test_organization_transaction_anomaly_detection.py +++ b/tests/sentry/api/endpoints/test_organization_transaction_anomaly_detection.py @@ -24,7 +24,7 @@ def setUp(self): def do_request(self, data, url=None, features=None): self.url = reverse( "sentry-api-0-organization-transaction-anomaly-detection", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) if features is None: @@ -39,7 +39,7 @@ def do_request(self, data, url=None, features=None): def test_without_feature(self): self.url = reverse( "sentry-api-0-organization-transaction-anomaly-detection", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) response = self.client.get(self.url, data={}, format="json") diff --git a/tests/sentry/api/endpoints/test_project_alert_rule_task_details.py b/tests/sentry/api/endpoints/test_project_alert_rule_task_details.py index 4d37d86d4bc3b4..92fd43e41484be 100644 --- a/tests/sentry/api/endpoints/test_project_alert_rule_task_details.py +++ b/tests/sentry/api/endpoints/test_project_alert_rule_task_details.py @@ -19,7 +19,7 @@ def setUp(self): self.url = reverse( "sentry-api-0-project-alert-rule-task-details", kwargs={ - "organization_slug": project1.organization.slug, + "organization_id_or_slug": project1.organization.slug, "project_id_or_slug": project1.slug, "task_uuid": self.uuid, }, diff --git a/tests/sentry/api/endpoints/test_project_app_store_connect_credentials.py b/tests/sentry/api/endpoints/test_project_app_store_connect_credentials.py index 7d068155823679..a91ce05091ef34 100644 --- a/tests/sentry/api/endpoints/test_project_app_store_connect_credentials.py +++ b/tests/sentry/api/endpoints/test_project_app_store_connect_credentials.py @@ -104,7 +104,7 @@ def setUp(self): "sentry-api-0-project-appstoreconnect-refresh", kwargs={ "project_id_or_slug": self.project.slug, - "organization_slug": self.organization.slug, + "organization_id_or_slug": self.organization.slug, "credentials_id": self.config_id, }, ) diff --git a/tests/sentry/api/endpoints/test_project_artifact_bundle_file_details.py b/tests/sentry/api/endpoints/test_project_artifact_bundle_file_details.py index 7cc630f791a7aa..5c656c17521653 100644 --- a/tests/sentry/api/endpoints/test_project_artifact_bundle_file_details.py +++ b/tests/sentry/api/endpoints/test_project_artifact_bundle_file_details.py @@ -82,7 +82,7 @@ def test_archive_download(self): url = reverse( "sentry-api-0-project-artifact-bundle-file-details", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "bundle_id": artifact_bundle.bundle_id, "file_id": base64.urlsafe_b64encode(b"files/_/_/index.js.map").decode("utf-8"), @@ -105,7 +105,7 @@ def test_archive_download(self): url = reverse( "sentry-api-0-project-artifact-bundle-file-details", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "bundle_id": artifact_bundle.bundle_id, "file_id": base64.urlsafe_b64encode(b"files/_/_/index.js").decode("utf-8"), @@ -124,7 +124,7 @@ def test_archive_download(self): url = reverse( "sentry-api-0-project-artifact-bundle-file-details", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "bundle_id": artifact_bundle.bundle_id, "file_id": base64.urlsafe_b64encode(b"files/_/_/bundle.js").decode("utf-8"), @@ -139,7 +139,7 @@ def test_archive_download(self): url = reverse( "sentry-api-0-project-artifact-bundle-file-details", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "bundle_id": artifact_bundle.bundle_id, "file_id": 1234, @@ -198,7 +198,7 @@ def test_archive_download_with_invalid_project(self): url = reverse( "sentry-api-0-project-artifact-bundle-file-details", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "bundle_id": artifact_bundle.bundle_id, "file_id": base64.urlsafe_b64encode(b"files/_/_/bundle.js").decode("utf-8"), diff --git a/tests/sentry/api/endpoints/test_project_artifact_bundle_files.py b/tests/sentry/api/endpoints/test_project_artifact_bundle_files.py index a7d9692fdea004..6b504ccececcd8 100644 --- a/tests/sentry/api/endpoints/test_project_artifact_bundle_files.py +++ b/tests/sentry/api/endpoints/test_project_artifact_bundle_files.py @@ -41,7 +41,7 @@ def test_get_artifact_bundle_files_with_multiple_files(self): url = reverse( "sentry-api-0-project-artifact-bundle-files", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "bundle_id": artifact_bundle.bundle_id, }, @@ -132,7 +132,7 @@ def test_get_artifact_bundle_files_pagination_with_multiple_files(self): url = reverse( "sentry-api-0-project-artifact-bundle-files", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "bundle_id": artifact_bundle.bundle_id, }, @@ -238,7 +238,7 @@ def test_get_artifact_bundle_files_with_multiple_files_and_search_query(self): url = reverse( "sentry-api-0-project-artifact-bundle-files", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "bundle_id": artifact_bundle.bundle_id, }, diff --git a/tests/sentry/api/endpoints/test_project_autofix_codebase_index_status.py b/tests/sentry/api/endpoints/test_project_autofix_codebase_index_status.py index b3686a7246ba3e..44991e8209de8c 100644 --- a/tests/sentry/api/endpoints/test_project_autofix_codebase_index_status.py +++ b/tests/sentry/api/endpoints/test_project_autofix_codebase_index_status.py @@ -15,7 +15,7 @@ def setUp(self): self.url = reverse( self.endpoint, kwargs={ - "organization_slug": self.project.organization.slug, + "organization_id_or_slug": self.project.organization.slug, "project_id_or_slug": self.project.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_project_autofix_create_codebase_index.py b/tests/sentry/api/endpoints/test_project_autofix_create_codebase_index.py index 0605be81ad1829..38d02c1774571a 100644 --- a/tests/sentry/api/endpoints/test_project_autofix_create_codebase_index.py +++ b/tests/sentry/api/endpoints/test_project_autofix_create_codebase_index.py @@ -18,7 +18,7 @@ def setUp(self): self.url = reverse( self.endpoint, kwargs={ - "organization_slug": self.project.organization.slug, + "organization_id_or_slug": self.project.organization.slug, "project_id_or_slug": self.project.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_project_codeowners.py b/tests/sentry/api/endpoints/test_project_codeowners.py index 466c29f71afb7a..50d164bd003a65 100644 --- a/tests/sentry/api/endpoints/test_project_codeowners.py +++ b/tests/sentry/api/endpoints/test_project_codeowners.py @@ -29,7 +29,7 @@ def setUp(self): self.url = reverse( "sentry-api-0-project-codeowners", kwargs={ - "organization_slug": self.organization.slug, + "organization_id_or_slug": self.organization.slug, "project_id_or_slug": self.project.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_project_commits.py b/tests/sentry/api/endpoints/test_project_commits.py index 1255a88e700f3b..e8e81eb5d76263 100644 --- a/tests/sentry/api/endpoints/test_project_commits.py +++ b/tests/sentry/api/endpoints/test_project_commits.py @@ -69,7 +69,7 @@ def test_query_filter(self): url = reverse( "sentry-api-0-project-commits", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_project_create_sample.py b/tests/sentry/api/endpoints/test_project_create_sample.py index e0fe2ee487a74d..27caeb6305eac0 100644 --- a/tests/sentry/api/endpoints/test_project_create_sample.py +++ b/tests/sentry/api/endpoints/test_project_create_sample.py @@ -19,7 +19,7 @@ def test_simple(self): url = reverse( "sentry-api-0-project-create-sample", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -35,7 +35,7 @@ def test_project_platform(self): url = reverse( "sentry-api-0-project-create-sample", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -50,7 +50,7 @@ def test_cocoa(self): url = reverse( "sentry-api-0-project-create-sample", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -65,7 +65,7 @@ def test_java(self): url = reverse( "sentry-api-0-project-create-sample", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -80,7 +80,7 @@ def test_javascript(self): url = reverse( "sentry-api-0-project-create-sample", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -95,7 +95,7 @@ def test_php(self): url = reverse( "sentry-api-0-project-create-sample", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -110,7 +110,7 @@ def test_python(self): url = reverse( "sentry-api-0-project-create-sample", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -125,7 +125,7 @@ def test_reactnative(self): url = reverse( "sentry-api-0-project-create-sample", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -140,7 +140,7 @@ def test_ruby(self): url = reverse( "sentry-api-0-project-create-sample", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -155,7 +155,7 @@ def test_attempted_path_traversal_returns_400(self): url = reverse( "sentry-api-0-project-create-sample", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_project_create_sample_transaction.py b/tests/sentry/api/endpoints/test_project_create_sample_transaction.py index 478cbfec7b65a3..7bd0ef2365ae57 100644 --- a/tests/sentry/api/endpoints/test_project_create_sample_transaction.py +++ b/tests/sentry/api/endpoints/test_project_create_sample_transaction.py @@ -18,7 +18,7 @@ def test_no_platform(self): url = reverse( "sentry-api-0-project-create-sample-transaction", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -35,7 +35,7 @@ def test_react(self): url = reverse( "sentry-api-0-project-create-sample-transaction", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -50,7 +50,7 @@ def test_django(self): url = reverse( "sentry-api-0-project-create-sample-transaction", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -65,7 +65,7 @@ def test_ios(self): url = reverse( "sentry-api-0-project-create-sample-transaction", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -80,7 +80,7 @@ def test_other_platform(self): url = reverse( "sentry-api-0-project-create-sample-transaction", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -96,7 +96,7 @@ def test_path_traversal_attempt(self): url = reverse( "sentry-api-0-project-create-sample-transaction", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_project_environment_details.py b/tests/sentry/api/endpoints/test_project_environment_details.py index 345d5ea1325b89..a0036674c2b85e 100644 --- a/tests/sentry/api/endpoints/test_project_environment_details.py +++ b/tests/sentry/api/endpoints/test_project_environment_details.py @@ -20,7 +20,7 @@ def test_get(self): url = reverse( "sentry-api-0-project-environment-details", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "environment": "production", }, @@ -40,7 +40,7 @@ def test_get(self): reverse( "sentry-api-0-project-environment-details", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "environment": "invalid", }, @@ -63,7 +63,7 @@ def test_put(self): url = reverse( "sentry-api-0-project-environment-details", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "environment": "production", }, @@ -81,7 +81,7 @@ def test_put(self): reverse( "sentry-api-0-project-environment-details", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "environment": "invalid", }, @@ -107,7 +107,7 @@ def test_escaped_character_put(self): url = reverse( "sentry-api-0-project-environment-details", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "environment": quote(env_name, safe=""), }, diff --git a/tests/sentry/api/endpoints/test_project_environments.py b/tests/sentry/api/endpoints/test_project_environments.py index 2d4a35893f17ae..988d1b2f1064d4 100644 --- a/tests/sentry/api/endpoints/test_project_environments.py +++ b/tests/sentry/api/endpoints/test_project_environments.py @@ -21,7 +21,7 @@ def test_simple(self): url = reverse( "sentry-api-0-project-environments", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -49,7 +49,7 @@ def test_visibility_filtering(self): url = reverse( "sentry-api-0-project-environments", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_project_member_index.py b/tests/sentry/api/endpoints/test_project_member_index.py index 4b61dbbf941334..c882391115b867 100644 --- a/tests/sentry/api/endpoints/test_project_member_index.py +++ b/tests/sentry/api/endpoints/test_project_member_index.py @@ -21,7 +21,7 @@ def test_simple(self): url = reverse( "sentry-api-0-project-member-index", kwargs={ - "organization_slug": project_1.organization.slug, + "organization_id_or_slug": project_1.organization.slug, "project_id_or_slug": project_1.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_project_performance_general_settings.py b/tests/sentry/api/endpoints/test_project_performance_general_settings.py index a296bbab5e42fa..5588659f192081 100644 --- a/tests/sentry/api/endpoints/test_project_performance_general_settings.py +++ b/tests/sentry/api/endpoints/test_project_performance_general_settings.py @@ -19,7 +19,7 @@ def setUp(self) -> None: self.url = reverse( self.endpoint, kwargs={ - "organization_slug": self.project.organization.slug, + "organization_id_or_slug": self.project.organization.slug, "project_id_or_slug": self.project.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_project_plugins.py b/tests/sentry/api/endpoints/test_project_plugins.py index 8a4ec5e67bc063..42084c28f382d3 100644 --- a/tests/sentry/api/endpoints/test_project_plugins.py +++ b/tests/sentry/api/endpoints/test_project_plugins.py @@ -17,7 +17,7 @@ def test_get(self): url = reverse( "sentry-api-0-project-plugins", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_project_processingissues.py b/tests/sentry/api/endpoints/test_project_processingissues.py index abed337e20e3c2..a694dc0a2cc2e8 100644 --- a/tests/sentry/api/endpoints/test_project_processingissues.py +++ b/tests/sentry/api/endpoints/test_project_processingissues.py @@ -26,7 +26,7 @@ def test_simple(self): url = reverse( "sentry-api-0-project-processing-issues", kwargs={ - "organization_slug": project1.organization.slug, + "organization_id_or_slug": project1.organization.slug, "project_id_or_slug": project1.slug, }, ) @@ -65,7 +65,7 @@ def test_issues(self): url = reverse( "sentry-api-0-project-processing-issues", kwargs={ - "organization_slug": project1.organization.slug, + "organization_id_or_slug": project1.organization.slug, "project_id_or_slug": project1.slug, }, ) @@ -94,7 +94,7 @@ def test_resolvable_issues(self): url = reverse( "sentry-api-0-project-processing-issues", kwargs={ - "organization_slug": project1.organization.slug, + "organization_id_or_slug": project1.organization.slug, "project_id_or_slug": project1.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_project_profiling_profile.py b/tests/sentry/api/endpoints/test_project_profiling_profile.py index b61f7bd964ade3..4348f9a048f52c 100644 --- a/tests/sentry/api/endpoints/test_project_profiling_profile.py +++ b/tests/sentry/api/endpoints/test_project_profiling_profile.py @@ -29,7 +29,7 @@ def setUp(self): self.url = reverse( self.endpoint, kwargs={ - "organization_slug": self.project.organization.slug, + "organization_id_or_slug": self.project.organization.slug, "project_id_or_slug": self.project.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_project_proguard_artifact_releases.py b/tests/sentry/api/endpoints/test_project_proguard_artifact_releases.py index 0734b275484ce9..05d96c74ebbb64 100644 --- a/tests/sentry/api/endpoints/test_project_proguard_artifact_releases.py +++ b/tests/sentry/api/endpoints/test_project_proguard_artifact_releases.py @@ -14,7 +14,7 @@ def test_create_proguard_artifact_release_successfully(self): url = reverse( "sentry-api-0-proguard-artifact-releases", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -52,7 +52,7 @@ def test_create_proguard_artifact_release_with_missing_fields(self): url = reverse( "sentry-api-0-proguard-artifact-releases", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -85,7 +85,7 @@ def test_create_proguard_artifact_release_with_conflicting_release_name(self): url = reverse( "sentry-api-0-proguard-artifact-releases", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -150,7 +150,7 @@ def test_list_proguard_artifact_releases_with_uuid_successfully(self): url = reverse( "sentry-api-0-proguard-artifact-releases", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -168,7 +168,7 @@ def test_create_proguard_artifact_release_with_non_existent_uuid(self): url = reverse( "sentry-api-0-proguard-artifact-releases", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -202,7 +202,7 @@ def test_create_proguard_artifact_release_with_invalid_uuid(self): url = reverse( "sentry-api-0-proguard-artifact-releases", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_project_release_details.py b/tests/sentry/api/endpoints/test_project_release_details.py index e1e689219cdf07..ebf2e04aab3564 100644 --- a/tests/sentry/api/endpoints/test_project_release_details.py +++ b/tests/sentry/api/endpoints/test_project_release_details.py @@ -36,7 +36,7 @@ def test_simple(self): url = reverse( "sentry-api-0-project-release-details", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "version": release.version, }, @@ -62,7 +62,7 @@ def test_simple(self): url = reverse( "sentry-api-0-project-release-details", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "version": release.version, }, @@ -88,7 +88,7 @@ def test_commits(self): url = reverse( "sentry-api-0-project-release-details", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "version": release.version, }, @@ -119,7 +119,7 @@ def test_activity_generation(self): url = reverse( "sentry-api-0-project-release-details", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "version": release.version, }, @@ -149,7 +149,7 @@ def test_activity_generation_long_version(self): url = reverse( "sentry-api-0-project-release-details", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "version": release.version, }, @@ -187,7 +187,7 @@ def test_org_auth_token(self): url = reverse( "sentry-api-0-project-release-details", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "version": release.version, }, @@ -224,7 +224,7 @@ def test_simple(self): url = reverse( "sentry-api-0-project-release-details", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "version": release.version, }, @@ -248,7 +248,7 @@ def test_existing_group(self): url = reverse( "sentry-api-0-project-release-details", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "version": release.version, }, diff --git a/tests/sentry/api/endpoints/test_project_release_setup.py b/tests/sentry/api/endpoints/test_project_release_setup.py index c8ce553a873f7a..36465e789be8b4 100644 --- a/tests/sentry/api/endpoints/test_project_release_setup.py +++ b/tests/sentry/api/endpoints/test_project_release_setup.py @@ -25,7 +25,7 @@ def test_simple(self): url = reverse( "sentry-api-0-project-releases-completion-status", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -66,7 +66,7 @@ def test_commit_different_project(self): url = reverse( "sentry-api-0-project-releases-completion-status", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_project_release_stats.py b/tests/sentry/api/endpoints/test_project_release_stats.py index 4c0a22b9c1357c..470c92a7a330cb 100644 --- a/tests/sentry/api/endpoints/test_project_release_stats.py +++ b/tests/sentry/api/endpoints/test_project_release_stats.py @@ -26,7 +26,7 @@ def test_simple(self): url = reverse( "sentry-api-0-project-release-stats", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, "version": "1", }, diff --git a/tests/sentry/api/endpoints/test_project_release_token.py b/tests/sentry/api/endpoints/test_project_release_token.py index c9ec72d90cf670..892ba665801cf6 100644 --- a/tests/sentry/api/endpoints/test_project_release_token.py +++ b/tests/sentry/api/endpoints/test_project_release_token.py @@ -15,7 +15,7 @@ def test_simple(self): url = reverse( "sentry-api-0-project-releases-token", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -33,7 +33,7 @@ def test_generates_token(self): url = reverse( "sentry-api-0-project-releases-token", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -52,7 +52,7 @@ def test_generate_region_webhookurl(self): url = reverse( "sentry-api-0-project-releases-token", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -74,7 +74,7 @@ def test_regenerates_token(self): url = reverse( "sentry-api-0-project-releases-token", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_project_releases.py b/tests/sentry/api/endpoints/test_project_releases.py index 26f0dcc8d4aec5..98f1a137ffd2c5 100644 --- a/tests/sentry/api/endpoints/test_project_releases.py +++ b/tests/sentry/api/endpoints/test_project_releases.py @@ -64,7 +64,7 @@ def test_simple(self): url = reverse( "sentry-api-0-project-releases", kwargs={ - "organization_slug": project1.organization.slug, + "organization_id_or_slug": project1.organization.slug, "project_id_or_slug": project1.slug, }, ) @@ -94,7 +94,7 @@ def test_query_filter(self): url = reverse( "sentry-api-0-project-releases", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -211,7 +211,7 @@ def test_environments_filter(self): url = reverse( "sentry-api-0-project-releases", kwargs={ - "organization_slug": self.project1.organization.slug, + "organization_id_or_slug": self.project1.organization.slug, "project_id_or_slug": self.project1.slug, }, ) @@ -226,7 +226,7 @@ def test_environments_filter(self): url = reverse( "sentry-api-0-project-releases", kwargs={ - "organization_slug": self.project2.organization.slug, + "organization_id_or_slug": self.project2.organization.slug, "project_id_or_slug": self.project2.slug, }, ) @@ -237,7 +237,7 @@ def test_all_environments(self): url = reverse( "sentry-api-0-project-releases", kwargs={ - "organization_slug": self.project1.organization.slug, + "organization_id_or_slug": self.project1.organization.slug, "project_id_or_slug": self.project1.slug, }, ) @@ -248,7 +248,7 @@ def test_invalid_environment(self): url = reverse( "sentry-api-0-project-releases", kwargs={ - "organization_slug": self.project1.organization.slug, + "organization_id_or_slug": self.project1.organization.slug, "project_id_or_slug": self.project1.slug, }, ) @@ -262,7 +262,7 @@ def sort_releases_by_version(releases): url = reverse( "sentry-api-0-project-releases", kwargs={ - "organization_slug": self.project1.organization.slug, + "organization_id_or_slug": self.project1.organization.slug, "project_id_or_slug": self.project1.slug, }, ) @@ -330,7 +330,7 @@ def test_minimal(self): url = reverse( "sentry-api-0-project-releases", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -359,7 +359,7 @@ def test_ios_release(self): url = reverse( "sentry-api-0-project-releases", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -384,7 +384,7 @@ def test_duplicate(self): url = reverse( "sentry-api-0-project-releases", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -406,7 +406,7 @@ def test_duplicate_across_org(self): url = reverse( "sentry-api-0-project-releases", kwargs={ - "organization_slug": project2.organization.slug, + "organization_id_or_slug": project2.organization.slug, "project_id_or_slug": project2.slug, }, ) @@ -430,7 +430,7 @@ def test_version_whitespace(self): url = reverse( "sentry-api-0-project-releases", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -467,7 +467,7 @@ def test_features(self): url = reverse( "sentry-api-0-project-releases", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -489,7 +489,7 @@ def test_commits(self): url = reverse( "sentry-api-0-project-releases", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -528,7 +528,7 @@ def test_org_auth_token(self): url = reverse( "sentry-api-0-project-releases", - kwargs={"organization_slug": org.slug, "project_id_or_slug": project1.slug}, + kwargs={"organization_id_or_slug": org.slug, "project_id_or_slug": project1.slug}, ) # test right org, wrong permissions level @@ -600,7 +600,7 @@ def url(self): return reverse( "sentry-api-0-project-releases", kwargs={ - "organization_slug": self.project.organization.slug, + "organization_id_or_slug": self.project.organization.slug, "project_id_or_slug": self.project.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_project_repo_path_parsing.py b/tests/sentry/api/endpoints/test_project_repo_path_parsing.py index 62192af26d3099..bf49e224f2b282 100644 --- a/tests/sentry/api/endpoints/test_project_repo_path_parsing.py +++ b/tests/sentry/api/endpoints/test_project_repo_path_parsing.py @@ -21,7 +21,7 @@ def make_post(self, source_url, stack_path, project=None, user=None): url = reverse( "sentry-api-0-project-repo-path-parsing", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_project_transaction_threshold.py b/tests/sentry/api/endpoints/test_project_transaction_threshold.py index 6b77251e798430..fd417bb8b5f97c 100644 --- a/tests/sentry/api/endpoints/test_project_transaction_threshold.py +++ b/tests/sentry/api/endpoints/test_project_transaction_threshold.py @@ -16,7 +16,7 @@ def setUp(self) -> None: self.url = reverse( "sentry-api-0-project-transaction-threshold", kwargs={ - "organization_slug": self.project.organization.slug, + "organization_id_or_slug": self.project.organization.slug, "project_id_or_slug": self.project.slug, }, ) @@ -113,7 +113,7 @@ def test_project_threshold_permissions(self): url = reverse( "sentry-api-0-project-transaction-threshold", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) diff --git a/tests/sentry/api/endpoints/test_project_transfer.py b/tests/sentry/api/endpoints/test_project_transfer.py index 92aea5260ccb69..b19f80ea97a463 100644 --- a/tests/sentry/api/endpoints/test_project_transfer.py +++ b/tests/sentry/api/endpoints/test_project_transfer.py @@ -13,7 +13,7 @@ def test_internal_project(self): url = reverse( "sentry-api-0-project-transfer", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) @@ -34,7 +34,10 @@ def test_transfer_project(self): url = reverse( "sentry-api-0-project-transfer", - kwargs={"organization_slug": organization.slug, "project_id_or_slug": project.slug}, + kwargs={ + "organization_id_or_slug": organization.slug, + "project_id_or_slug": project.slug, + }, ) with self.tasks(): @@ -54,7 +57,7 @@ def test_transfer_project_to_invalid_user(self): url = reverse( "sentry-api-0-project-transfer", kwargs={ - "organization_slug": project.organization.slug, + "organization_id_or_slug": project.organization.slug, "project_id_or_slug": project.slug, }, ) diff --git a/tests/sentry/incidents/action_handlers/test_email.py b/tests/sentry/incidents/action_handlers/test_email.py index eba3221001c5e4..fd7da0683b70f5 100644 --- a/tests/sentry/incidents/action_handlers/test_email.py +++ b/tests/sentry/incidents/action_handlers/test_email.py @@ -241,7 +241,7 @@ def test_simple(self): reverse( "sentry-metric-alert", kwargs={ - "organization_slug": incident.organization.slug, + "organization_id_or_slug": incident.organization.slug, "incident_id": incident.identifier, }, ), @@ -291,7 +291,7 @@ def test_links_customer_domains(self): path = reverse( "sentry-metric-alert", kwargs={ - "organization_slug": self.organization.slug, + "organization_id_or_slug": self.organization.slug, "incident_id": incident.identifier, }, ) diff --git a/tests/sentry/incidents/endpoints/test_organization_incident_seen.py b/tests/sentry/incidents/endpoints/test_organization_incident_seen.py index f9f168d378f7f7..323a2523461a72 100644 --- a/tests/sentry/incidents/endpoints/test_organization_incident_seen.py +++ b/tests/sentry/incidents/endpoints/test_organization_incident_seen.py @@ -54,7 +54,7 @@ def test_has_user_seen(self): url = reverse( "sentry-api-0-organization-incident-details", kwargs={ - "organization_slug": incident.organization.slug, + "organization_id_or_slug": incident.organization.slug, "incident_identifier": incident.identifier, }, ) diff --git a/tests/sentry/incidents/test_tasks.py b/tests/sentry/incidents/test_tasks.py index 39bcb0b2345243..4cfbd405d5a9e7 100644 --- a/tests/sentry/incidents/test_tasks.py +++ b/tests/sentry/incidents/test_tasks.py @@ -118,7 +118,7 @@ def run_test( reverse( "sentry-metric-alert", kwargs={ - "organization_slug": incident.organization.slug, + "organization_id_or_slug": incident.organization.slug, "incident_id": incident.identifier, }, ) diff --git a/tests/sentry/integrations/discord/test_message_builder.py b/tests/sentry/integrations/discord/test_message_builder.py index 34f086817be41a..2dbaca1abf1bc5 100644 --- a/tests/sentry/integrations/discord/test_message_builder.py +++ b/tests/sentry/integrations/discord/test_message_builder.py @@ -24,7 +24,7 @@ def test_metric_alert_without_incidents(self): reverse( "sentry-metric-alert-details", kwargs={ - "organization_slug": self.alert_rule.organization.slug, + "organization_id_or_slug": self.alert_rule.organization.slug, "alert_rule_id": self.alert_rule.id, }, ) @@ -59,7 +59,7 @@ def test_metric_alert_with_selected_incident(self): reverse( "sentry-metric-alert-details", kwargs={ - "organization_slug": self.alert_rule.organization.slug, + "organization_id_or_slug": self.alert_rule.organization.slug, "alert_rule_id": self.alert_rule.id, }, ) @@ -96,7 +96,7 @@ def test_metric_alert_with_active_incident(self): reverse( "sentry-metric-alert-details", kwargs={ - "organization_slug": self.alert_rule.organization.slug, + "organization_id_or_slug": self.alert_rule.organization.slug, "alert_rule_id": self.alert_rule.id, }, ) @@ -132,7 +132,7 @@ def test_metric_value(self): reverse( "sentry-metric-alert-details", kwargs={ - "organization_slug": self.alert_rule.organization.slug, + "organization_id_or_slug": self.alert_rule.organization.slug, "alert_rule_id": self.alert_rule.id, }, ) @@ -165,7 +165,7 @@ def test_metric_alert_chart(self): reverse( "sentry-metric-alert-details", kwargs={ - "organization_slug": self.alert_rule.organization.slug, + "organization_id_or_slug": self.alert_rule.organization.slug, "alert_rule_id": self.alert_rule.id, }, ) @@ -204,7 +204,7 @@ def test_metric_alert_no_uuid(self): reverse( "sentry-metric-alert-details", kwargs={ - "organization_slug": self.alert_rule.organization.slug, + "organization_id_or_slug": self.alert_rule.organization.slug, "alert_rule_id": self.alert_rule.id, }, ) diff --git a/tests/sentry/integrations/github/test_integration.py b/tests/sentry/integrations/github/test_integration.py index b726c9ff9ee5aa..cec7ecbbb3a41c 100644 --- a/tests/sentry/integrations/github/test_integration.py +++ b/tests/sentry/integrations/github/test_integration.py @@ -326,7 +326,7 @@ def test_github_installed_on_another_org(self): reverse( "sentry-organization-integrations-setup", kwargs={ - "organization_slug": self.organization_2.slug, + "organization_id_or_slug": self.organization_2.slug, "provider_id": self.provider.key, }, ), @@ -404,7 +404,7 @@ def test_github_user_mismatch(self): reverse( "sentry-organization-integrations-setup", kwargs={ - "organization_slug": self.organization.slug, + "organization_id_or_slug": self.organization.slug, "provider_id": self.provider.key, }, ), @@ -433,7 +433,7 @@ def test_github_user_mismatch(self): reverse( "sentry-organization-integrations-setup", kwargs={ - "organization_slug": org_2.slug, + "organization_id_or_slug": org_2.slug, "provider_id": self.provider.key, }, ), diff --git a/tests/sentry/integrations/slack/test_message_builder.py b/tests/sentry/integrations/slack/test_message_builder.py index 63ca61a20cf5f8..3dd8aa992922f7 100644 --- a/tests/sentry/integrations/slack/test_message_builder.py +++ b/tests/sentry/integrations/slack/test_message_builder.py @@ -889,7 +889,7 @@ def test_simple(self): reverse( "sentry-metric-alert-details", kwargs={ - "organization_slug": alert_rule.organization.slug, + "organization_id_or_slug": alert_rule.organization.slug, "alert_rule_id": alert_rule.id, }, ) @@ -929,7 +929,7 @@ def test_metric_value(self): reverse( "sentry-metric-alert-details", kwargs={ - "organization_slug": alert_rule.organization.slug, + "organization_id_or_slug": alert_rule.organization.slug, "alert_rule_id": alert_rule.id, }, ) @@ -969,7 +969,7 @@ def test_chart(self): reverse( "sentry-metric-alert-details", kwargs={ - "organization_slug": alert_rule.organization.slug, + "organization_id_or_slug": alert_rule.organization.slug, "alert_rule_id": alert_rule.id, }, ) @@ -1002,7 +1002,7 @@ def test_metric_alert_without_incidents(self): reverse( "sentry-metric-alert-details", kwargs={ - "organization_slug": alert_rule.organization.slug, + "organization_id_or_slug": alert_rule.organization.slug, "alert_rule_id": alert_rule.id, }, ) @@ -1033,7 +1033,7 @@ def test_metric_alert_with_selected_incident(self): reverse( "sentry-metric-alert-details", kwargs={ - "organization_slug": alert_rule.organization.slug, + "organization_id_or_slug": alert_rule.organization.slug, "alert_rule_id": alert_rule.id, }, ) @@ -1065,7 +1065,7 @@ def test_metric_alert_with_active_incident(self): reverse( "sentry-metric-alert-details", kwargs={ - "organization_slug": alert_rule.organization.slug, + "organization_id_or_slug": alert_rule.organization.slug, "alert_rule_id": alert_rule.id, }, ) @@ -1098,7 +1098,7 @@ def test_metric_value(self): reverse( "sentry-metric-alert-details", kwargs={ - "organization_slug": alert_rule.organization.slug, + "organization_id_or_slug": alert_rule.organization.slug, "alert_rule_id": alert_rule.id, }, ) @@ -1126,7 +1126,7 @@ def test_metric_alert_chart(self): reverse( "sentry-metric-alert-details", kwargs={ - "organization_slug": alert_rule.organization.slug, + "organization_id_or_slug": alert_rule.organization.slug, "alert_rule_id": alert_rule.id, }, ) diff --git a/tests/sentry/mediators/test_mediator.py b/tests/sentry/mediators/test_mediator.py index aee4d0b8f00610..01e2bff06b8b21 100644 --- a/tests/sentry/mediators/test_mediator.py +++ b/tests/sentry/mediators/test_mediator.py @@ -69,7 +69,7 @@ def test_log(self): "sentry.app.env", new_callable=PropertyMock( return_value=Double( - request=Double(resolver_match=Double(kwargs={"organization_slug": "beep"})) + request=Double(resolver_match=Double(kwargs={"organization_id_or_slug": "beep"})) ) ), ) diff --git a/tests/sentry/middleware/test_customer_domain.py b/tests/sentry/middleware/test_customer_domain.py index e52e37c5409cc0..a69a1a8933d994 100644 --- a/tests/sentry/middleware/test_customer_domain.py +++ b/tests/sentry/middleware/test_customer_domain.py @@ -171,7 +171,7 @@ class OrganizationTestEndpoint(Endpoint): def get(self, request, organization_slug): return Response( { - "organization_slug": organization_slug, + "organization_id_or_slug": organization_slug, "subdomain": request.subdomain, "activeorg": request.session.get("activeorg", None), } @@ -181,7 +181,7 @@ def post(self, request, organization_slug): request.session["activeorg"] = organization_slug return Response( { - "organization_slug": organization_slug, + "organization_id_or_slug": organization_slug, "subdomain": request.subdomain, "activeorg": request.session.get("activeorg", None), } @@ -246,10 +246,10 @@ def test_with_middleware_no_customer_domain(self): # Induce activeorg session value of a non-existent org assert "activeorg" not in self.client.session response = self.client.post( - reverse("org-events-endpoint", kwargs={"organization_slug": "test"}) + reverse("org-events-endpoint", kwargs={"organization_id_or_slug": "test"}) ) assert response.data == { - "organization_slug": "test", + "organization_id_or_slug": "test", "subdomain": None, "activeorg": "test", } @@ -258,10 +258,12 @@ def test_with_middleware_no_customer_domain(self): # 'activeorg' session key is not replaced response = self.client.get( - reverse("org-events-endpoint", kwargs={"organization_slug": "albertos-apples"}) + reverse( + "org-events-endpoint", kwargs={"organization_id_or_slug": "albertos-apples"} + ) ) assert response.data == { - "organization_slug": "albertos-apples", + "organization_id_or_slug": "albertos-apples", "subdomain": None, "activeorg": "test", } @@ -270,13 +272,13 @@ def test_with_middleware_no_customer_domain(self): # No redirect response response = self.client.get( - reverse("org-events-endpoint", kwargs={"organization_slug": "some-org"}), + reverse("org-events-endpoint", kwargs={"organization_id_or_slug": "some-org"}), follow=True, ) assert response.status_code == 200 assert response.redirect_chain == [] assert response.data == { - "organization_slug": "some-org", + "organization_id_or_slug": "some-org", "subdomain": None, "activeorg": "test", } @@ -320,10 +322,10 @@ def test_with_middleware_and_customer_domain(self): # Induce activeorg session value of a non-existent org assert "activeorg" not in self.client.session response = self.client.post( - reverse("org-events-endpoint", kwargs={"organization_slug": "test"}) + reverse("org-events-endpoint", kwargs={"organization_id_or_slug": "test"}) ) assert response.data == { - "organization_slug": "test", + "organization_id_or_slug": "test", "subdomain": None, "activeorg": "test", } @@ -332,11 +334,13 @@ def test_with_middleware_and_customer_domain(self): # 'activeorg' session key is replaced response = self.client.get( - reverse("org-events-endpoint", kwargs={"organization_slug": "albertos-apples"}), + reverse( + "org-events-endpoint", kwargs={"organization_id_or_slug": "albertos-apples"} + ), HTTP_HOST="albertos-apples.testserver", ) assert response.data == { - "organization_slug": "albertos-apples", + "organization_id_or_slug": "albertos-apples", "subdomain": "albertos-apples", "activeorg": "albertos-apples", } @@ -345,7 +349,7 @@ def test_with_middleware_and_customer_domain(self): # Redirect response for org slug path mismatch response = self.client.get( - reverse("org-events-endpoint", kwargs={"organization_slug": "some-org"}), + reverse("org-events-endpoint", kwargs={"organization_id_or_slug": "some-org"}), data={"querystring": "value"}, HTTP_HOST="albertos-apples.testserver", follow=True, @@ -353,7 +357,7 @@ def test_with_middleware_and_customer_domain(self): assert response.status_code == 200 assert response.redirect_chain == [("/api/0/albertos-apples/?querystring=value", 302)] assert response.data == { - "organization_slug": "albertos-apples", + "organization_id_or_slug": "albertos-apples", "subdomain": "albertos-apples", "activeorg": "albertos-apples", } @@ -362,7 +366,7 @@ def test_with_middleware_and_customer_domain(self): # Redirect response for subdomain and path mismatch response = self.client.get( - reverse("org-events-endpoint", kwargs={"organization_slug": "some-org"}), + reverse("org-events-endpoint", kwargs={"organization_id_or_slug": "some-org"}), data={"querystring": "value"}, # This should preferably be HTTP_HOST. # Using SERVER_NAME until https://code.djangoproject.com/ticket/32106 is fixed. @@ -374,7 +378,7 @@ def test_with_middleware_and_customer_domain(self): ("http://albertos-apples.testserver/api/0/albertos-apples/?querystring=value", 302) ] assert response.data == { - "organization_slug": "albertos-apples", + "organization_id_or_slug": "albertos-apples", "subdomain": "albertos-apples", "activeorg": "albertos-apples", } @@ -383,7 +387,7 @@ def test_with_middleware_and_customer_domain(self): # No redirect for http methods that is not GET response = self.client.post( - reverse("org-events-endpoint", kwargs={"organization_slug": "some-org"}), + reverse("org-events-endpoint", kwargs={"organization_id_or_slug": "some-org"}), data={"querystring": "value"}, HTTP_HOST="albertos-apples.testserver", follow=True, @@ -430,7 +434,9 @@ def test_with_middleware_and_non_staff(self): with override_settings(MIDDLEWARE=tuple(self.middleware)): # GET request response = self.client.get( - reverse("org-events-endpoint", kwargs={"organization_slug": "albertos-apples"}), + reverse( + "org-events-endpoint", kwargs={"organization_id_or_slug": "albertos-apples"} + ), data={"querystring": "value"}, # This should preferably be HTTP_HOST. # Using SERVER_NAME until https://code.djangoproject.com/ticket/32106 is fixed. @@ -440,7 +446,7 @@ def test_with_middleware_and_non_staff(self): assert response.status_code == 200 assert response.redirect_chain == [] assert response.data == { - "organization_slug": "albertos-apples", + "organization_id_or_slug": "albertos-apples", "subdomain": "albertos-apples", "activeorg": "albertos-apples", } @@ -449,7 +455,9 @@ def test_with_middleware_and_non_staff(self): # POST request response = self.client.post( - reverse("org-events-endpoint", kwargs={"organization_slug": "albertos-apples"}), + reverse( + "org-events-endpoint", kwargs={"organization_id_or_slug": "albertos-apples"} + ), data={"querystring": "value"}, SERVER_NAME="albertos-apples.testserver", ) @@ -457,7 +465,9 @@ def test_with_middleware_and_non_staff(self): # # PUT request (not-supported) response = self.client.put( - reverse("org-events-endpoint", kwargs={"organization_slug": "albertos-apples"}), + reverse( + "org-events-endpoint", kwargs={"organization_id_or_slug": "albertos-apples"} + ), data={"querystring": "value"}, SERVER_NAME="albertos-apples.testserver", ) @@ -470,12 +480,14 @@ def test_with_middleware_and_is_staff(self): with override_settings(MIDDLEWARE=tuple(self.middleware)): response = self.client.get( - reverse("org-events-endpoint", kwargs={"organization_slug": "albertos-apples"}), + reverse( + "org-events-endpoint", kwargs={"organization_id_or_slug": "albertos-apples"} + ), HTTP_HOST="albertos-apples.testserver", ) assert response.status_code == 200 assert response.data == { - "organization_slug": "albertos-apples", + "organization_id_or_slug": "albertos-apples", "subdomain": "albertos-apples", "activeorg": "albertos-apples", } @@ -492,10 +504,10 @@ def test_without_middleware(self): # Induce activeorg session value of a non-existent org assert "activeorg" not in self.client.session response = self.client.post( - reverse("org-events-endpoint", kwargs={"organization_slug": "test"}) + reverse("org-events-endpoint", kwargs={"organization_id_or_slug": "test"}) ) assert response.data == { - "organization_slug": "test", + "organization_id_or_slug": "test", "subdomain": None, "activeorg": "test", } @@ -504,11 +516,13 @@ def test_without_middleware(self): # 'activeorg' session key is not replaced response = self.client.get( - reverse("org-events-endpoint", kwargs={"organization_slug": "albertos-apples"}), + reverse( + "org-events-endpoint", kwargs={"organization_id_or_slug": "albertos-apples"} + ), HTTP_HOST="albertos-apples.testserver", ) assert response.data == { - "organization_slug": "albertos-apples", + "organization_id_or_slug": "albertos-apples", "subdomain": "albertos-apples", "activeorg": "test", } @@ -517,14 +531,14 @@ def test_without_middleware(self): # No redirect response response = self.client.get( - reverse("org-events-endpoint", kwargs={"organization_slug": "some-org"}), + reverse("org-events-endpoint", kwargs={"organization_id_or_slug": "some-org"}), HTTP_HOST="albertos-apples.testserver", follow=True, ) assert response.status_code == 200 assert response.redirect_chain == [] assert response.data == { - "organization_slug": "some-org", + "organization_id_or_slug": "some-org", "subdomain": "albertos-apples", "activeorg": "test", } @@ -543,7 +557,7 @@ def test_with_middleware_and_nameless_view(self): assert response.status_code == 200 assert response.redirect_chain == [("/api/0/albertos-apples/nameless/", 302)] assert response.data == { - "organization_slug": "albertos-apples", + "organization_id_or_slug": "albertos-apples", "subdomain": "albertos-apples", "activeorg": "albertos-apples", } diff --git a/tests/sentry/web/frontend/test_group_tag_export.py b/tests/sentry/web/frontend/test_group_tag_export.py index f307f2cd4dd589..be87039f8a7004 100644 --- a/tests/sentry/web/frontend/test_group_tag_export.py +++ b/tests/sentry/web/frontend/test_group_tag_export.py @@ -57,7 +57,7 @@ def test_simple(self): url = reverse( "sentry-group-tag-export", kwargs={ - "organization_slug": self.project.organization.slug, + "organization_id_or_slug": self.project.organization.slug, "project_id_or_slug": self.project.slug, "group_id": self.group.id, "key": self.key, diff --git a/tests/snuba/api/endpoints/test_discover_saved_query_detail.py b/tests/snuba/api/endpoints/test_discover_saved_query_detail.py index d52cf3a46dc64c..9d9ee8e6599097 100644 --- a/tests/snuba/api/endpoints/test_discover_saved_query_detail.py +++ b/tests/snuba/api/endpoints/test_discover_saved_query_detail.py @@ -345,7 +345,7 @@ def setUp(self): def url(self, query_id): return reverse( "sentry-api-0-discover-saved-query-visit", - kwargs={"organization_slug": self.org.slug, "query_id": query_id}, + kwargs={"organization_id_or_slug": self.org.slug, "query_id": query_id}, ) def test_visit_query(self): diff --git a/tests/snuba/api/endpoints/test_organization_events_facets.py b/tests/snuba/api/endpoints/test_organization_events_facets.py index c1e3d1574ce251..07f022de323565 100644 --- a/tests/snuba/api/endpoints/test_organization_events_facets.py +++ b/tests/snuba/api/endpoints/test_organization_events_facets.py @@ -21,7 +21,7 @@ def setUp(self): self.project2 = self.create_project() self.url = reverse( "sentry-api-0-organization-events-facets", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) self.min_ago_iso = iso_format(self.min_ago) self.features = {"organizations:discover-basic": True, "organizations:global-views": True} @@ -330,7 +330,7 @@ def test_excluded_tag(self): def test_no_projects(self): org = self.create_organization(owner=self.user) url = reverse( - "sentry-api-0-organization-events-facets", kwargs={"organization_slug": org.slug} + "sentry-api-0-organization-events-facets", kwargs={"organization_id_or_slug": org.slug} ) with self.feature("organizations:discover-basic"): response = self.client.get(url, format="json") diff --git a/tests/snuba/api/endpoints/test_organization_events_facets_performance.py b/tests/snuba/api/endpoints/test_organization_events_facets_performance.py index 1a075a9544261b..a193db075290b8 100644 --- a/tests/snuba/api/endpoints/test_organization_events_facets_performance.py +++ b/tests/snuba/api/endpoints/test_organization_events_facets_performance.py @@ -56,7 +56,7 @@ def setUp(self): self.url = reverse( "sentry-api-0-organization-events-facets-performance", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) def store_transaction( diff --git a/tests/snuba/api/endpoints/test_organization_events_facets_performance_histogram.py b/tests/snuba/api/endpoints/test_organization_events_facets_performance_histogram.py index 93f14ec5cbe488..fd4dfc1ddab5a3 100644 --- a/tests/snuba/api/endpoints/test_organization_events_facets_performance_histogram.py +++ b/tests/snuba/api/endpoints/test_organization_events_facets_performance_histogram.py @@ -26,7 +26,7 @@ def setUp(self): self.url = reverse( "sentry-api-0-organization-events-facets-performance-histogram", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) # Function to set up some transactions for most tests diff --git a/tests/snuba/api/endpoints/test_organization_events_has_measurements.py b/tests/snuba/api/endpoints/test_organization_events_has_measurements.py index 0523a785a3843f..66b6d4486215a5 100644 --- a/tests/snuba/api/endpoints/test_organization_events_has_measurements.py +++ b/tests/snuba/api/endpoints/test_organization_events_has_measurements.py @@ -24,7 +24,7 @@ def do_request(self, query, features=None): self.login_as(user=self.user) url = reverse( "sentry-api-0-organization-events-has-measurements", - kwargs={"organization_slug": self.organization.slug}, + kwargs={"organization_id_or_slug": self.organization.slug}, ) with self.feature(features): return self.client.get(url, query, format="json") diff --git a/tests/snuba/api/endpoints/test_organization_events_histogram.py b/tests/snuba/api/endpoints/test_organization_events_histogram.py index df6194d7d90316..a6465ee3b38cc7 100644 --- a/tests/snuba/api/endpoints/test_organization_events_histogram.py +++ b/tests/snuba/api/endpoints/test_organization_events_histogram.py @@ -72,7 +72,7 @@ def do_request(self, query, features=None): self.login_as(user=self.user) url = reverse( "sentry-api-0-organization-events-histogram", - kwargs={"organization_slug": self.organization.slug}, + kwargs={"organization_id_or_slug": self.organization.slug}, ) with self.feature(features): return self.client.get(url, query, format="json") @@ -1068,7 +1068,7 @@ def do_request(self, query, features=None): self.login_as(user=self.user) url = reverse( "sentry-api-0-organization-events-histogram", - kwargs={"organization_slug": self.organization.slug}, + kwargs={"organization_id_or_slug": self.organization.slug}, ) with self.feature(features): return self.client.get(url, query, format="json") diff --git a/tests/snuba/api/endpoints/test_organization_events_meta.py b/tests/snuba/api/endpoints/test_organization_events_meta.py index 3ae0443aa647ce..bf3a1db3c0ab83 100644 --- a/tests/snuba/api/endpoints/test_organization_events_meta.py +++ b/tests/snuba/api/endpoints/test_organization_events_meta.py @@ -21,7 +21,7 @@ def setUp(self): self.project = self.create_project() self.url = reverse( "sentry-api-0-organization-events-meta", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) self.features = {"organizations:discover-basic": True} @@ -88,7 +88,7 @@ def test_no_projects(self): url = reverse( "sentry-api-0-organization-events-meta", - kwargs={"organization_slug": no_project_org.slug}, + kwargs={"organization_id_or_slug": no_project_org.slug}, ) with self.feature(self.features): response = self.client.get(url, format="json") @@ -110,7 +110,7 @@ def test_transaction_event(self): self.store_event(data=data, project_id=self.project.id) url = reverse( "sentry-api-0-organization-events-meta", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) with self.feature(self.features): response = self.client.get(url, {"query": "transaction.duration:>1"}, format="json") @@ -130,7 +130,7 @@ def test_generic_event(self): assert group_info is not None url = reverse( "sentry-api-0-organization-events-meta", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) with self.feature(self.features): response = self.client.get( @@ -153,7 +153,7 @@ def test_errors_dataset_event(self): ).group url = reverse( "sentry-api-0-organization-events-meta", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) with self.feature(self.features): response = self.client.get( @@ -258,7 +258,7 @@ def test_find_related_issue(self): url = reverse( "sentry-api-0-organization-related-issues", - kwargs={"organization_slug": project.organization.slug}, + kwargs={"organization_id_or_slug": project.organization.slug}, ) response = self.client.get(url, {"transaction": "/beth/sanchez"}, format="json") @@ -278,7 +278,7 @@ def test_related_issues_no_transaction(self): url = reverse( "sentry-api-0-organization-related-issues", - kwargs={"organization_slug": project.organization.slug}, + kwargs={"organization_id_or_slug": project.organization.slug}, ) response = self.client.get(url, format="json") @@ -299,7 +299,7 @@ def test_related_issues_no_matching_groups(self): url = reverse( "sentry-api-0-organization-related-issues", - kwargs={"organization_slug": project.organization.slug}, + kwargs={"organization_id_or_slug": project.organization.slug}, ) response = self.client.get(url, {"transaction": "/morty/sanchez"}, format="json") @@ -329,7 +329,7 @@ def test_related_issues_only_issues_in_date(self): url = reverse( "sentry-api-0-organization-related-issues", - kwargs={"organization_slug": project.organization.slug}, + kwargs={"organization_id_or_slug": project.organization.slug}, ) response = self.client.get( url, {"transaction": "/beth/sanchez", "statsPeriod": "24h"}, format="json" @@ -364,7 +364,7 @@ def test_related_issues_transactions_from_different_projects(self): url = reverse( "sentry-api-0-organization-related-issues", - kwargs={"organization_slug": project1.organization.slug}, + kwargs={"organization_id_or_slug": project1.organization.slug}, ) response = self.client.get( url, @@ -392,7 +392,7 @@ def test_related_issues_transactions_with_quotes(self): url = reverse( "sentry-api-0-organization-related-issues", - kwargs={"organization_slug": project.organization.slug}, + kwargs={"organization_id_or_slug": project.organization.slug}, ) response = self.client.get( url, @@ -407,7 +407,7 @@ def test_related_issues_transactions_with_quotes(self): url = reverse( "sentry-api-0-organization-related-issues", - kwargs={"organization_slug": project.organization.slug}, + kwargs={"organization_id_or_slug": project.organization.slug}, ) response = self.client.get( url, @@ -428,7 +428,7 @@ class OrganizationSpansSamplesEndpoint(APITestCase, SnubaTestCase): def test_is_segment_properly_converted_in_filter(self, mock_raw_snql_query): self.login_as(user=self.user) project = self.create_project() - url = reverse(self.url_name, kwargs={"organization_slug": project.organization.slug}) + url = reverse(self.url_name, kwargs={"organization_id_or_slug": project.organization.slug}) response = self.client.get( url, diff --git a/tests/snuba/api/endpoints/test_organization_events_span_ops.py b/tests/snuba/api/endpoints/test_organization_events_span_ops.py index b48048c3174dad..cf6bc920dbfd72 100644 --- a/tests/snuba/api/endpoints/test_organization_events_span_ops.py +++ b/tests/snuba/api/endpoints/test_organization_events_span_ops.py @@ -15,7 +15,7 @@ def setUp(self): self.url = reverse( "sentry-api-0-organization-events-span-ops", - kwargs={"organization_slug": self.organization.slug}, + kwargs={"organization_id_or_slug": self.organization.slug}, ) self.min_ago = before_now(minutes=1).replace(microsecond=0) diff --git a/tests/snuba/api/endpoints/test_organization_events_spans_histogram.py b/tests/snuba/api/endpoints/test_organization_events_spans_histogram.py index f178676d1751e5..8953e8887533b8 100644 --- a/tests/snuba/api/endpoints/test_organization_events_spans_histogram.py +++ b/tests/snuba/api/endpoints/test_organization_events_spans_histogram.py @@ -20,7 +20,7 @@ def setUp(self): self.project = self.create_project(organization=self.org) self.url = reverse( self.URL, - kwargs={"organization_slug": self.org.slug}, + kwargs={"organization_id_or_slug": self.org.slug}, ) self.min_ago = before_now(minutes=1).replace(microsecond=0) diff --git a/tests/snuba/api/endpoints/test_organization_events_spans_performance.py b/tests/snuba/api/endpoints/test_organization_events_spans_performance.py index a94ccbd622b502..214d232598ec25 100644 --- a/tests/snuba/api/endpoints/test_organization_events_spans_performance.py +++ b/tests/snuba/api/endpoints/test_organization_events_spans_performance.py @@ -28,7 +28,7 @@ def setUp(self): self.url = reverse( self.URL, - kwargs={"organization_slug": self.organization.slug}, + kwargs={"organization_id_or_slug": self.organization.slug}, ) self.min_ago = before_now(minutes=1).replace(microsecond=0) @@ -418,7 +418,7 @@ def test_no_projects(self): url = reverse( self.URL, - kwargs={"organization_slug": org.slug}, + kwargs={"organization_id_or_slug": org.slug}, ) with self.feature(self.FEATURES): @@ -1150,7 +1150,7 @@ def test_no_projects(self): url = reverse( self.URL, - kwargs={"organization_slug": org.slug}, + kwargs={"organization_id_or_slug": org.slug}, ) with self.feature(self.FEATURES): diff --git a/tests/snuba/api/endpoints/test_organization_events_stats.py b/tests/snuba/api/endpoints/test_organization_events_stats.py index e4a5d92d0fcfa4..15b1770baa2868 100644 --- a/tests/snuba/api/endpoints/test_organization_events_stats.py +++ b/tests/snuba/api/endpoints/test_organization_events_stats.py @@ -69,7 +69,7 @@ def setUp(self): ) self.url = reverse( "sentry-api-0-organization-events-stats", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) self.features = {} @@ -221,7 +221,7 @@ def test_no_projects(self): self.login_as(user=self.user) url = reverse( - "sentry-api-0-organization-events-stats", kwargs={"organization_slug": org.slug} + "sentry-api-0-organization-events-stats", kwargs={"organization_id_or_slug": org.slug} ) response = self.do_request({}, url) @@ -1205,7 +1205,7 @@ def setUp(self): } self.url = reverse( "sentry-api-0-organization-events-stats", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) def test_no_top_events_with_project_field(self): @@ -2640,7 +2640,7 @@ def setUp(self): self.url = reverse( "sentry-api-0-organization-events-stats", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) def test_functions_dataset_simple(self): @@ -2705,7 +2705,7 @@ def setUp(self): self.url = reverse( "sentry-api-0-organization-events-stats", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) def test_functions_dataset_simple(self): diff --git a/tests/snuba/api/endpoints/test_organization_events_stats_mep.py b/tests/snuba/api/endpoints/test_organization_events_stats_mep.py index 521c1955d8641b..75a2c1a2b8d9bf 100644 --- a/tests/snuba/api/endpoints/test_organization_events_stats_mep.py +++ b/tests/snuba/api/endpoints/test_organization_events_stats_mep.py @@ -37,7 +37,7 @@ def setUp(self): self.url = reverse( "sentry-api-0-organization-events-stats", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) self.features = { "organizations:performance-use-metrics": True, @@ -967,7 +967,7 @@ def setUp(self): self.url = reverse( "sentry-api-0-organization-events-stats", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) self.features = { "organizations:on-demand-metrics-extraction-widgets": True, diff --git a/tests/snuba/api/endpoints/test_organization_events_stats_span_metrics.py b/tests/snuba/api/endpoints/test_organization_events_stats_span_metrics.py index c4ccc3418fa93f..b4568d49d1c3e4 100644 --- a/tests/snuba/api/endpoints/test_organization_events_stats_span_metrics.py +++ b/tests/snuba/api/endpoints/test_organization_events_stats_span_metrics.py @@ -25,7 +25,7 @@ def setUp(self): self.url = reverse( "sentry-api-0-organization-events-stats", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) self.features = { "organizations:performance-use-metrics": True, diff --git a/tests/snuba/api/endpoints/test_organization_events_trace.py b/tests/snuba/api/endpoints/test_organization_events_trace.py index fec51d4c3bc54b..89e359f8f45041 100644 --- a/tests/snuba/api/endpoints/test_organization_events_trace.py +++ b/tests/snuba/api/endpoints/test_organization_events_trace.py @@ -42,7 +42,7 @@ def setUp(self): self.url = reverse( self.url_name, kwargs={ - "organization_slug": self.project.organization.slug, + "organization_id_or_slug": self.project.organization.slug, "trace_id": self.trace_id, }, ) @@ -154,7 +154,7 @@ def test_no_projects(self): url = reverse( self.url_name, - kwargs={"organization_slug": org.slug, "trace_id": uuid4().hex}, + kwargs={"organization_id_or_slug": org.slug, "trace_id": uuid4().hex}, ) with self.feature(self.FEATURES): @@ -189,7 +189,10 @@ def test_bad_ids(self): # Fake trace id self.url = reverse( "sentry-api-0-organization-events-trace-light", - kwargs={"organization_slug": self.project.organization.slug, "trace_id": uuid4().hex}, + kwargs={ + "organization_id_or_slug": self.project.organization.slug, + "trace_id": uuid4().hex, + }, ) with self.feature(self.FEATURES): @@ -206,7 +209,7 @@ def test_bad_ids(self): self.url = reverse( "sentry-api-0-organization-events-trace-light", kwargs={ - "organization_slug": self.project.organization.slug, + "organization_id_or_slug": self.project.organization.slug, "trace_id": "not-a-trace", }, ) @@ -225,7 +228,10 @@ def test_no_roots(self): ) url = reverse( "sentry-api-0-organization-events-trace-light", - kwargs={"organization_slug": self.project.organization.slug, "trace_id": no_root_trace}, + kwargs={ + "organization_id_or_slug": self.project.organization.slug, + "trace_id": no_root_trace, + }, ) with self.feature(self.FEATURES): @@ -711,7 +717,7 @@ def test_no_projects(self): url = reverse( self.url_name, - kwargs={"organization_slug": org.slug, "trace_id": uuid4().hex}, + kwargs={"organization_id_or_slug": org.slug, "trace_id": uuid4().hex}, ) with self.feature(self.FEATURES): @@ -786,7 +792,7 @@ def test_detailed_trace_with_bad_tags(self): url = reverse( self.url_name, - kwargs={"organization_slug": self.project.organization.slug, "trace_id": trace}, + kwargs={"organization_id_or_slug": self.project.organization.slug, "trace_id": trace}, ) with self.feature(self.FEATURES): @@ -918,7 +924,10 @@ def test_multiple_roots(self): ) self.url = reverse( self.url_name, - kwargs={"organization_slug": self.project.organization.slug, "trace_id": trace_id}, + kwargs={ + "organization_id_or_slug": self.project.organization.slug, + "trace_id": trace_id, + }, ) with self.feature(self.FEATURES): response = self.client_get( @@ -1613,7 +1622,7 @@ def test_no_projects(self): url = reverse( self.url_name, - kwargs={"organization_slug": org.slug, "trace_id": uuid4().hex}, + kwargs={"organization_id_or_slug": org.slug, "trace_id": uuid4().hex}, ) with self.feature(self.FEATURES): @@ -1628,7 +1637,10 @@ def test_bad_ids(self): # Fake trace id self.url = reverse( self.url_name, - kwargs={"organization_slug": self.project.organization.slug, "trace_id": uuid4().hex}, + kwargs={ + "organization_id_or_slug": self.project.organization.slug, + "trace_id": uuid4().hex, + }, ) with self.feature(self.FEATURES): @@ -1649,7 +1661,7 @@ def test_bad_ids(self): self.url = reverse( self.url_name, kwargs={ - "organization_slug": self.project.organization.slug, + "organization_id_or_slug": self.project.organization.slug, "trace_id": "not-a-trace", }, ) diff --git a/tests/snuba/api/endpoints/test_organization_events_trends.py b/tests/snuba/api/endpoints/test_organization_events_trends.py index 748c6e8d60fafd..0d8ffd252035a1 100644 --- a/tests/snuba/api/endpoints/test_organization_events_trends.py +++ b/tests/snuba/api/endpoints/test_organization_events_trends.py @@ -50,7 +50,7 @@ def setUp(self): super().setUp() self.url = reverse( "sentry-api-0-organization-events-trends", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) self.features = {"organizations:performance-view": True} @@ -403,7 +403,7 @@ def setUp(self): super().setUp() self.url = reverse( "sentry-api-0-organization-events-trends-stats", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) self.features = {"organizations:performance-view": True} @@ -833,7 +833,7 @@ def setUp(self): self.login_as(user=self.user) self.url = reverse( "sentry-api-0-organization-events-trends-stats", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) self.day_ago = before_now(days=1).replace(hour=10, minute=0, second=0, microsecond=0) diff --git a/tests/snuba/api/endpoints/test_organization_events_vitals.py b/tests/snuba/api/endpoints/test_organization_events_vitals.py index 284a786bfc997e..c60baaf7df7c00 100644 --- a/tests/snuba/api/endpoints/test_organization_events_vitals.py +++ b/tests/snuba/api/endpoints/test_organization_events_vitals.py @@ -44,7 +44,7 @@ def do_request(self, query=None, features=None): self.login_as(user=self.user) url = reverse( "sentry-api-0-organization-events-vitals", - kwargs={"organization_slug": self.organization.slug}, + kwargs={"organization_id_or_slug": self.organization.slug}, ) with self.feature(features): @@ -326,7 +326,7 @@ def do_request(self, query=None, features=None): with self.feature(features): url = reverse( "sentry-api-0-organization-events-vitals", - kwargs={"organization_slug": self.organization.slug}, + kwargs={"organization_id_or_slug": self.organization.slug}, ) with self.feature(features): diff --git a/tests/snuba/api/endpoints/test_organization_measurements_meta.py b/tests/snuba/api/endpoints/test_organization_measurements_meta.py index 12aa2dd5e32d1e..463dae89a60cca 100644 --- a/tests/snuba/api/endpoints/test_organization_measurements_meta.py +++ b/tests/snuba/api/endpoints/test_organization_measurements_meta.py @@ -21,7 +21,7 @@ def setUp(self): self.day_ago = before_now(days=1).replace(hour=10, minute=0, second=0, microsecond=0) self.DEFAULT_METRIC_TIMESTAMP = self.day_ago self.url = reverse( - self.endpoint, kwargs={"organization_slug": self.project.organization.slug} + self.endpoint, kwargs={"organization_id_or_slug": self.project.organization.slug} ) self.features = {"organizations:performance-use-metrics": True} diff --git a/tests/snuba/api/endpoints/test_organization_metrics_meta.py b/tests/snuba/api/endpoints/test_organization_metrics_meta.py index 42fc66aed1f9b2..9990045d761d4a 100644 --- a/tests/snuba/api/endpoints/test_organization_metrics_meta.py +++ b/tests/snuba/api/endpoints/test_organization_metrics_meta.py @@ -26,7 +26,7 @@ def test_unparameterized_transactions(self): ) url = reverse( "sentry-api-0-organization-metrics-compatibility", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) response = self.client.get(url, format="json") @@ -41,7 +41,7 @@ def test_null_transaction(self): self.store_transaction_metric(1, tags={}, timestamp=self.min_ago) url = reverse( "sentry-api-0-organization-metrics-compatibility", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) response = self.client.get(url, format="json") @@ -55,7 +55,7 @@ def test_no_transaction(self): # Make current project incompatible by having nothing url = reverse( "sentry-api-0-organization-metrics-compatibility", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) response = self.client.get(url, format="json") @@ -71,7 +71,7 @@ def test_has_transaction(self): ) url = reverse( "sentry-api-0-organization-metrics-compatibility", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) response = self.client.get(url, format="json") @@ -107,7 +107,7 @@ def test_multiple_projects(self): ) url = reverse( "sentry-api-0-organization-metrics-compatibility", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) response = self.client.get(url, format="json") @@ -140,7 +140,7 @@ def test_unparameterized_transactions(self): ) url = reverse( "sentry-api-0-organization-metrics-compatibility-sums", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) response = self.client.get(url, format="json") @@ -154,7 +154,7 @@ def test_null_transaction(self): self.store_transaction_metric(1, tags={}, timestamp=self.min_ago) url = reverse( "sentry-api-0-organization-metrics-compatibility-sums", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) response = self.client.get(url, format="json") @@ -167,7 +167,7 @@ def test_no_transaction(self): # Make current project incompatible by having nothing url = reverse( "sentry-api-0-organization-metrics-compatibility-sums", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) response = self.client.get(url, format="json") @@ -182,7 +182,7 @@ def test_has_transaction(self): ) url = reverse( "sentry-api-0-organization-metrics-compatibility-sums", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) response = self.client.get(url, format="json") @@ -220,7 +220,7 @@ def test_multiple_projects(self): ) url = reverse( "sentry-api-0-organization-metrics-compatibility-sums", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) response = self.client.get(url, format="json") @@ -244,7 +244,7 @@ def test_counts_add_up_correctly(self): url = reverse( "sentry-api-0-organization-metrics-compatibility-sums", - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) response = self.client.get(url, format="json") diff --git a/tests/snuba/api/endpoints/test_organization_spans_aggregation.py b/tests/snuba/api/endpoints/test_organization_spans_aggregation.py index 42f326b8a93af4..c4db923ed535b6 100644 --- a/tests/snuba/api/endpoints/test_organization_spans_aggregation.py +++ b/tests/snuba/api/endpoints/test_organization_spans_aggregation.py @@ -180,7 +180,7 @@ def setUp(self): self.url = reverse( self.url_name, - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) @override_options({"indexed-spans.agg-span-waterfall.enable": True}) @@ -563,7 +563,7 @@ def setUp(self): self.url = reverse( self.url_name, - kwargs={"organization_slug": self.project.organization.slug}, + kwargs={"organization_id_or_slug": self.project.organization.slug}, ) @django_db_all diff --git a/tests/snuba/api/endpoints/test_organization_tagkey_values.py b/tests/snuba/api/endpoints/test_organization_tagkey_values.py index 171b1e42277834..5fdae029992a79 100644 --- a/tests/snuba/api/endpoints/test_organization_tagkey_values.py +++ b/tests/snuba/api/endpoints/test_organization_tagkey_values.py @@ -62,7 +62,7 @@ def test_simple(self): url = reverse( "sentry-api-0-organization-tagkey-values", - kwargs={"organization_slug": self.org.slug, "key": "fruit"}, + kwargs={"organization_id_or_slug": self.org.slug, "key": "fruit"}, ) response = self.client.get(url, format="json") assert response.status_code == 200, response.content diff --git a/tests/snuba/api/endpoints/test_organization_tags.py b/tests/snuba/api/endpoints/test_organization_tags.py index de76087d3aec26..98aa826d51fe4d 100644 --- a/tests/snuba/api/endpoints/test_organization_tags.py +++ b/tests/snuba/api/endpoints/test_organization_tags.py @@ -41,7 +41,9 @@ def test_simple(self): project_id=project.id, ) - url = reverse("sentry-api-0-organization-tags", kwargs={"organization_slug": org.slug}) + url = reverse( + "sentry-api-0-organization-tags", kwargs={"organization_id_or_slug": org.slug} + ) response = self.client.get(url, {"statsPeriod": "14d"}, format="json") assert response.status_code == 200, response.content @@ -58,7 +60,9 @@ def test_no_projects(self): org = self.create_organization(owner=user) self.login_as(user=user) - url = reverse("sentry-api-0-organization-tags", kwargs={"organization_slug": org.slug}) + url = reverse( + "sentry-api-0-organization-tags", kwargs={"organization_id_or_slug": org.slug} + ) response = self.client.get(url, format="json") assert response.status_code == 200, response.content @@ -74,7 +78,9 @@ def test_tag_caching(self, mock_snuba_query): self.login_as(user=user) with self.options({"snuba.tagstore.cache-tagkeys-rate": 1.0}): - url = reverse("sentry-api-0-organization-tags", kwargs={"organization_slug": org.slug}) + url = reverse( + "sentry-api-0-organization-tags", kwargs={"organization_id_or_slug": org.slug} + ) response = self.client.get(url, {"use_cache": "1", "statsPeriod": "14d"}, format="json") assert response.status_code == 200, response.content assert mock_snuba_query.call_count == 1 @@ -94,7 +100,9 @@ def test_different_statsperiod_caching(self, mock_snuba_query): self.login_as(user=user) with self.options({"snuba.tagstore.cache-tagkeys-rate": 1.0}): - url = reverse("sentry-api-0-organization-tags", kwargs={"organization_slug": org.slug}) + url = reverse( + "sentry-api-0-organization-tags", kwargs={"organization_id_or_slug": org.slug} + ) response = self.client.get(url, {"use_cache": "1", "statsPeriod": "14d"}, format="json") assert response.status_code == 200, response.content # Empty cache, we should query snuba @@ -117,7 +125,9 @@ def test_different_times_caching(self, mock_snuba_query): with self.options({"snuba.tagstore.cache-tagkeys-rate": 1.0}): start = iso_format(before_now(minutes=10)) end = iso_format(before_now(minutes=5)) - url = reverse("sentry-api-0-organization-tags", kwargs={"organization_slug": org.slug}) + url = reverse( + "sentry-api-0-organization-tags", kwargs={"organization_id_or_slug": org.slug} + ) response = self.client.get( url, {"use_cache": "1", "start": start, "end": end}, format="json" ) @@ -151,13 +161,17 @@ def test_different_times_retrieves_cache(self): ) self.login_as(user=user) - url = reverse("sentry-api-0-organization-tags", kwargs={"organization_slug": org.slug}) + url = reverse( + "sentry-api-0-organization-tags", kwargs={"organization_id_or_slug": org.slug} + ) response = self.client.get( url, {"use_cache": "1", "start": start, "end": end}, format="json" ) original_data = response.data - url = reverse("sentry-api-0-organization-tags", kwargs={"organization_slug": org.slug}) + url = reverse( + "sentry-api-0-organization-tags", kwargs={"organization_id_or_slug": org.slug} + ) response = self.client.get( url, {"use_cache": "1", "start": start, "end": end}, format="json" )