Skip to content

Conversation

@mifu67
Copy link
Contributor

@mifu67 mifu67 commented Nov 21, 2025

This is causing requests to be incredibly slow. Since we don't need this on every open period, remove it from the serializer and figure out a different way to populate lastSeen.

@mifu67 mifu67 requested review from a team, kcons and malwilley November 21, 2025 23:37
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 21, 2025
from sentry.api.serializers import Serializer, register, serialize
from sentry.incidents.utils.process_update_helpers import calculate_event_date_from_update_date
from sentry.models.groupopenperiod import GroupOpenPeriod, get_last_checked_for_open_period
from sentry.models.groupopenperiod import GroupOpenPeriod
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Frontend still expects removed lastChecked field

The lastChecked field was removed from GroupOpenPeriodResponse and the serializer, but the frontend code at static/app/views/issueDetails/streamline/sidebar/firstLastSeenSection.tsx still accesses openPeriods?.[0]?.lastChecked to determine the last seen time. This causes the frontend to always fall back to group.lastSeen instead of the intended value, breaking the "Last seen" display for issues using open period checks.

Fix in Cursor Fix in Web

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine, it falls back the group.lastSeen if it's not there, though we should followup and remove it from the expected type

@mifu67 mifu67 merged commit 0e267de into master Nov 24, 2025
67 checks passed
@mifu67 mifu67 deleted the mifu67/aci/speed-up-gop-serializer branch November 24, 2025 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants