Skip to content

fix(release-health): Convert project IDs to slugs #93053

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

narsaynorath
Copy link
Member

@narsaynorath narsaynorath commented Jun 6, 2025

This is consistent with e.g. tables when a project column is added. Other datasets handle this project name properly, it seems like only the sessions data uses the project ID when requesting projects.

We should probably patch the backend but this is an immediate fix for the feedback.

Before (notice the ID in the legend and tooltip):
Screenshot 2025-06-06 at 3 52 54 PM

After:
Screenshot 2025-06-06 at 3 53 36 PM

This is consistent with e.g. tables when a project column is added.
Other datasets handle this project name properly, it seems like only the
sessions data uses the project ID when requesting projects.

We should probably patch the backend but this is an immediate fix for
the feedback.
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 6, 2025
@@ -64,7 +64,6 @@ export const FIELD_TO_METRICS_EXPRESSION = {
'crash_free_rate(user)': SessionMetric.USER_CRASH_FREE_RATE,
'crash_rate(session)': SessionMetric.SESSION_CRASH_RATE,
'crash_rate(user)': SessionMetric.USER_CRASH_RATE,
project: 'project_id',
Copy link
Member Author

Choose a reason for hiding this comment

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

This was implicitly converting the project field to project_id in the response but it's not really necessary. Instead I just convert the ID to the correct project slug in the afterFetchData helper. Unfortunately, it is on the developer to know the endpoint only returns IDs.

It's possible we can map these back to slugs but I assume it's a limitation of the session data not being immediately join-able with the projects table to do the lookup.

@narsaynorath narsaynorath marked this pull request as ready for review June 6, 2025 19:54
@narsaynorath narsaynorath requested a review from a team as a code owner June 6, 2025 19:54
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.

1 participant