-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(dashboards): migrate releases to hook pattern #106909
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
base: master
Are you sure you want to change the base?
feat(dashboards): migrate releases to hook pattern #106909
Conversation
| url: '/organizations/org-slug/metrics/data/', | ||
| body: MetricsTotalCountByReleaseIn24h(), | ||
| headers: { | ||
| link: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link is the correct casing used, checked this in the response headers of the network tab. It's also the http standard casing This was causing a test case to fail
…ases-dataset-to-hook-pattern
…ases-dataset-to-hook-pattern
This reverts commit 6185b9b.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
|
|
||
| if (afterFetchData) { | ||
| afterFetchData(responseData); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate callback execution in release widget hooks
Medium Severity
The afterFetchData callback is called inside the hooks during the transformedData computation, but genericWidgetQueries.tsx already has a useEffect (lines 219-259) that calls afterFetchSeriesData/afterFetchTableData when hook data changes. This causes the same callback to execute twice for every data fetch, which could lead to duplicate side effects or state inconsistencies. The callback calls in the hooks (lines 212-214 and 405-407) appear to be redundant.
Similar to #106524 but for releases dataset
There's a lot of files changed here, but most is copy and paste from
static/app/views/dashboards/datasetConfig/releases.tsxinto the new hooks