Skip to content

fix(aci): return sentry app component title in available action endpoint #92138

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

Merged
merged 3 commits into from
May 22, 2025

Conversation

ameliahsu
Copy link
Member

If available, we need to return the sentry app component's title to display in the frontend

In this example, the title is Create a Linear issue

Screenshot 2025-05-22 at 10 52 57 AM

@ameliahsu ameliahsu requested a review from a team as a code owner May 22, 2025 17:54
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label May 22, 2025
@ameliahsu
Copy link
Member Author

how the project rule configuration endpoint returns this value, for reference

"label": f"{obj.schema.get('title', obj.sentry_app.name)} with these ",

we will now be handling the connecting words (with these) and displaying the name if no title is available in the frontend

Copy link

codecov bot commented May 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

⚠️ Parser warning

The parser emitted a warning. Please review your JUnit XML file:

Warning while parsing testcase attributes: Limit of string is 1000 chars, for name, we got 2083 at 1:156718 in /home/runner/work/sentry/sentry/.artifacts/pytest.junit.xml
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #92138       +/-   ##
===========================================
+ Coverage   40.47%   87.86%   +47.39%     
===========================================
  Files       10145    10179       +34     
  Lines      582238   583512     +1274     
  Branches    22627    22627               
===========================================
+ Hits       235649   512727   +277078     
+ Misses     346137    70333   -275804     
  Partials      452      452               

Copy link
Member

@iamrajjoshi iamrajjoshi left a comment

Choose a reason for hiding this comment

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

lgtm, what happens if the title doesn't exist?

if component:
sentry_app["settings"] = component.app_schema.get("settings", {})
if component.app_schema.get("title"):
sentry_app["title"] = component.app_schema.get("title")
Copy link
Member

Choose a reason for hiding this comment

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

unfortunate we need to do this - i wish we had the ability to type this down. can we put a todo somewhere for this?

Copy link
Member Author

Choose a reason for hiding this comment

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

the component schema is just an open field so it might be hard to do 😭

schema: models.Field[dict[str, Any], dict[str, Any]] = JSONField()

Copy link
Member Author

Choose a reason for hiding this comment

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

for reference it maps to this field in the sentry app creation form

Screenshot 2025-05-22 at 1 57 08 PM

@ameliahsu
Copy link
Member Author

@iamrajjoshi if the title doesn't exist we just use the sentry app's name

@ameliahsu ameliahsu merged commit 56084b5 into master May 22, 2025
60 checks passed
@ameliahsu ameliahsu deleted the mia/aci/available-actions-sentry-app branch May 22, 2025 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants