feat: Provide releases link only if exists on source maps details page#95100
Merged
priscilawebdev merged 8 commits intoJul 9, 2025
Conversation
priscilawebdev
commented
Jul 9, 2025
Comment on lines
+161
to
+200
| const releaseVersions = debugIdBundlesArtifacts?.associations.map( | ||
| association => `"${association.release}"` | ||
| ); | ||
|
|
||
| const {data: releasesData, isPending: releasesLoading} = useApiQuery<Release[]>( | ||
| [ | ||
| `/organizations/${organization.slug}/releases/`, | ||
| { | ||
| query: { | ||
| project: [project.id], | ||
| query: releaseVersions ? `release:[${releaseVersions.join(',')}]` : undefined, | ||
| }, | ||
| }, | ||
| ], | ||
| { | ||
| staleTime: Infinity, | ||
| retry: false, | ||
| enabled: isDebugIdBundle && !debugIdBundlesArtifactsLoading, | ||
| } | ||
| ); | ||
|
|
||
| const debugIdBundlesArtifactsData = useMemo(() => { | ||
| if (releasesLoading) { | ||
| return debugIdBundlesArtifacts; | ||
| } | ||
|
|
||
| if (!debugIdBundlesArtifacts) { | ||
| return undefined; | ||
| } | ||
|
|
||
| const existingReleaseNames = new Set((releasesData ?? []).map(r => r.version)); | ||
|
|
||
| return { | ||
| ...debugIdBundlesArtifacts, | ||
| associations: debugIdBundlesArtifacts.associations.map(association => ({ | ||
| ...association, | ||
| exists: existingReleaseNames.has(association.release), | ||
| })), | ||
| }; | ||
| }, [releasesLoading, releasesData, debugIdBundlesArtifacts]); |
Member
Author
There was a problem hiding this comment.
We can probably extract this into a reusable function, but let's clean that up in a later pass
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #95100 +/- ##
=======================================
Coverage 87.87% 87.87%
=======================================
Files 10452 10452
Lines 604761 604737 -24
Branches 23613 23608 -5
=======================================
- Hits 531444 531426 -18
+ Misses 72959 72953 -6
Partials 358 358 |
Contributor
There was a problem hiding this comment.
Bug: Distribution Info Formatting Issue
Release distribution information is now always displayed, even when dist is null or empty (e.g., "(Dist: none)" or "(Dist: )"). Additionally, a leading space before the distribution text is missing. This results in a format like "Version(Dist: ...)" instead of "Version (Dist: ...)" or no distribution text when dist is absent.
static/app/views/settings/projectSourceMaps/associatedReleases.tsx#L35-L36
Was this report helpful? Give feedback by reacting with 👍 or 👎
obostjancic
approved these changes
Jul 9, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Similar to the PR but now on the details page.
Screen.Recording.2025-07-09.at.10.42.59.mov