Browse Source

ref(perf): Remove tag explorer feature flags (#29574)

* ref(perf): Remove tag explorer feature flags

Tag explorer is now GA'd so we can remove the associated feature flags and simplify some of the logic between the tag-page and tag-explorer split.
Kev 3 years ago
parent
commit
94f943cca9

+ 7 - 10
static/app/views/performance/transactionSummary/header.tsx

@@ -258,16 +258,13 @@ class TransactionHeader extends React.Component<Props> {
               {t('Overview')}
               {t('Overview')}
             </ListLink>
             </ListLink>
             {this.renderWebVitalsTab()}
             {this.renderWebVitalsTab()}
-            <Feature features={['organizations:performance-tag-page']}>
-              <ListLink
-                to={tagsTarget}
-                isActive={() => currentTab === Tab.Tags}
-                onClick={this.trackTabClick(Tab.Tags)}
-              >
-                {t('Tags')}
-                <FeatureBadge type="new" noTooltip />
-              </ListLink>
-            </Feature>
+            <ListLink
+              to={tagsTarget}
+              isActive={() => currentTab === Tab.Tags}
+              onClick={this.trackTabClick(Tab.Tags)}
+            >
+              {t('Tags')}
+            </ListLink>
             <Feature features={['organizations:performance-events-page']}>
             <Feature features={['organizations:performance-events-page']}>
               <ListLink
               <ListLink
                 to={eventsTarget}
                 to={eventsTarget}

+ 8 - 14
static/app/views/performance/transactionSummary/transactionOverview/content.tsx

@@ -4,7 +4,6 @@ import styled from '@emotion/styled';
 import {Location} from 'history';
 import {Location} from 'history';
 import omit from 'lodash/omit';
 import omit from 'lodash/omit';
 
 
-import Feature from 'app/components/acl/feature';
 import TransactionsList, {DropdownOption} from 'app/components/discover/transactionsList';
 import TransactionsList, {DropdownOption} from 'app/components/discover/transactionsList';
 import SearchBar from 'app/components/events/searchBar';
 import SearchBar from 'app/components/events/searchBar';
 import GlobalSdkUpdateAlert from 'app/components/globalSdkUpdateAlert';
 import GlobalSdkUpdateAlert from 'app/components/globalSdkUpdateAlert';
@@ -350,19 +349,14 @@ class SummaryContent extends React.Component<Props> {
             })}
             })}
             forceLoading={isLoading}
             forceLoading={isLoading}
           />
           />
-          <Feature
-            requireAll={false}
-            features={['performance-tag-explorer', 'performance-tag-page']}
-          >
-            <TagExplorer
-              eventView={eventView}
-              organization={organization}
-              location={location}
-              projects={projects}
-              transactionName={transactionName}
-              currentFilter={spanOperationBreakdownFilter}
-            />
-          </Feature>
+          <TagExplorer
+            eventView={eventView}
+            organization={organization}
+            location={location}
+            projects={projects}
+            transactionName={transactionName}
+            currentFilter={spanOperationBreakdownFilter}
+          />
           <RelatedIssues
           <RelatedIssues
             organization={organization}
             organization={organization}
             location={location}
             location={location}

+ 12 - 46
static/app/views/performance/transactionSummary/transactionOverview/tagExplorer.tsx

@@ -3,11 +3,9 @@ import {browserHistory} from 'react-router';
 import styled from '@emotion/styled';
 import styled from '@emotion/styled';
 import {Location, LocationDescriptorObject} from 'history';
 import {Location, LocationDescriptorObject} from 'history';
 
 
-import Feature from 'app/components/acl/feature';
 import {GuideAnchor} from 'app/components/assistant/guideAnchor';
 import {GuideAnchor} from 'app/components/assistant/guideAnchor';
 import Button from 'app/components/button';
 import Button from 'app/components/button';
 import {SectionHeading} from 'app/components/charts/styles';
 import {SectionHeading} from 'app/components/charts/styles';
-import FeatureBadge from 'app/components/featureBadge';
 import GridEditable, {
 import GridEditable, {
   COL_WIDTH_UNDEFINED,
   COL_WIDTH_UNDEFINED,
   GridColumn,
   GridColumn,
@@ -352,18 +350,9 @@ class _TagExplorer extends React.Component<Props> {
         query: {...location.query, tagKey: dataRow.tags_key},
         query: {...location.query, tagKey: dataRow.tags_key},
       });
       });
       return (
       return (
-        <Feature features={['performance-tag-page']} organization={organization}>
-          {({hasFeature}) => {
-            if (hasFeature) {
-              return (
-                <Link to={target} onClick={() => this.onTagKeyClick()}>
-                  {dataRow.tags_key}
-                </Link>
-              );
-            }
-            return dataRow.tags_key;
-          }}
-        </Feature>
+        <Link to={target} onClick={() => this.onTagKeyClick()}>
+          {dataRow.tags_key}
+        </Link>
       );
       );
     }
     }
 
 
@@ -378,27 +367,7 @@ class _TagExplorer extends React.Component<Props> {
           handleCellAction={this.handleCellAction(column, dataRow.tags_value, actionRow)}
           handleCellAction={this.handleCellAction(column, dataRow.tags_value, actionRow)}
           allowActions={allowActions}
           allowActions={allowActions}
         >
         >
-          <Feature features={['performance-tag-page']} organization={organization}>
-            {({hasFeature}) => {
-              if (hasFeature) {
-                return <div className="truncate">{dataRow.tags_value}</div>;
-              }
-              return (
-                <Link
-                  to=""
-                  onClick={() =>
-                    this.handleTagValueClick(
-                      location,
-                      dataRow.tags_key,
-                      dataRow.tags_value
-                    )
-                  }
-                >
-                  <TagValue row={dataRow} />
-                </Link>
-              );
-            }}
-          </Feature>
+          <div className="truncate">{dataRow.tags_value}</div>
         </CellAction>
         </CellAction>
       );
       );
     }
     }
@@ -560,18 +529,15 @@ function TagsHeader(props: HeaderProps) {
     <Header>
     <Header>
       <div>
       <div>
         <SectionHeading>{t('Suspect Tags')}</SectionHeading>
         <SectionHeading>{t('Suspect Tags')}</SectionHeading>
-        <FeatureBadge type="new" />
       </div>
       </div>
-      <Feature features={['performance-tag-page']} organization={organization}>
-        <Button
-          onClick={handleViewAllTagsClick}
-          to={viewAllTarget}
-          size="small"
-          data-test-id="tags-explorer-open-tags"
-        >
-          {t('View All Tags')}
-        </Button>
-      </Feature>
+      <Button
+        onClick={handleViewAllTagsClick}
+        to={viewAllTarget}
+        size="small"
+        data-test-id="tags-explorer-open-tags"
+      >
+        {t('View All Tags')}
+      </Button>
       <StyledPagination pageLinks={pageLinks} onCursor={handleCursor} size="small" />
       <StyledPagination pageLinks={pageLinks} onCursor={handleCursor} size="small" />
     </Header>
     </Header>
   );
   );

+ 0 - 1
static/app/views/performance/transactionSummary/transactionTags/index.tsx

@@ -31,7 +31,6 @@ function TransactionTags(props: Props) {
       getDocumentTitle={getDocumentTitle}
       getDocumentTitle={getDocumentTitle}
       generateEventView={generateEventView}
       generateEventView={generateEventView}
       childComponent={TagsPageContent}
       childComponent={TagsPageContent}
-      features={['performance-tag-page']}
     />
     />
   );
   );
 }
 }

+ 2 - 20
tests/acceptance/test_performance_summary.py

@@ -10,11 +10,7 @@ from sentry.utils.samples import load_data
 
 
 from .page_objects.transaction_summary import TransactionSummaryPage
 from .page_objects.transaction_summary import TransactionSummaryPage
 
 
-FEATURES = {
-    "organizations:performance-view": True,
-    "organizations:performance-tag-explorer": False,
-    "organizations:performance-tag-page": False,
-}
+FEATURES = {"organizations:performance-view": True}
 
 
 
 
 def make_event(event_data):
 def make_event(event_data):
@@ -65,11 +61,6 @@ class PerformanceSummaryTest(AcceptanceTestCase, SnubaTestCase):
         with self.feature(FEATURES):
         with self.feature(FEATURES):
             self.browser.get(self.path)
             self.browser.get(self.path)
             self.page.wait_until_loaded()
             self.page.wait_until_loaded()
-            # This test is flakey in that we sometimes load this page before the event is processed
-            # depend on pytest-retry to reload the page
-            self.browser.wait_until_not(
-                '[data-test-id="grid-editable"] [data-test-id="empty-state"]', timeout=2
-            )
             # We have to wait for this again because there are loaders inside of the table
             # We have to wait for this again because there are loaders inside of the table
             self.page.wait_until_loaded()
             self.page.wait_until_loaded()
             self.browser.snapshot("performance summary - with data")
             self.browser.snapshot("performance summary - with data")
@@ -109,9 +100,7 @@ class PerformanceSummaryTest(AcceptanceTestCase, SnubaTestCase):
         event = make_event(event_data)
         event = make_event(event_data)
         self.store_event(data=event, project_id=self.project.id)
         self.store_event(data=event, project_id=self.project.id)
 
 
-        features = dict(FEATURES)
-        features["organizations:performance-tag-page"] = True
-        with self.feature(features):
+        with self.feature(FEATURES):
             self.browser.get(tags_path)
             self.browser.get(tags_path)
             self.page.wait_until_loaded()
             self.page.wait_until_loaded()
             self.browser.snapshot("transaction summary tags page")
             self.browser.snapshot("transaction summary tags page")
@@ -224,12 +213,5 @@ class PerformanceSummaryTest(AcceptanceTestCase, SnubaTestCase):
         with self.feature(FEATURES):
         with self.feature(FEATURES):
             self.browser.get(self.path)
             self.browser.get(self.path)
             self.page.wait_until_loaded()
             self.page.wait_until_loaded()
-            # This test is flakey in that we sometimes load this page before the event is processed
-            # depend on pytest-retry to reload the page
-            self.browser.wait_until_not(
-                '[data-test-id="grid-editable"] [data-test-id="empty-state"]', timeout=2
-            )
-            # We have to wait for this again because there are loaders inside of the table
-            self.page.wait_until_loaded()
             self.browser.click('[data-test-id="set-transaction-threshold"]')
             self.browser.click('[data-test-id="set-transaction-threshold"]')
             self.browser.snapshot("transaction threshold modal")
             self.browser.snapshot("transaction threshold modal")

+ 5 - 1
tests/js/spec/views/performance/transactionSummary.spec.jsx

@@ -90,6 +90,10 @@ describe('Performance > TransactionSummary', function () {
       url: '/prompts-activity/',
       url: '/prompts-activity/',
       body: {},
       body: {},
     });
     });
+    MockApiClient.addMockResponse({
+      url: '/organizations/org-slug/events-facets-performance/',
+      body: {},
+    });
 
 
     // Mock totals for the sidebar and other summary data
     // Mock totals for the sidebar and other summary data
     MockApiClient.addMockResponse({
     MockApiClient.addMockResponse({
@@ -491,7 +495,7 @@ describe('Performance > TransactionSummary', function () {
     wrapper.update();
     wrapper.update();
 
 
     const pagination = wrapper.find('Pagination');
     const pagination = wrapper.find('Pagination');
-    expect(pagination).toHaveLength(1);
+    expect(pagination).toHaveLength(2);
 
 
     // Click the 'next' button'
     // Click the 'next' button'
     pagination.find('button[aria-label="Next"]').simulate('click');
     pagination.find('button[aria-label="Next"]').simulate('click');

+ 4 - 0
tests/js/spec/views/performance/transactionSummary/content.spec.tsx

@@ -80,6 +80,10 @@ describe('Transaction Summary Content', function () {
       url: '/organizations/org-slug/events-stats/',
       url: '/organizations/org-slug/events-stats/',
       body: [],
       body: [],
     });
     });
+    MockApiClient.addMockResponse({
+      url: '/organizations/org-slug/events-facets-performance/',
+      body: {},
+    });
     MockApiClient.addMockResponse({
     MockApiClient.addMockResponse({
       url: '/organizations/org-slug/events-has-measurements/',
       url: '/organizations/org-slug/events-has-measurements/',
       body: {measurements: false},
       body: {measurements: false},

+ 1 - 1
tests/js/spec/views/performance/transactionSummary/tagExplorer.spec.jsx

@@ -173,7 +173,7 @@ describe('TagExplorer', function () {
       {
       {
         project: '123',
         project: '123',
       },
       },
-      ['performance-tag-page']
+      []
     );
     );
 
 
     const wrapper = mountWithTheme(
     const wrapper = mountWithTheme(

+ 1 - 1
tests/js/spec/views/performance/transactionTags/index.spec.jsx

@@ -8,7 +8,7 @@ import ProjectsStore from 'sentry/stores/projectsStore';
 import TransactionTags from 'sentry/views/performance/transactionSummary/transactionTags';
 import TransactionTags from 'sentry/views/performance/transactionSummary/transactionTags';
 
 
 function initializeData({query} = {query: {}}) {
 function initializeData({query} = {query: {}}) {
-  const features = ['discover-basic', 'performance-view', 'performance-tag-page'];
+  const features = ['discover-basic', 'performance-view'];
   const organization = TestStubs.Organization({
   const organization = TestStubs.Organization({
     features,
     features,
     projects: [TestStubs.Project()],
     projects: [TestStubs.Project()],