-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(aci): Add metric monitor template dropdown #102992
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
Conversation
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
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.
Bug: Default Value Mismatch Breaks UI
The defaultValue is set to "automatic" but the valid values for resolutionStrategy are 'default' and 'custom'. This will cause the radio field to have an invalid default value that doesn't match any of the available options.
static/app/views/detectors/components/forms/metric/resolveSection.tsx#L133-L134
sentry/static/app/views/detectors/components/forms/metric/resolveSection.tsx
Lines 133 to 134 in 8d8cc29
| choices={resolutionStrategyChoices} | |
| defaultValue="automatic" |
| // Only set query if template has one and user hasn't customized the filter | ||
| if (meta.query !== undefined && !currentQuery) { | ||
| formContext.form?.setValue(METRIC_DETECTOR_FORM_FIELDS.query, meta.query); | ||
| } |
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.
Bug: Template Query Logic Prevents Updates
When switching between templates that both have queries, the query won't update because !currentQuery evaluates to false. After selecting a template with a query, switching to another template with a different query won't apply the new query value since currentQuery is now truthy from the first template.
|
Semgrep found 1 Risk: Affected versions of Django are vulnerable to Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'). SQL injection in Django's ORM column aliases: when using QuerySet.annotate(), QuerySet.alias(), QuerySet.aggregate(), or QuerySet.extra() with dictionary expansion (**kwargs), the dictionary keys are used unescaped as SQL column aliases. On MySQL and MariaDB backends, an attacker who can influence those keys (for example, by passing a crafted dict of annotations) can inject arbitrary SQL into the generated query. Manual Review Advice: A vulnerability from this advisory is reachable if you are using Django with MySQL or MariaDB Fix: Upgrade this library to at least version 5.2.7 at sentry/uv.lock:305. Reference(s): GHSA-hpr9-3m2g-3j9p, CVE-2025-59681 |
adds a template dropdown and moves customize section into a collapsible component
adds a template dropdown and moves customize section into a collapsible component
adds a template dropdown and moves customize section into a collapsible component
overall feel of the form after these changes
template options