Skip to content

chore: Remove unused feature flags #32010

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions src/sentry/conf/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -933,14 +933,10 @@ def create_partitioned_queues(name):
"organizations:api-keys": False,
# Enable multiple Apple app-store-connect sources per project.
"organizations:app-store-connect-multiple": False,
# Enable explicit use of AND and OR in search.
"organizations:boolean-search": False,
# Enable the linked event feature in the issue details breadcrumb.
"organizations:breadcrumb-linked-event": False,
# Enable change alerts for an org
"organizations:change-alerts": True,
# Enable unfurling charts using the Chartcuterie service
"organizations:chart-unfurls": False,
# Enable alerting based on crash free sessions/users
"organizations:crash-rate-alerts": True,
# Enable creating organizations within sentry (if SENTRY_SINGLE_ORGANIZATION
Expand All @@ -950,8 +946,6 @@ def create_partitioned_queues(name):
"organizations:discover": False,
# Enable attaching arbitrary files to events.
"organizations:event-attachments": True,
# Enable inline preview of attachments.
"organizations:event-attachments-viewer": True,
# Enable Filters & Sampling in the org settings
"organizations:filters-and-sampling": False,
# Enable Dynamic Sampling errors in the org settings
Expand All @@ -960,14 +954,10 @@ def create_partitioned_queues(name):
"organizations:symbol-sources": True,
# Allow organizations to configure custom external symbol sources.
"organizations:custom-symbol-sources": True,
# Enable the events stream interface.
"organizations:events": False,
# Enable discover 2 basic functions
"organizations:discover-basic": True,
# Enable discover 2 custom queries and saved queries
"organizations:discover-query": True,
# Enable discover top events queries with other & higher options
"organizations:discover-top-events": False,
# Allows an org to have a larger set of project ownership rules per project
"organizations:higher-ownership-limit": False,
# Enable Performance view
Expand All @@ -990,8 +980,6 @@ def create_partitioned_queues(name):
"organizations:custom-event-title": True,
# Enable rule page.
"organizations:rule-page": False,
# Enable improved syntax highlighting + autocomplete on unified search
"organizations:improved-search": False,
# Enable incidents feature
"organizations:incidents": False,
# Flags for enabling CdcEventsDatasetSnubaSearchBackend in sentry.io. No effect in open-source
Expand All @@ -1014,8 +1002,6 @@ def create_partitioned_queues(name):
"organizations:release-health-check-metrics": False,
# True if differences between the metrics and sessions backend should be reported
"organizations:release-health-check-metrics-report": False,
# Enable metric aggregate in metric alert rule builder
"organizations:metric-alert-builder-aggregate": False,
# Enable threshold period in metric alert rule builder
"organizations:metric-alert-threshold-period": False,
# Enable integration functionality to create and link groups to issues on
Expand Down Expand Up @@ -1057,8 +1043,6 @@ def create_partitioned_queues(name):
"organizations:issues-in-dashboards": False,
# Enable widget viewer modal in dashboards
"organizations:widget-viewer-modal": False,
# Enable navigation features between Discover and Dashboards
"organizations:connect-discover-and-dashboards": False,
# Enable experimental performance improvements.
"organizations:enterprise-perf": False,
# Enable the API to importing CODEOWNERS for a project
Expand Down Expand Up @@ -1101,8 +1085,6 @@ def create_partitioned_queues(name):
"organizations:native-stack-trace-v2": False,
# Enable version 2 of reprocessing (completely distinct from v1)
"organizations:reprocessing-v2": False,
# Enable sorting+filtering by semantic version of a release
"organizations:semver": True,
# Enable the UI for the overage alert settings
"organizations:slack-overage-notifications": False,
# Enable basic SSO functionality, providing configurable single sign on
Expand All @@ -1114,16 +1096,12 @@ def create_partitioned_queues(name):
"organizations:sso-saml2": True,
# Enable workaround for migrating IdP instances
"organizations:sso-migration": False,
# Return unhandled information on the issue level
"organizations:unhandled-issue-flag": True,
# Enable percent-based conditions on issue rules
"organizations:issue-percent-filters": True,
# Enable the new images loaded design and features
"organizations:images-loaded-v2": True,
# Enable the mobile screenshots feature
"organizations:mobile-screenshots": False,
# Store release bundles as zip files instead of single files
"organizations:release-archives": False,
# Enable the release details performance section
"organizations:release-comparison-performance": False,
# Enable percent displays in issue stream
Expand Down
18 changes: 3 additions & 15 deletions src/sentry/features/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,41 +56,33 @@
default_manager.add("organizations:alert-rule-status-page", OrganizationFeature, True)
default_manager.add("organizations:alert-wizard-v3", OrganizationFeature, True)
default_manager.add("organizations:api-keys", OrganizationFeature)
default_manager.add("organizations:boolean-search", OrganizationFeature)
default_manager.add("organizations:breadcrumb-linked-event", OrganizationFeature, True)
default_manager.add("organizations:chart-unfurls", OrganizationFeature, True)
default_manager.add("organizations:connect-discover-and-dashboards", OrganizationFeature, True)
default_manager.add("organizations:crash-rate-alerts", OrganizationFeature, True)
default_manager.add("organizations:custom-event-title", OrganizationFeature)
default_manager.add("organizations:dashboard-grid-layout", OrganizationFeature, True)
default_manager.add("organizations:dashboards-metrics", OrganizationFeature, True)
default_manager.add("organizations:dashboards-template", OrganizationFeature, True)
default_manager.add("organizations:sandbox-kill-switch", OrganizationFeature, True)
default_manager.add("organizations:discover", OrganizationFeature)
default_manager.add("organizations:discover-top-events", OrganizationFeature, True)
default_manager.add("organizations:discover-use-snql", OrganizationFeature, True)
default_manager.add("organizations:enterprise-perf", OrganizationFeature)
default_manager.add("organizations:event-attachments-viewer", OrganizationFeature)
default_manager.add("organizations:events", OrganizationFeature)
default_manager.add("organizations:filters-and-sampling", OrganizationFeature, True)
default_manager.add("organizations:filters-and-sampling-error-rules", OrganizationFeature, True)
default_manager.add("organizations:grouping-stacktrace-ui", OrganizationFeature, True)
default_manager.add("organizations:grouping-title-ui", OrganizationFeature, True)
default_manager.add("organizations:grouping-tree-ui", OrganizationFeature, True)
default_manager.add("organizations:higher-ownership-limit", OrganizationFeature)
default_manager.add("organizations:images-loaded-v2", OrganizationFeature)
default_manager.add("organizations:improved-search", OrganizationFeature, True)
default_manager.add("organizations:invite-members", OrganizationFeature)
default_manager.add("organizations:invite-members-rate-limits", OrganizationFeature)
default_manager.add("organizations:issue-list-trend-sort", OrganizationFeature, True)
default_manager.add("organizations:issue-list-removal-action", OrganizationFeature, True)
default_manager.add("organizations:issue-list-trend-sort", OrganizationFeature, True)
default_manager.add("organizations:issue-percent-display", OrganizationFeature, True)
default_manager.add("organizations:issue-percent-filters", OrganizationFeature, True)
default_manager.add("organizations:issue-search-use-cdc-primary", OrganizationFeature, True)
default_manager.add("organizations:issue-search-use-cdc-secondary", OrganizationFeature, True)
default_manager.add("organizations:issues-in-dashboards", OrganizationFeature, True)
default_manager.add("organizations:large-debug-files", OrganizationFeature)
default_manager.add("organizations:metric-alert-builder-aggregate", OrganizationFeature)
default_manager.add("organizations:metric-alert-threshold-period", OrganizationFeature, True)
default_manager.add("organizations:metrics", OrganizationFeature, True)
default_manager.add("organizations:new-widget-builder-experience", OrganizationFeature, True)
Expand All @@ -100,7 +92,9 @@
default_manager.add("organizations:mobile-screenshots", OrganizationFeature, True)
default_manager.add("organizations:monitors", OrganizationFeature)
default_manager.add("organizations:native-stack-trace-v2", OrganizationFeature, True)
default_manager.add("organizations:new-weekly-report", OrganizationFeature, True)
default_manager.add("organizations:notification-all-recipients", OrganizationFeature, True)
# Only enabled in sentry.io to enable onboarding flows.
default_manager.add("organizations:onboarding", OrganizationFeature)
default_manager.add("organizations:org-subdomains", OrganizationFeature)
default_manager.add("organizations:performance-chart-interpolation", OrganizationFeature, True)
Expand All @@ -114,25 +108,20 @@
default_manager.add("organizations:project-event-date-limit", OrganizationFeature, True)
default_manager.add("organizations:prompt-dashboards", OrganizationFeature)
default_manager.add("organizations:related-events", OrganizationFeature)
default_manager.add("organizations:release-archives", OrganizationFeature)
default_manager.add("organizations:release-comparison-performance", OrganizationFeature, True)
default_manager.add("organizations:release-health-check-metrics", OrganizationFeature, True)
default_manager.add("organizations:release-health-check-metrics-report", OrganizationFeature, True)
default_manager.add("organizations:reprocessing-v2", OrganizationFeature)
default_manager.add("organizations:required-email-verification", OrganizationFeature, True) # NOQA
default_manager.add("organizations:rule-page", OrganizationFeature)
default_manager.add("organizations:selection-filters-v2", OrganizationFeature, True)
default_manager.add("organizations:semver", OrganizationFeature, True)
default_manager.add("organizations:set-grouping-config", OrganizationFeature)
default_manager.add("organizations:slack-overage-notifications", OrganizationFeature, True)
default_manager.add("organizations:sso-migration", OrganizationFeature)
default_manager.add("organizations:symbol-sources", OrganizationFeature)
default_manager.add("organizations:transaction-events", OrganizationFeature, True)
default_manager.add("organizations:transaction-metrics-extraction", OrganizationFeature)
default_manager.add("organizations:unhandled-issue-flag", OrganizationFeature)
default_manager.add("organizations:unified-span-view", OrganizationFeature, True)
default_manager.add("organizations:weekly-report-debugging", OrganizationFeature, True)
default_manager.add("organizations:new-weekly-report", OrganizationFeature, True)
default_manager.add("organizations:widget-library", OrganizationFeature, True)
default_manager.add("organizations:widget-viewer-modal", OrganizationFeature, True)

Expand Down Expand Up @@ -198,7 +187,6 @@
# features themselves in the manager with detections like this.
requires_snuba = (
"organizations:discover",
"organizations:events",
"organizations:global-views",
"organizations:incidents",
"organizations:minute-resolution-sessions",
Expand Down
5 changes: 1 addition & 4 deletions static/app/views/eventsV2/queryList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,7 @@ class QueryList extends React.Component<Props> {
/>
)}
renderContextMenu={() => (
<Feature
organization={organization}
features={['connect-discover-and-dashboards', 'dashboards-edit']}
>
<Feature organization={organization} features={['dashboards-edit']}>
{({hasFeature}) => this.renderDropdownMenu(menuItems(hasFeature))}
</Feature>
)}
Expand Down
2 changes: 1 addition & 1 deletion tests/js/spec/components/smartSearchBar/index.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('SmartSearchBar', function () {
key: 'firstRelease',
name: 'firstRelease',
};
organization = TestStubs.Organization({id: '123', features: ['improved-search']});
organization = TestStubs.Organization({id: '123'});

location = {
pathname: '/organizations/org-slug/recent-searches/',
Expand Down
7 changes: 4 additions & 3 deletions tests/js/spec/views/eventsV2/queryList.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,10 @@ describe('EventsV2 > QueryList', function () {
card = wrapper.find('QueryCard').last();
const menuItems = card.find('MenuItemWrap');

expect(menuItems.length).toEqual(2);
expect(menuItems.at(0).text()).toEqual('Duplicate Query');
expect(menuItems.at(1).text()).toEqual('Delete Query');
expect(menuItems.length).toEqual(3);
expect(menuItems.at(0).text()).toEqual('Add to Dashboard');
expect(menuItems.at(1).text()).toEqual('Duplicate Query');
expect(menuItems.at(2).text()).toEqual('Delete Query');
});

it('only renders Delete Query and Duplicate Query in context menu', async function () {
Expand Down
3 changes: 0 additions & 3 deletions tests/sentry/api/serializers/test_organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def test_simple(self):
"discover-basic",
"discover-query",
"event-attachments",
"event-attachments-viewer",
"images-loaded-v2",
"integrations-alert-rule",
"integrations-chat-unfurl",
Expand All @@ -52,13 +51,11 @@ def test_simple(self):
"minute-resolution-sessions",
"open-membership",
"relay",
"semver",
"shared-issues",
"sso-basic",
"sso-saml2",
"symbol-sources",
"team-insights",
"unhandled-issue-flag",
}

@mock.patch("sentry.features.batch_has")
Expand Down