fix(admin): Use Customer details endpoint rather than deprecated subscription details#107795
Draft
fix(admin): Use Customer details endpoint rather than deprecated subscription details#107795
Conversation
| this.loadingData[orgSlug] = true; | ||
|
|
||
| const data = await this.api.requestPromise(`/subscriptions/${orgSlug}/`); | ||
| const data = await this.api.requestPromise(`/customers/${orgSlug}/`); |
Contributor
There was a problem hiding this comment.
Bug: The migration from the deprecated /subscriptions/ endpoint to /customers/ is incomplete. usePerformanceSubscriptionDetails.tsx still uses the old endpoint, which will cause API failures on performance and explore pages.
Severity: HIGH
Suggested Fix
Update the API endpoint in static/app/views/performance/newTraceDetails/traceTypeWarnings/usePerformanceSubscriptionDetails.tsx to use /customers/${organization.slug}/ instead of /subscriptions/${organization.slug}/. Also, search for and update any remaining test mocks that still use the deprecated endpoint.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: static/gsApp/stores/subscriptionStore.tsx#L110
Potential issue: The pull request updates an API endpoint from the deprecated
`/subscriptions/${orgSlug}/` to `/customers/${orgSlug}/`. However, this migration is
incomplete. The file
`static/app/views/performance/newTraceDetails/traceTypeWarnings/usePerformanceSubscriptionDetails.tsx`
was not updated and still references the old endpoint. This hook is actively used in
performance trace details and explore pages. As a result, users accessing these features
will encounter API failures, as the frontend will attempt to fetch data from a
deprecated or non-existent endpoint, leading to broken functionality.
Did we get this right? 👍 / 👎 to inform future reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The subscription-based path has been considered deprecated for 9 years, since 7c83890.