Skip to content

Commit 90fc14b

Browse files
authored
Merge branch 'master' into feat/bitbucket-signed-webhooks-1
2 parents 683042f + 4586f8e commit 90fc14b

31 files changed

+948
-981
lines changed

babel.config.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,10 @@ const config: TransformOptions = {
2222
overrides: [],
2323
plugins: ['@emotion/babel-plugin', '@babel/plugin-transform-runtime'],
2424
env: {
25-
production: {
26-
plugins: [['babel-plugin-add-react-displayname']],
27-
},
25+
production: {},
2826
development: {
2927
plugins: [
3028
'@emotion/babel-plugin',
31-
'@babel/plugin-transform-react-jsx-source',
3229
...(process.env.SENTRY_UI_HOT_RELOAD ? ['react-refresh/babel'] : []),
3330
],
3431
},

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
"dependencies": {
1111
"@acemarke/react-prod-sourcemaps": "^0.2.1",
1212
"@babel/core": "~7.25.9",
13-
"@babel/plugin-transform-react-jsx": "^7.25.9",
14-
"@babel/plugin-transform-react-jsx-source": "^7.25.9",
1513
"@babel/plugin-transform-runtime": "~7.25.9",
1614
"@babel/preset-env": "~7.25.9",
1715
"@babel/preset-react": "^7.25.9",
@@ -94,7 +92,6 @@
9492
"@types/webpack-env": "^1.18.5",
9593
"ansi-to-react": "^6.1.6",
9694
"babel-loader": "^9.2.1",
97-
"babel-plugin-add-react-displayname": "^0.0.5",
9895
"browserslist": "^4.22.2",
9996
"buffer": "^6.0.3",
10097
"cbor-web": "^8.1.0",

src/sentry/snuba/metrics/datasource.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,12 @@
5050
)
5151
from sentry.snuba.metrics.utils import (
5252
AVAILABLE_GENERIC_OPERATIONS,
53-
AVAILABLE_OPERATIONS,
5453
CUSTOM_MEASUREMENT_DATASETS,
5554
METRIC_TYPE_TO_ENTITY,
5655
UNALLOWED_TAGS,
5756
DerivedMetricParseException,
5857
MetricDoesNotExistInIndexer,
5958
MetricMeta,
60-
MetricMetaWithTagKeys,
6159
MetricType,
6260
NotSupportedOverCompositeEntityException,
6361
Tag,
@@ -73,7 +71,6 @@
7371
"get_all_tags",
7472
"get_tag_values",
7573
"get_series",
76-
"get_single_metric_info",
7774
)
7875

7976

@@ -428,42 +425,6 @@ def _fetch_tags_or_values_for_mri(
428425
return tags_or_values, None
429426

430427

431-
def get_single_metric_info(
432-
projects: Sequence[Project],
433-
metric_name: str,
434-
use_case_id: UseCaseID,
435-
) -> MetricMetaWithTagKeys:
436-
tags, metric_type = _fetch_tags_or_values_for_metrics(
437-
projects=projects,
438-
metric_names=[metric_name],
439-
column="tags.key",
440-
referrer="snuba.metrics.meta.get_single_metric",
441-
use_case_id=use_case_id,
442-
)
443-
entity_key = METRIC_TYPE_TO_ENTITY[metric_type]
444-
445-
response_dict = {
446-
"name": metric_name,
447-
"type": metric_type,
448-
"operations": AVAILABLE_OPERATIONS[entity_key.value],
449-
"unit": None,
450-
"tags": tags,
451-
}
452-
453-
metric_mri = get_mri(metric_name)
454-
all_derived_metrics = get_derived_metrics()
455-
if metric_mri in all_derived_metrics:
456-
derived_metric = all_derived_metrics[metric_mri]
457-
response_dict.update(
458-
{
459-
"operations": [],
460-
"unit": derived_metric.unit,
461-
"type": derived_metric.result_type,
462-
}
463-
)
464-
return response_dict
465-
466-
467428
def get_all_tags(
468429
projects: Sequence[Project],
469430
metric_names: Sequence[str] | None,

src/sentry/snuba/metrics/utils.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"Tag",
2828
"TagValue",
2929
"MetricMeta",
30-
"MetricMetaWithTagKeys",
3130
"OPERATIONS",
3231
"OPERATIONS_PERCENTILES",
3332
"DEFAULT_AGGREGATES",
@@ -358,10 +357,6 @@ class MetricMeta(TypedDict):
358357
blockingStatus: Sequence[BlockedMetric] | None
359358

360359

361-
class MetricMetaWithTagKeys(MetricMeta):
362-
tags: Sequence[Tag]
363-
364-
365360
OPERATIONS_PERCENTILES = (
366361
"p50",
367362
"p75",

src/sentry/taskworker/worker.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,19 @@ def _drain_result(self, fetch: bool = True) -> bool:
336336
if not self._child_tasks.full():
337337
fetch_next = FetchNextTask(namespace=self._namespace)
338338

339-
next_task = self.client.update_task(
340-
task_id=result.task_id,
341-
status=result.status,
342-
fetch_next_task=fetch_next,
343-
)
339+
try:
340+
next_task = self.client.update_task(
341+
task_id=result.task_id,
342+
status=result.status,
343+
fetch_next_task=fetch_next,
344+
)
345+
except grpc.RpcError as e:
346+
logger.exception(
347+
"taskworker.drain_result.update_task_failed",
348+
extra={"task_id": result.task_id, "error": e},
349+
)
350+
return False
351+
344352
if next_task:
345353
try:
346354
self._child_tasks.put(next_task, block=False)

src/sentry/templates/sentry/twofactor.html

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{% extends "sentry/bases/auth.html" %}
22

3-
{% load sentry_assets %}
43
{% load crispy_forms_tags %}
54
{% load i18n %}
65

@@ -55,22 +54,3 @@ <h3>Two-Factor Authentication</h3>
5554
</div>
5655
</div>
5756
{% endblock %}
58-
59-
{% block scripts_bottom %}
60-
{{ block.super }}
61-
{% script %}
62-
<script>
63-
document.addEventListener('DOMContentLoaded', function() {
64-
const input = document.querySelector('input[name="otp"]');
65-
if (!input) {
66-
return;
67-
}
68-
input.addEventListener('change', function() {
69-
if (input.value.length >= 6) {
70-
input.form.submit();
71-
}
72-
});
73-
});
74-
</script>
75-
{% endscript %}
76-
{% endblock %}

src/sentry/workflow_engine/endpoints/project_detector_index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def post(self, request, project):
114114
:param object data_source: Configuration for the data source
115115
:param array data_conditions: List of conditions to trigger the detector
116116
"""
117-
group_type = request.data.get("group_type")
117+
group_type = request.data.get("groupType")
118118
if not group_type:
119119
raise ValidationError({"groupType": ["This field is required."]})
120120

static/app/components/events/eventTagsAndScreenshot/tags.tsx

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {forwardRef, useCallback, useMemo, useState} from 'react';
22
import styled from '@emotion/styled';
33

44
import GuideAnchor from 'sentry/components/assistant/guideAnchor';
5-
import {LinkButton} from 'sentry/components/button';
65
import ButtonBar from 'sentry/components/buttonBar';
76
import {
87
getSentryDefaultTags,
@@ -16,24 +15,23 @@ import {t, tct} from 'sentry/locale';
1615
import {space} from 'sentry/styles/space';
1716
import type {Event} from 'sentry/types/event';
1817
import type {Project} from 'sentry/types/project';
19-
import {useLocation} from 'sentry/utils/useLocation';
2018
import {SectionKey} from 'sentry/views/issueDetails/streamline/context';
2119
import {InterimSection} from 'sentry/views/issueDetails/streamline/interimSection';
22-
import {Tab, TabPaths} from 'sentry/views/issueDetails/types';
23-
import {useHasStreamlinedUI} from 'sentry/views/issueDetails/utils';
2420

2521
import {EventTags} from '../eventTags';
2622

2723
type Props = {
2824
event: Event;
2925
projectSlug: Project['slug'];
26+
/**
27+
* Additional buttons to render in the header of the section
28+
*/
29+
additionalActions?: React.ReactNode;
3030
};
3131

3232
export const EventTagsDataSection = forwardRef<HTMLElement, Props>(
33-
function EventTagsDataSection({event, projectSlug}: Props, ref) {
33+
function EventTagsDataSection({event, projectSlug, additionalActions}: Props, ref) {
3434
const sentryTags = getSentryDefaultTags();
35-
const hasStreamlinedUI = useHasStreamlinedUI();
36-
const location = useLocation();
3735

3836
const [tagFilter, setTagFilter] = useState<TagFilter>(TagFilter.ALL);
3937
const handleTagFilterChange = useCallback((value: TagFilter) => {
@@ -57,23 +55,9 @@ export const EventTagsDataSection = forwardRef<HTMLElement, Props>(
5755
});
5856
}, [event.tags]);
5957

60-
// Prevent drawer button from appearing on performance pages
61-
const isOnIssueDetails = location.pathname.includes('/issues/');
62-
6358
const actions = (
6459
<ButtonBar gap={1}>
65-
{hasStreamlinedUI && event.groupID && isOnIssueDetails && (
66-
<LinkButton
67-
to={{
68-
pathname: `${location.pathname}${TabPaths[Tab.TAGS]}`,
69-
query: location.query,
70-
replace: true,
71-
}}
72-
size="xs"
73-
>
74-
{t('View All Issue Tags')}
75-
</LinkButton>
76-
)}
60+
{additionalActions}
7761
<SegmentedControl
7862
size="xs"
7963
aria-label={t('Filter tags')}

static/app/components/sidebar/sidebarAccordion.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function SidebarAccordion({
6262
const isActive = isItemActive(itemProps);
6363
const hasMainLink = Boolean(itemProps.to);
6464

65-
const childSidebarItems = findChildElementsInTree(children, 'SidebarItem');
65+
const childSidebarItems = findChildElementsInTree(children, SidebarItem.displayName);
6666

6767
const hasActiveChildren = Children.toArray(childSidebarItems).some(child => {
6868
if (isValidElement(child)) {
@@ -205,7 +205,7 @@ function findChildElementsInTree(
205205
typeof child.type === 'string'
206206
? child.type
207207
: 'displayName' in child.type
208-
? (child.type.displayName as string) // `.displayName` is added by `babel-plugin-add-react-displayname` in production builds
208+
? (child.type.displayName as string) // `.displayName` is added manually
209209
: child.type.name; // `.name` is available in development builds
210210

211211
if (currentComponentName === componentName) {

static/app/components/sidebar/sidebarItem.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ function SidebarItem({
312312
</Tooltip>
313313
);
314314
}
315+
SidebarItem.displayName = 'SidebarItem';
315316

316317
export function isItemActive(
317318
item: Pick<SidebarItemProps, 'to' | 'label'>,

0 commit comments

Comments
 (0)