Skip to content
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

ref(insights): Replace usage of <ReleaseSeries> in <InsightsTimeSeriesWidget> #86300

Merged
merged 5 commits into from
Mar 5, 2025

Conversation

billyvg
Copy link
Member

@billyvg billyvg commented Mar 4, 2025

This reverts commit 3febd2b and extends the original PR

It was reverted because it was causing crashes (https://sentry.sentry.io/issues/6352301875/?project=11276&referrer=github-pr-bot) due to a cache key conflict in react-query between useQuery and useInfiniteQuery (read more about it here). This would happen in Sentry if you visited an insights page (which uses an "infinite" query) and then went to e.g. the issue details page (which has it's own hook useReleaseMarkLineSeries that uses a "normal" query). Both queries use the same cache key because infinite queries handles the cursor param for us (thus it not being part of the query key).

I've made some additional changes to the hook: it's now moved to app/utils as it'll be needed in other places. it's also more generic now.

From the original PR:

This will be needed for the new release bubbles feature as we will show releases on the mini widgets instead of only on fullscreen. Using <ReleaseSeries> renderer will cause duplicate requests to the API.

ref #85779

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 4, 2025
@billyvg billyvg changed the title Reapply "ref(insights): Replace usage of <ReleaseSeries> in <InsightsTimeSeriesWidget> (#86129)" ref(insights): Replace usage of <ReleaseSeries> in <InsightsTimeSeriesWidget> Mar 4, 2025
Comment on lines 13 to 15
datetime: Parameters<typeof normalizeDateTimeParams>[0];
environments: readonly string[];
projects: readonly number[];
Copy link
Member Author

Choose a reason for hiding this comment

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

I decided to change this from using PageFilters because it was annoying to use this when you don't give it pagefilter selection params directly (e.g. issue details uses eventView). Instead, since we pass the datetime options to normalizeDateTimeParams, use its param type.

Comment on lines 17 to 21
/**
* Max number of pages to fetch. Default is 10 pages, which should be
* sufficient to fetch "all" releases.
*/
maxPages?: number;
Copy link
Member Author

Choose a reason for hiding this comment

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

Also decided to add this so we can control the # of pages to fetch and to limit the damage if something were to go wrong or if an org has more releases than we expect. For reference, Sentry fetches ~3 pages for a 90d window.

@@ -62,6 +62,7 @@ export type ApiQueryKey =
Record<string, any>,
Record<string, any>
>,
additionalKey?: string,
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the better fix would be to have useInfiniteApiQuery always append an additional ’infinite’ key. This would avoid future conflicts if the same endpoint is used as query and infinite query. I think there’s only one other usage of useInfiniteApiQuery so it shouldn’t be a huge impact.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree, though it gets kind of messy because queryKey can be 1 or 2 elements

I suppose we can check the queryKey length and do something like:

  const query = useInfiniteQuery({
    queryKey:
      queryKey.length === 1
        ? ([...queryKey, {}, 'infinite'] as const)
        : ([...queryKey, 'infinite'] as const),

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah that’s not too bad. What it would then take is to make an InfiniteApiQueryKey type that we would use in fetchInfiniteQuery. useInfiniteApiQuery would still accept an ApiQueryKey, and we would do the transformation internally.

I split up the types a bit to get there:

type UrlOnly = readonly [url: string];
type UrlWithOptions = readonly [
  url: string,
  options: QueryKeyEndpointOptions<
    Record<string, string>,
    Record<string, any>,
    Record<string, any>
  >,
];

export type ApiQueryKey = UrlOnly | UrlWithOptions;

type InfiniteApiQueryKey = readonly [...UrlWithOptions, {type: 'infinite'}];

Copy link
Member Author

Choose a reason for hiding this comment

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

sgtm, will do this in a followup

Comment on lines 44 to 47
const releases =
data?.pages.flatMap(([pageData]) =>
pageData.map(({date, version}) => ({timestamp: date, version}))
) ?? [];
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved this mapping to where it's needed

@billyvg billyvg marked this pull request as ready for review March 4, 2025 17:30
@billyvg billyvg requested a review from a team as a code owner March 4, 2025 17:30
@billyvg billyvg requested review from gggritso and TkDodo March 4, 2025 17:31
Copy link
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

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

👍🏻 🔨

'load-all',
],
...queryOptions,
enabled: currentNumberPages.current < maxPages,
Copy link
Contributor

Choose a reason for hiding this comment

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

I don’t think disabling when the number of pages is reached is necessary - the effect will stop fetching anyways.

});

useEffect(() => {
if (!isFetching && hasNextPage && currentNumberPages.current + 1 < maxPages) {
Copy link
Contributor

Choose a reason for hiding this comment

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

tracking current pages in a ref is something you could also achieve by computing the number from the query result:

const currentNumberPages = data?.pages.length ?? 0

you can compute this outside of the useEffect, then set it as a dependency and use it inside.

@@ -62,6 +62,7 @@ export type ApiQueryKey =
Record<string, any>,
Record<string, any>
>,
additionalKey?: string,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the better fix would be to have useInfiniteApiQuery always append an additional ’infinite’ key. This would avoid future conflicts if the same endpoint is used as query and infinite query. I think there’s only one other usage of useInfiniteApiQuery so it shouldn’t be a huge impact.

Copy link

codecov bot commented Mar 5, 2025

Bundle Report

Changes will increase total bundle size by 123.22kB (0.29%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
app-webpack-bundle-array-push 42.41MB 123.22kB (0.29%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: app-webpack-bundle-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
chunks/app_components_avatar_actorAvatar_tsx-app_components_avatar_avatarList_tsx-app_components_cha-e41958.*.js 6.6kB 1.38MB 0.48%
chunks/app_components_assigneeBadge_tsx-app_components_charts_components_markLine_tsx-app_components-4285bc.*.js 1.65kB 1.16MB 0.14%
chunks/app_actionCreators_redirectToProject_tsx-app_actionCreators_sudoModal_tsx-app_components_aler-d18754.*.js (New) 453.19kB 453.19kB 100.0% 🚀
chunks/app_components_core_input_inputGroup_stories_tsx.*.js 766 bytes 383.3kB 0.2%
chunks/app_views_issueDetails_groupEventDetails_groupEventDetails_tsx.*.js -4 bytes 361.58kB -0.0%
chunks/app_components_breadcrumbs_tsx-app_components_charts_chartZoom_tsx-app_components_charts_rele-5771a6.*.js (New) 349.88kB 349.88kB 100.0% 🚀
chunks/app_actionCreators_preferences_tsx-app_components_avatar_actorAvatar_tsx-app_components_confi-71c9ce.*.js 31 bytes 301.22kB 0.01%
chunks/app_utils_duration_intervalToMilliseconds_tsx-app_views_dashboards_dashboard_tsx-app_views_da-03e4f7.*.js 248 bytes 293.81kB 0.08%
chunks/app_components_events_eventEntries_tsx.*.js -1.43kB 248.15kB -0.57%
chunks/app_views_issueDetails_groupDetails_tsx.*.js -47 bytes 174.72kB -0.03%
chunks/app_components_core_switch_index_stories_tsx.*.js 138.61kB 148.53kB 1397.25% ⚠️
chunks/app_views_traces_content_tsx-node_modules_lodash_omitBy_js-node_modules_lodash_partialRight_j-d4a98b.*.js 1.87kB 137.19kB 1.38%
chunks/app_components_charts_components_dataZoomInside_tsx-app_components_charts_components_toolBox_-e4ffca.*.js 1.73kB 136.96kB 1.28%
chunks/app_components_charts_areaChart_tsx-app_components_charts_chartZoom_tsx-app_components_charts-9c7462.*.js 103 bytes 118.23kB 0.09%
chunks/app_components_events_interfaces_spans_traceView_tsx.*.js 1 bytes 116.93kB 0.0%
chunks/app_components_charts_components_dataZoomInside_tsx-app_components_charts_components_toolBox_-b11744.*.js (New) 116.86kB 116.86kB 100.0% 🚀
chunks/app_data_timezones_tsx-app_views_alerts_builder_builderBreadCrumbs_tsx-app_views_alerts_rules-612e42.*.js 1 bytes 114.44kB 0.0%
chunks/app_views_performance_landing_widgets_components_widgetChartRow_tsx-app_views_performance_table_tsx.*.js -668 bytes 113.08kB -0.59%
entrypoints/app.js -82 bytes 108.47kB -0.08%
chunks/app_components_events_interfaces_crashContent_stackTrace_rawContent_tsx-app_utils_useProjectF-a8d2cf.*.js 1 bytes 107.85kB 0.0%
chunks/app_components_core_badge_tag_stories_tsx.*.js -70 bytes 103.93kB -0.07%
chunks/app_components_breadcrumbs_tsx-app_components_charts_areaChart_tsx-app_components_charts_barC-6bab73.*.js 103 bytes 98.36kB 0.1%
chunks/app_components_charts_components_dataZoomInside_tsx-app_components_charts_components_toolBox_-66d8ed.*.js 54 bytes 86.3kB 0.06%
chunks/app_views_performance_transactionSummary_transactionSpans_spanDetails_index_tsx.*.js 11.85kB 71.49kB 19.86% ⚠️
chunks/app_views_performance_transactionSummary_pageLayout_tsx.*.js 55 bytes 69.31kB 0.08%
chunks/app_views_organizationStats_index_tsx.*.js 1 bytes 66.07kB 0.0%
chunks/app_components_charts_areaChart_tsx-app_components_charts_components_markArea_tsx-app_compone-c91245.*.js (New) 64.53kB 64.53kB 100.0% 🚀
chunks/app_views_settings_organizationIntegrations_configureIntegration_tsx.*.js -1 bytes 63.76kB -0.0%
chunks/app_components_charts_series_scatterSeries_tsx-app_components_metrics_chart_chart_tsx-app_vie-50c0c4.*.js 1 bytes 60.72kB 0.0%
chunks/app_components_charts_components_dataZoomInside_tsx-app_components_charts_components_toolBox_-698983.*.js (New) 60.32kB 60.32kB 100.0% 🚀
chunks/app_components_charts_components_dataZoomInside_tsx-app_components_charts_components_toolBox_-1e4e8f.*.js (New) 57.54kB 57.54kB 100.0% 🚀
chunks/app_views_settings_dynamicSampling_index_tsx-node_modules_react-virtualized_dist_es_CellMeasu-6b1be5.*.js -1 bytes 49.28kB -0.0%
chunks/app_views_insights_pages_backend_backendOverviewPage_tsx-node_modules_lodash_partialRight_js.*.js 8.77kB 45.36kB 23.97% ⚠️
chunks/app_views_stories_index_tsx.*.js -255 bytes 43.69kB -0.58%
chunks/app_components_charts_components_dataZoomInside_tsx-app_components_charts_components_toolBox_-5531f4.*.js -3.44kB 40.95kB -7.76%
chunks/app_components_compactSelect_list_tsx-app_views_settings_components_text_textBlock_tsx.*.js 872 bytes 40.75kB 2.19%
chunks/app_views_settings_project_projectOwnership_index_tsx.*.js -4 bytes 40.44kB -0.01%
chunks/app_views_discover_landing_tsx.*.js -1 bytes 39.75kB -0.0%
chunks/app_components_charts_areaChart_tsx-app_components_charts_series_scatterSeries_tsx-app_compon-a78653.*.js (New) 38.98kB 38.98kB 100.0% 🚀
chunks/app_views_alerts_wizard_index_tsx-node_modules_react-virtualized_dist_es_CellMeasurer_CellMea-4ae9b7.*.js 55 bytes 38.38kB 0.14%
chunks/app_components_charts_components_dataZoomInside_tsx-app_components_charts_components_toolBox_-f7da41.*.js (New) 37.75kB 37.75kB 100.0% 🚀
chunks/app_components_feedback_widget_feedbackWidgetButton_tsx-app_views_insights_http_views_httpDom-ce2a33.*.js 208 bytes 37.56kB 0.56%
chunks/app_components_charts_components_dataZoomInside_tsx-app_components_charts_components_toolBox_-51a8df.*.js -3.44kB 37.54kB -8.4%
chunks/app_components_feedback_widget_us*kWidget_tsx-app_views_performance_transactionSummary-51d702.48edbf225ad1a060f37a.js (New) 37.52kB 37.52kB 100.0% 🚀
chunks/app_components_charts_areaChart_tsx-app_components_charts_barChart_tsx-app_components_charts_-9966ba.*.js 205 bytes 36.78kB 0.56%
chunks/app_components_charts_components_dataZoomInside_tsx-app_components_charts_components_toolBox_-b3f1e2.*.js -3.18kB 36.28kB -8.05%
chunks/app_components_feedback_widget_feedbackWidgetButton_tsx-app_views_insights_common_components_-07f64e.*.js 593 bytes 34.54kB 1.75%
chunks/app_components_charts_areaChart_tsx-app_components_charts_series_scatterSeries_tsx-app_compon-4b7996.*.js (New) 34.3kB 34.3kB 100.0% 🚀
chunks/app_components_charts_series_scatterSeries_tsx-app_components_feedback_widget_us*kWidg-2f9105.58eaebb44c48d1ea069f.js (New) 34.19kB 34.19kB 100.0% 🚀
chunks/app_components_feedback_widget_feedbackWidgetButton_tsx-app_views_insights_common_views_spans-82c131.*.js 1 bytes 33.99kB 0.0%
chunks/app_components_acl_access_tsx-app_components_autoComplete_tsx-app_components_core_badge_featu-39e51e.*.js -279 bytes 32.28kB -0.86%
chunks/app_views_insights_queues_views_destinationSummaryPage_tsx.*.js 271 bytes 32.0kB 0.85%
chunks/app_views_alerts_filterBar_tsx-app_views_alerts_list_header_tsx.*.js 50 bytes 31.15kB 0.16%
chunks/app_components_charts_eventsRequest_tsx-app_components_feedback_widget_us*kWidget_tsx--fbb1b9.0df76082d6c99bd1cb87.js (New) 31.1kB 31.1kB 100.0% 🚀
chunks/app_components_forms_fieldFromConfig_tsx.*.js 1 bytes 30.29kB 0.0%
chunks/app_views_insights_cache_views_cacheLandingPage_tsx.*.js 1 bytes 29.96kB 0.0%
chunks/app_views_settings_project_projectFilters_index_tsx.*.js -1 bytes 29.5kB -0.0%
chunks/app_components_acl_access_tsx-app_components_autoComplete_tsx-app_components_core_badge_featu-9ec715.*.js -419 bytes 28.29kB -1.46%
chunks/app_views_settings_organizationDeveloperSettings_index_tsx.*.js -1.56kB 27.68kB -5.34%
chunks/app_components_forms_fields_index_stories_tsx.*.js 1 bytes 26.73kB 0.0%
chunks/app_views_releases_list_releaseCard_index_tsx.*.js 2.45kB 25.51kB 10.61% ⚠️
chunks/app_data_forms_accountEmails_tsx-app_views_settings_components_settingsLayout_tsx-node_module-be57d2.*.js -452 bytes 25.3kB -1.76%
chunks/app_components_modals_widgetViewerModal_tsx.*.js 14 bytes 25.19kB 0.06%
chunks/app_views_settings_project_projectKeys_details_index_tsx.*.js 1 bytes 24.68kB 0.0%
chunks/app_components_feedback_widget_us*kWidget_tsx-app_components_performance_transactionSe-feae7d.0fb501f1c7d4685a6922.js (New) 24.18kB 24.18kB 100.0% 🚀
chunks/app_components_charts_components_dataZoomInside_tsx-app_components_charts_components_toolBox_-4f9b0b.*.js -3.44kB 22.23kB -13.39%
chunks/app_views_settings_organizationRelay_index_tsx.*.js -4 bytes 21.83kB -0.02%
chunks/app_views_admin_options_tsx.*.js 1 bytes 21.73kB 0.0%
chunks/app_actionCreators_prompts_tsx-app_components_emptyMessage_tsx-app_components_feedback_widget-395f49.*.js 1.09kB 21.36kB 5.4% ⚠️
chunks/app_components_checkInTimeline_checkInTimeline_tsx-app_components_checkInTimeline_gridLines_t-a9dd19.*.js 30 bytes 21.09kB 0.14%
chunks/app_views_insights_common_components_insightsLineChartWidget_tsx-app_views_insights_common_co-e286d9.*.js 692 bytes 20.59kB 3.48%
chunks/app_components_modals_emailVerificationModal_tsx.*.js 1.34kB 19.89kB 7.21% ⚠️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_utils_discover_discoverQuery_tsx-app-c5fefe.43aa384f889c6788bad9.js (New) 17.41kB 17.41kB 100.0% 🚀
chunks/app_views_dashboards_widgets_timeSeriesWidget_timeSeriesWidgetVisualization_tsx.*.js 31 bytes 16.39kB 0.19%
chunks/app_components_feedback_widget_us*kWidget_tsx-app_components_gridEditable_sortLink_tsx-d372f4.1d5cfbf3e0f2910fb5e0.js (New) 16.21kB 16.21kB 100.0% 🚀
chunks/app_components_modals_diffModal_tsx.*.js 1 bytes 16.04kB 0.01%
chunks/app_components_feedback_widget_us*kWidget_tsx-app_components_performance_transactionSe-f61270.201c93528095e6d680d2.js (New) 13.36kB 13.36kB 100.0% 🚀
chunks/app_components_charts_areaChart_tsx-app_components_dynamicSampling_investigationRule_tsx-app_-76b79e.*.js (New) 13.25kB 13.25kB 100.0% 🚀
chunks/app_views_settings_projectPlugins_index_tsx.*.js -1 bytes 13.08kB -0.01%
chunks/app_components_devtoolbar_components_featureFlags_featureFlagsPanel_tsx.*.js 2 bytes 12.7kB 0.02%
chunks/app_views_settings_project_loaderScript_tsx.*.js 1 bytes 12.37kB 0.01%
chunks/app_components_charts_lineChart_tsx-app_components_feedback_widget_us*kWidget_tsx-app_-26fc43.ea95e41f0d7147dd3e90.js (New) 12.34kB 12.34kB 100.0% 🚀
chunks/app_views_settings_project_projectServiceHookDetails_tsx.*.js 1 bytes 12.13kB 0.01%
chunks/app_views_settings_project_projectOwnership_ownerInput_tsx.*.js -4 bytes 11.77kB -0.03%
chunks/app_components_forms_fields_textareaField_tsx-app_views_settings_organizationIntegrations_plu-1003d8.*.js -1 bytes 10.8kB -0.01%
chunks/app_components_charts_chartZoom_tsx-app_components_charts_releaseSeries_tsx-app_components_ch-c04b97.*.js (New) 9.85kB 9.85kB 100.0% 🚀
chunks/app_views_insights_common_components_moduleLayout_tsx-app_views_insights_llmMonitoring_compon-1886b3.*.js (New) 9.82kB 9.82kB 100.0% 🚀
chunks/app_views_settings_project_projectCreateServiceHook_tsx.*.js 1 bytes 7.72kB 0.01%
chunks/app_components_events_interfaces_llm-monitoring_llmMonitoringSection_tsx-app_views_insights_c-a549c5.*.js (New) 7.44kB 7.44kB 100.0% 🚀
chunks/app_views_settings_account_accountSubscriptions_tsx.*.js 1 bytes 7.22kB 0.01%
chunks/app_views_settings_project_projectServiceHooks_tsx.*.js 1 bytes 5.49kB 0.02%
chunks/app_actionCreators_redirectToProject_tsx-app_actionCreators_sudoModal_tsx-app_components_aler-ed11ff.*.js (Deleted) -451.94kB 0 bytes -100.0% 🗑️
chunks/app_components_breadcrumbs_tsx-app_utils_performance_quickTrace_quickTraceQuery_tsx-app_utils-00df06.*.js (Deleted) -340.68kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_views_projectDetail_index_tsx.2e1cf20bc964ded5e465.js (Deleted) -125.88kB 0 bytes -100.0% 🗑️
chunks/app_components_charts_areaChart_tsx-app_components_charts_chartZoom_tsx-app_components_charts-9d600d.*.js (Deleted) -73.57kB 0 bytes -100.0% 🗑️
chunks/app_utils_discover_discoverQuery_tsx-app_views_performance_vitalDetail_index_tsx-node_modules-d327a6.*.js (Deleted) -69.28kB 0 bytes -100.0% 🗑️
chunks/app_components_charts_components_dataZoomInside_tsx-app_components_charts_components_toolBox_-6b400c.*.js (Deleted) -51.2kB 0 bytes -100.0% 🗑️
chunks/app_components_charts_components_dataZoomInside_tsx-app_components_charts_components_toolBox_-4b5dae.*.js (Deleted) -45.57kB 0 bytes -100.0% 🗑️
chunks/app_components_charts_areaChart_tsx-app_components_charts_chartZoom_tsx-app_components_charts-e682fa.*.js (Deleted) -43.42kB 0 bytes -100.0% 🗑️
chunks/app_components_charts_releaseSeries_tsx-app_components_charts_series_scatterSeries_tsx-app_co-3ae83e.*.js (Deleted) -43.2kB 0 bytes -100.0% 🗑️
chunks/app_components_charts_areaChart_tsx-app_components_charts_chartZoom_tsx-app_components_charts-967899.*.js (Deleted) -37.8kB 0 bytes -100.0% 🗑️
chunks/app_components_charts_eventsRequest_tsx-app_components_feedback_widget_us*kWidget_tsx--fbb1b9.989200eafecbc6268e1d.js (Deleted) -31.1kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_views_performance_transactionSummary-51d702.e523129d06ff44d49296.js (Deleted) -25.69kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_components_performance_transactionSe-feae7d.36bc01e74b6b9b7d24b3.js (Deleted) -24.18kB 0 bytes -100.0% 🗑️
chunks/app_components_charts_areaChart_tsx-app_components_charts_chartZoom_tsx-app_components_charts-a006e5.*.js (Deleted) -22.26kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_utils_discover_discoverQuery_tsx-app-c5fefe.9e823a6dee76a9196923.js (Deleted) -17.41kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_components_gridEditable_sortLink_tsx-d372f4.b872ed8f0f45865df55d.js (Deleted) -16.21kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_components_performance_transactionSe-f61270.982da3938046d462433f.js (Deleted) -13.36kB 0 bytes -100.0% 🗑️
chunks/app_utils_performance_suspectSpans_suspectSpansQuery_tsx-app_views_insights_common_components-7ec332.*.js (Deleted) -12.61kB 0 bytes -100.0% 🗑️
chunks/app_components_charts_lineChart_tsx-app_components_feedback_widget_us*kWidget_tsx-app_-26fc43.5c3a61bb02567aa38ce8.js (Deleted) -12.34kB 0 bytes -100.0% 🗑️
chunks/app_components_events_interfaces_llm-monitoring_llmMonitoringSection_tsx-app_views_insights_c-ad85ed.*.js (Deleted) -11.15kB 0 bytes -100.0% 🗑️
chunks/app_views_insights_common_components_insightsLineChartWidget_tsx-app_views_insights_common_co-9de3f2.*.js (Deleted) -5.43kB 0 bytes -100.0% 🗑️
chunks/app_views_dashboards_widgets_bigNumberWidget_bigNumberWidget_stories_tsx.*.js (Deleted) -4.08kB 0 bytes -100.0% 🗑️

Files in chunks/app_components_avatar_actorAvatar_tsx-app_components_avatar_avatarList_tsx-app_components_cha-e41958.*.js:

  • ./app/utils/queryClient.tsx → Total Size: 7.25kB

Files in chunks/app_actionCreators_preferences_tsx-app_components_avatar_actorAvatar_tsx-app_components_confi-71c9ce.*.js:

  • ./app/utils/queryClient.tsx → Total Size: 7.25kB

@billyvg billyvg merged commit 9218558 into master Mar 5, 2025
43 checks passed
@billyvg billyvg deleted the ref-ui-change-release-series-use-hook-2 branch March 5, 2025 20:54
philipphofmann pushed a commit that referenced this pull request Mar 6, 2025
…riesWidget>` (#86300)

This reverts commit 3febd2b and extends
the [original PR](#86129)

It was reverted because it was causing crashes
(https://sentry.sentry.io/issues/6352301875/?project=11276&referrer=github-pr-bot)
due to a cache key conflict in react-query between `useQuery` and
`useInfiniteQuery` ([read more about it
here](https://tkdodo.eu/blog/effective-react-query-keys#caching-data)).
This would happen in Sentry if you visited an insights page (which uses
an "infinite" query) and then went to e.g. the issue details page (which
has it's own hook
[useReleaseMarkLineSeries](https://github.com/getsentry/sentry/blob/master/static/app/views/issueDetails/streamline/hooks/useReleaseMarkLineSeries.tsx#L25-L45)
that uses a "normal" query). Both queries use the same cache key because
infinite queries handles the `cursor` param for us (thus it not being
part of the query key).

I've made some additional changes to the hook: it's now moved to
`app/utils` as it'll be needed in other places. it's also more generic
now.


From the original PR:

> This will be needed for the new release bubbles feature as we will
show releases on the mini widgets instead of only on fullscreen. Using
`<ReleaseSeries>` renderer will cause duplicate requests to the API.


ref #85779
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants