From ad0f2f5f25efbc91116b498a9b858f636bc6009c Mon Sep 17 00:00:00 2001 From: Scott Cooper Date: Fri, 30 May 2025 16:32:50 -0700 Subject: [PATCH] ref(issues): Remove project from group activity type It doesn't seem to actually exist on the serializer or in the api response. https://github.com/getsentry/sentry/blob/00f13de687e668fc0188d0e5e320dfdc0ad4deff/src/sentry/api/serializers/models/activity.py#L121-L127 --- .../uptime/uptimeDataSection.spec.tsx | 6 ---- .../feedbackItem/feedbackActivitySection.tsx | 3 +- static/app/components/resolutionBox.spec.tsx | 1 - static/app/stores/groupStore.spec.tsx | 1 - static/app/types/group.tsx | 1 - .../views/issueDetails/groupActivity.spec.tsx | 31 ------------------- .../streamline/occurrenceSummary.spec.tsx | 4 --- .../sidebar/activitySection.spec.tsx | 4 --- .../streamline/sidebar/sidebar.spec.tsx | 1 - tests/js/fixtures/activityFeed.ts | 21 ------------- 10 files changed, 1 insertion(+), 72 deletions(-) diff --git a/static/app/components/events/interfaces/uptime/uptimeDataSection.spec.tsx b/static/app/components/events/interfaces/uptime/uptimeDataSection.spec.tsx index c77530b1855d97..6827045cd2e0eb 100644 --- a/static/app/components/events/interfaces/uptime/uptimeDataSection.spec.tsx +++ b/static/app/components/events/interfaces/uptime/uptimeDataSection.spec.tsx @@ -22,14 +22,12 @@ describe('Uptime Data Section', function () { data: {}, id: '2', dateCreated: '2024-06-21T20:36:51.884284Z', - project, type: GroupActivityType.SET_RESOLVED, }, { data: {}, id: '1', dateCreated: '2024-06-20T20:36:51.884284Z', - project, type: GroupActivityType.FIRST_SEEN, }, ]; @@ -67,28 +65,24 @@ describe('Uptime Data Section', function () { data: {}, id: '4', dateCreated: '2024-06-22T22:36:51.884284Z', - project, type: GroupActivityType.SET_RESOLVED, }, { data: {}, id: '3', dateCreated: '2024-06-22T20:36:51.884284Z', - project, type: GroupActivityType.SET_REGRESSION, }, { data: {}, id: '2', dateCreated: '2024-06-21T20:36:51.884284Z', - project, type: GroupActivityType.SET_RESOLVED, }, { data: {}, id: '1', dateCreated: '2024-06-20T20:36:51.884284Z', - project, type: GroupActivityType.FIRST_SEEN, }, ]; diff --git a/static/app/components/feedback/feedbackItem/feedbackActivitySection.tsx b/static/app/components/feedback/feedbackItem/feedbackActivitySection.tsx index 0205d8d444f5f7..f5d9bb9443a566 100644 --- a/static/app/components/feedback/feedbackItem/feedbackActivitySection.tsx +++ b/static/app/components/feedback/feedbackItem/feedbackActivitySection.tsx @@ -88,12 +88,11 @@ function FeedbackActivitySection(props: Props) { data: n, type: GroupActivityType.NOTE, dateCreated: new Date().toISOString(), - project: feedbackItem.project, user: me, }; mutators.handleCreate(n, [newActivity, ...feedbackItem.activity], createOptions); }, - [createOptions, feedbackItem.activity, mutators, feedbackItem.project] + [createOptions, feedbackItem.activity, mutators] ); const handleUpdate = useCallback( diff --git a/static/app/components/resolutionBox.spec.tsx b/static/app/components/resolutionBox.spec.tsx index 1409cb5590ebc1..e4659cc29098b4 100644 --- a/static/app/components/resolutionBox.spec.tsx +++ b/static/app/components/resolutionBox.spec.tsx @@ -102,7 +102,6 @@ describe('ResolutionBox', function () { current_release_version: currentReleaseVersion, }, dateCreated: new Date().toISOString(), - project, }, ]} /> diff --git a/static/app/stores/groupStore.spec.tsx b/static/app/stores/groupStore.spec.tsx index adada2d59f5b24..fd8c9c185e4b17 100644 --- a/static/app/stores/groupStore.spec.tsx +++ b/static/app/stores/groupStore.spec.tsx @@ -251,7 +251,6 @@ describe('GroupStore', function () { id: '1', type: GroupActivityType.NOTE, dateCreated: '', - project: ProjectFixture(), data: {text: 'Orginal Text'}, }, ], diff --git a/static/app/types/group.tsx b/static/app/types/group.tsx index cd4a30248fa2ae..92187a634aa8e3 100644 --- a/static/app/types/group.tsx +++ b/static/app/types/group.tsx @@ -466,7 +466,6 @@ export enum GroupActivityType { interface GroupActivityBase { dateCreated: string; id: string; - project: Project; assignee?: string; issue?: Group; user?: null | User; diff --git a/static/app/views/issueDetails/groupActivity.spec.tsx b/static/app/views/issueDetails/groupActivity.spec.tsx index 168b060b2a68f6..7c4455ec4c75a6 100644 --- a/static/app/views/issueDetails/groupActivity.spec.tsx +++ b/static/app/views/issueDetails/groupActivity.spec.tsx @@ -59,7 +59,6 @@ describe('GroupActivity', function () { data: {text: 'Test Note'}, dateCreated: '2020-01-01T00:00:00', user: UserFixture(), - project, }, ], project, @@ -98,7 +97,6 @@ describe('GroupActivity', function () { type: GroupActivityType.MARK_REVIEWED, id: 'reviewed-1', dateCreated: '', - project: ProjectFixture(), data: {}, user, }, @@ -115,7 +113,6 @@ describe('GroupActivity', function () { activity: [ { dateCreated: '', - project: ProjectFixture(), type: GroupActivityType.SET_RESOLVED_IN_PULL_REQUEST, id: 'pr-1', data: { @@ -149,7 +146,6 @@ describe('GroupActivity', function () { user, dateCreated: '2021-10-01T15:31:38.950115Z', id: '117', - project: ProjectFixture(), type: GroupActivityType.ASSIGNED, }, ], @@ -171,7 +167,6 @@ describe('GroupActivity', function () { rule: 'path:something/*.py #workflow', user: UserFixture(), }, - project: ProjectFixture(), dateCreated: '2021-10-01T15:31:38.950115Z', id: '117', type: GroupActivityType.ASSIGNED, @@ -196,7 +191,6 @@ describe('GroupActivity', function () { integration: 'slack', user: UserFixture(), }, - project: ProjectFixture(), dateCreated: '2021-10-01T15:31:38.950115Z', id: '117', type: GroupActivityType.ASSIGNED, @@ -220,7 +214,6 @@ describe('GroupActivity', function () { integration: 'suspectCommitter', user: UserFixture(), }, - project: ProjectFixture(), dateCreated: '1999-10-01T15:31:38.950115Z', id: '117', type: GroupActivityType.ASSIGNED, @@ -247,7 +240,6 @@ describe('GroupActivity', function () { integration: 'lottery', user: UserFixture(), }, - project: ProjectFixture(), dateCreated: '1999-10-01T15:31:38.950115Z', id: '117', type: GroupActivityType.ASSIGNED, @@ -269,7 +261,6 @@ describe('GroupActivity', function () { { type: GroupActivityType.SET_RESOLVED_IN_COMMIT, id: '123', - project: ProjectFixture(), dateCreated: '', data: { commit: { @@ -296,7 +287,6 @@ describe('GroupActivity', function () { { type: GroupActivityType.SET_RESOLVED_IN_COMMIT, id: '123', - project: ProjectFixture(), dateCreated: '', data: { commit: { @@ -329,7 +319,6 @@ describe('GroupActivity', function () { { type: GroupActivityType.SET_RESOLVED_IN_COMMIT, id: '123', - project: ProjectFixture(), dateCreated: '', data: { commit: { @@ -383,7 +372,6 @@ describe('GroupActivity', function () { id: '123', user: null, type: GroupActivityType.ASSIGNED, - project: ProjectFixture(), data: { assignee: team.id, assigneeType: 'team', @@ -438,7 +426,6 @@ describe('GroupActivity', function () { { id: '123', type: GroupActivityType.SET_IGNORED, - project: ProjectFixture(), data: { ignoreUntilEscalating: true, }, @@ -457,7 +444,6 @@ describe('GroupActivity', function () { { id: '123', type: GroupActivityType.SET_UNRESOLVED, - project: ProjectFixture(), data: { forecast: 200, }, @@ -467,7 +453,6 @@ describe('GroupActivity', function () { { id: '124', type: GroupActivityType.SET_ESCALATING, - project: ProjectFixture(), data: { forecast: 400, }, @@ -491,7 +476,6 @@ describe('GroupActivity', function () { { id: '123', type: GroupActivityType.SET_UNRESOLVED, - project: ProjectFixture(), data: { forecast: 1, }, @@ -512,7 +496,6 @@ describe('GroupActivity', function () { { id: '123', type: GroupActivityType.SET_UNRESOLVED, - project: ProjectFixture(), data: { integration_id: '1', provider_key: 'jira', @@ -533,7 +516,6 @@ describe('GroupActivity', function () { { id: '123', type: GroupActivityType.SET_RESOLVED, - project: ProjectFixture(), data: { integration_id: '1', provider_key: 'jira', @@ -554,7 +536,6 @@ describe('GroupActivity', function () { { id: '123', type: GroupActivityType.SET_ESCALATING, - project: ProjectFixture(), data: { expired_snooze: { count: 400, @@ -580,7 +561,6 @@ describe('GroupActivity', function () { { id: '123', type: GroupActivityType.SET_ESCALATING, - project: ProjectFixture(), data: { expired_snooze: { user_count: 1, @@ -607,7 +587,6 @@ describe('GroupActivity', function () { { id: '123', type: GroupActivityType.SET_ESCALATING, - project: ProjectFixture(), data: { expired_snooze: { until: date, @@ -633,7 +612,6 @@ describe('GroupActivity', function () { { id: '123', type: GroupActivityType.SET_IGNORED, - project: ProjectFixture(), data: {}, user: UserFixture(), dateCreated, @@ -650,7 +628,6 @@ describe('GroupActivity', function () { { id: '123', type: GroupActivityType.SET_RESOLVED_IN_RELEASE, - project: ProjectFixture(), data: { version: 'frontend@1.0.0', }, @@ -671,7 +648,6 @@ describe('GroupActivity', function () { { id: '123', type: GroupActivityType.SET_RESOLVED_IN_RELEASE, - project: ProjectFixture(), data: { current_release_version: 'frontend@1.0.0', }, @@ -693,7 +669,6 @@ describe('GroupActivity', function () { { id: '123', type: GroupActivityType.SET_REGRESSION, - project: ProjectFixture(), data: {}, dateCreated, }, @@ -709,7 +684,6 @@ describe('GroupActivity', function () { { id: '123', type: GroupActivityType.SET_REGRESSION, - project: ProjectFixture(), data: { version: 'frontend@1.0.0', }, @@ -729,7 +703,6 @@ describe('GroupActivity', function () { { id: '123', type: GroupActivityType.SET_REGRESSION, - project: ProjectFixture(), data: { version: 'frontend@2.0.0', resolved_in_version: 'frontend@1.0.0', @@ -754,7 +727,6 @@ describe('GroupActivity', function () { { id: '123', type: GroupActivityType.SET_REGRESSION, - project: ProjectFixture(), data: { version: 'frontend@abc1', resolved_in_version: 'frontend@abc2', @@ -779,7 +751,6 @@ describe('GroupActivity', function () { { id: '123', type: GroupActivityType.SET_PRIORITY, - project: ProjectFixture(), data: { priority: PriorityLevel.HIGH, reason: 'escalating', @@ -800,7 +771,6 @@ describe('GroupActivity', function () { { id: '123', type: GroupActivityType.SET_PRIORITY, - project: ProjectFixture(), data: { priority: PriorityLevel.LOW, reason: 'ongoing', @@ -821,7 +791,6 @@ describe('GroupActivity', function () { { id: '123', type: GroupActivityType.DELETED_ATTACHMENT, - project: ProjectFixture(), data: {}, dateCreated, user: UserFixture(), diff --git a/static/app/views/issueDetails/streamline/occurrenceSummary.spec.tsx b/static/app/views/issueDetails/streamline/occurrenceSummary.spec.tsx index fc93ecdb20cc29..06e4ea6c38adb1 100644 --- a/static/app/views/issueDetails/streamline/occurrenceSummary.spec.tsx +++ b/static/app/views/issueDetails/streamline/occurrenceSummary.spec.tsx @@ -1,7 +1,6 @@ import {EventFixture} from 'sentry-fixture/event'; import {GroupFixture} from 'sentry-fixture/group'; import {OrganizationFixture} from 'sentry-fixture/organization'; -import {ProjectFixture} from 'sentry-fixture/project'; import {render, screen} from 'sentry-test/reactTestingLibrary'; import {resetMockDate, setMockDate} from 'sentry-test/utils'; @@ -16,7 +15,6 @@ import {OccurrenceSummary} from 'sentry/views/issueDetails/streamline/occurrence describe('OccurrenceSummary', () => { const organization = OrganizationFixture(); - const project = ProjectFixture(); afterEach(() => { resetMockDate(); @@ -41,14 +39,12 @@ describe('OccurrenceSummary', () => { type: GroupActivityType.SET_RESOLVED, dateCreated: '2025-01-02T11:00:00Z', data: {}, - project, id: '2', }, { type: GroupActivityType.FIRST_SEEN, dateCreated: '2025-01-01T11:00:00Z', data: {}, - project, id: '1', }, ], diff --git a/static/app/views/issueDetails/streamline/sidebar/activitySection.spec.tsx b/static/app/views/issueDetails/streamline/sidebar/activitySection.spec.tsx index 399337cca5343e..3d69dcf5ceceae 100644 --- a/static/app/views/issueDetails/streamline/sidebar/activitySection.spec.tsx +++ b/static/app/views/issueDetails/streamline/sidebar/activitySection.spec.tsx @@ -35,7 +35,6 @@ describe('StreamlinedActivitySection', function () { data: {text: 'Test Note'}, dateCreated: '2020-01-01T00:00:00', user, - project, }, ], project, @@ -144,7 +143,6 @@ describe('StreamlinedActivitySection', function () { data: {text: 'Group Test'}, dateCreated: '2020-01-01T00:00:00', user, - project, }, ], project, @@ -191,7 +189,6 @@ describe('StreamlinedActivitySection', function () { data: {text: 'Test Note'}, dateCreated: '2020-01-01T00:00:00', user: UserFixture({id: '2'}), - project, }, ], project, @@ -276,7 +273,6 @@ describe('StreamlinedActivitySection', function () { data: {text: 'Resolved'}, dateCreated: '2020-01-01T00:00:00', user, - project, }); const updatedActivityGroup = GroupFixture({ diff --git a/static/app/views/issueDetails/streamline/sidebar/sidebar.spec.tsx b/static/app/views/issueDetails/streamline/sidebar/sidebar.spec.tsx index 902e1843be2669..9a21fee07a6599 100644 --- a/static/app/views/issueDetails/streamline/sidebar/sidebar.spec.tsx +++ b/static/app/views/issueDetails/streamline/sidebar/sidebar.spec.tsx @@ -32,7 +32,6 @@ describe('StreamlinedSidebar', function () { data: {text: activityContent}, dateCreated: '2020-01-01T00:00:00', user, - project, }, ], }); diff --git a/tests/js/fixtures/activityFeed.ts b/tests/js/fixtures/activityFeed.ts index 8a7fc42d83b3ed..8c4661bd2924cd 100644 --- a/tests/js/fixtures/activityFeed.ts +++ b/tests/js/fixtures/activityFeed.ts @@ -10,27 +10,6 @@ export function ActivityFeedFixture(params: Partial = {}): Activity { return { data: {text: 'Very interesting comment'}, dateCreated: '2019-04-29T21:43:32.280Z', - project: ProjectFixture({ - features: [ - 'releases', - 'sample-events', - 'minidump', - 'rate-limits', - 'similarity-indexing', - 'similarity-view', - 'data-forwarding', - ], - isInternal: true, - dateCreated: '2019-03-09T06:52:19.832Z', - id: '1', - slug: 'internal', - name: 'Internal', - hasAccess: true, - isBookmarked: false, - platform: undefined, - firstEvent: '2019-03-09T06:56:15Z', - isMember: true, - }), user: UserFixture({ username: 'billy@sentry.io', lastLogin: '2019-04-23T00:10:19.787Z',