Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ jobs:
GIT_AUTHOR_NAME: getsentry-bot
EMAIL: bot@getsentry.com
ZEUS_API_TOKEN: ${{ secrets.ZEUS_API_TOKEN }}
# Wait until the builds start. Craft should do this automatically
# but it is broken now.
- run: sleep 10
- uses: getsentry/craft@master
with:
action: publish
Expand Down
4 changes: 3 additions & 1 deletion docker/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ steps:
- get-onpremise-repo
entrypoint: 'bash'
dir: onpremise
env:
- 'CI=1'
args:
- '-e'
- '-c'
Expand All @@ -89,6 +91,7 @@ steps:
entrypoint: 'bash'
dir: onpremise
env:
- 'CI=1'
- 'SENTRY_PYTHON3=1'
args:
- '-e'
Expand Down Expand Up @@ -170,7 +173,6 @@ options:
- 'SENTRY_IMAGE=us.gcr.io/$PROJECT_ID/sentry:$COMMIT_SHA'
- 'DOCKER_REPO=getsentry/sentry'
- 'SENTRY_TEST_HOST=http://nginx'
- 'CI=1'
secrets:
- kmsKeyName: projects/sentryio/locations/global/keyRings/service-credentials/cryptoKeys/cloudbuild
secretEnv:
Expand Down
6 changes: 6 additions & 0 deletions src/sentry/api/endpoints/organization_searches.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import absolute_import

import sentry_sdk

from rest_framework import serializers
from rest_framework.response import Response
from django.db.models import Q
Expand Down Expand Up @@ -69,6 +71,10 @@ def get(self, request, organization):
else:
results.append(saved_search)
else:
with sentry_sdk.push_scope() as scope:
scope.level = "warning"
sentry_sdk.capture_message("Deprecated project saved search used")

org_searches = Q(
Q(owner=request.user) | Q(owner__isnull=True),
~Q(query__in=DEFAULT_SAVED_SEARCH_QUERIES),
Expand Down
89 changes: 78 additions & 11 deletions src/sentry/api/event_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,7 @@ def normalize(self, value):
raise InvalidFunctionArgument(
u"{} is in the wrong format, expected a date like 2020-03-14T15:14:15".format(value)
)
return value
return u"'{}'".format(value)


class NumericColumn(FunctionArg):
Expand Down Expand Up @@ -1810,30 +1810,67 @@ def validate_argument_count(self, field, arguments):
Function(
"percentile_range",
required_args=[
DurationColumn("column"),
DurationColumnNoLookup("column"),
NumberRange("percentile", 0, 1),
DateArg("start"),
DateArg("end"),
NumberRange("index", 1, None),
],
aggregate=[
u"quantileIf({percentile:.2f})({column},and(greaterOrEquals(timestamp,toDateTime('{start}')),less(timestamp,toDateTime('{end}'))))",
None,
u"quantileIf({percentile:.2f})",
[
ArgValue("column"),
[
"and",
[
# NOTE: These conditions are written in this seemingly backwards way
# because of how snuba special cases the following syntax
# ["a", ["b", ["c", ["d"]]]
#
# This array is can be interpreted 2 ways
# 1. a(b(c(d))) the way snuba interprets it
# - snuba special cases it when it detects an array where the first
# element is a literal, and the second element is an array and
# treats it as a function call rather than 2 separate arguments
# 2. a(b, c(d)) the way we want it to be interpreted
#
# Because of how snuba interprets this expression, it makes it impossible
# to specify a function with 2 arguments whose first argument is a literal
# and the second argument is an expression.
#
# Working with this limitation, we have to invert the conditions in
# order to express a function whose first argument is an expression while
# the second argument is a literal.
["lessOrEquals", [["toDateTime", [ArgValue("start")]], "timestamp"]],
["greater", [["toDateTime", [ArgValue("end")]], "timestamp"]],
],
],
],
"percentile_range_{index:g}",
],
result_type="duration",
),
Function(
"avg_range",
required_args=[
DurationColumn("column"),
DurationColumnNoLookup("column"),
DateArg("start"),
DateArg("end"),
NumberRange("index", 1, None),
],
aggregate=[
u"avgIf({column},and(greaterOrEquals(timestamp,toDateTime('{start}')),less(timestamp,toDateTime('{end}'))))",
None,
u"avgIf",
[
ArgValue("column"),
[
"and",
[
# see `percentile_range` for why the conditions are backwards
["lessOrEquals", [["toDateTime", [ArgValue("start")]], "timestamp"]],
["greater", [["toDateTime", [ArgValue("end")]], "timestamp"]],
],
],
],
"avg_range_{index:g}",
],
result_type="duration",
Expand All @@ -1848,8 +1885,29 @@ def validate_argument_count(self, field, arguments):
],
calculated_args=[{"name": "tolerated", "fn": lambda args: args["satisfaction"] * 4.0}],
aggregate=[
u"uniqIf(user,and(greater(duration,{tolerated:g}),and(greaterOrEquals(timestamp,toDateTime('{start}')),less(timestamp,toDateTime('{end}')))))",
None,
u"uniqIf",
[
"user",
[
"and",
[
# Currently, the column resolution on aggregates doesn't recurse, so we use
# `duration` (snuba name) rather than `transaction.duration` (sentry name).
["greater", ["duration", ArgValue("tolerated")]],
[
"and",
[
# see `percentile_range` for why the conditions are backwards
[
"lessOrEquals",
[["toDateTime", [ArgValue("start")]], "timestamp"],
],
["greater", [["toDateTime", [ArgValue("end")]], "timestamp"]],
],
],
],
],
],
"user_misery_range_{index:g}",
],
result_type="duration",
Expand All @@ -1858,8 +1916,17 @@ def validate_argument_count(self, field, arguments):
"count_range",
required_args=[DateArg("start"), DateArg("end"), NumberRange("index", 1, None)],
aggregate=[
u"countIf(and(greaterOrEquals(timestamp,toDateTime('{start}')),less(timestamp,toDateTime('{end}'))))",
None,
u"countIf",
[
[
"and",
[
# see `percentile_range` for why the conditions are backwards
["lessOrEquals", [["toDateTime", [ArgValue("start")]], "timestamp"]],
["greater", [["toDateTime", [ArgValue("end")]], "timestamp"]],
],
],
],
"count_range_{index:g}",
],
result_type="integer",
Expand Down
9 changes: 2 additions & 7 deletions src/sentry/static/sentry/app/components/deviceName.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import PropTypes from 'prop-types';
import React from 'react';
import styled from '@emotion/styled';

import {IOSDeviceList} from 'app/types/iOSDeviceList';

Expand Down Expand Up @@ -80,13 +79,9 @@ export default class DeviceName extends React.Component<Props, State> {
const deviceName = deviceNameMapper(value, iOSDeviceList);

return (
<Wrapper data-test-id="loaded-device-name">
<span data-test-id="loaded-device-name">
{children ? children(deviceName) : deviceName}
</Wrapper>
</span>
);
}
}

const Wrapper = styled('span')`
vertical-align: middle;
`;
2 changes: 1 addition & 1 deletion src/sentry/static/sentry/app/components/pill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const StyledPill = styled('li')<{type?: PILL_TYPE}>`
border: 1px solid ${p => p.theme.borderDark};
border-radius: ${p => p.theme.button.borderRadius};
box-shadow: ${p => p.theme.dropShadowLightest};
line-height: 1;
line-height: 1.2;
max-width: 100%;
:last-child {
margin-right: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,25 +80,29 @@ export const FILTER_OPTIONS: SelectValue<string>[] = [
{label: t('View All'), value: 'all'},
];

export const ZOOM_KEYS = Object.values(WebVital).reduce((zoomKeys: string[], vital) => {
const vitalSlug = WEB_VITAL_DETAILS[vital].slug;
zoomKeys.push(`${vitalSlug}Start`);
zoomKeys.push(`${vitalSlug}End`);
return zoomKeys;
}, []);

/**
* This defines the grouping for histograms. Histograms that are in the same group
* will be queried together on initial load for alignment. However, the zoom controls
* are defined for each measurement independently.
*/
const _VITAL_GROUPS = [[WebVital.FP, WebVital.FCP, WebVital.LCP], [WebVital.FID]];

const _COLORS = [
...theme.charts.getColorPalette(Object.values(WebVital).length - 1),
...theme.charts.getColorPalette(
_VITAL_GROUPS.reduce((count, group) => count + group.length, 0) - 1
),
].reverse();
export const VITAL_GROUPS = [
[WebVital.FP, WebVital.FCP, WebVital.LCP],
[WebVital.FID],
].map(group => ({

export const VITAL_GROUPS = _VITAL_GROUPS.map(group => ({
group,
colors: _COLORS.splice(0, group.length),
}));

export const ZOOM_KEYS = _VITAL_GROUPS.reduce((keys: string[], group) => {
group.forEach(vital => {
const vitalSlug = WEB_VITAL_DETAILS[vital].slug;
keys.push(`${vitalSlug}Start`);
keys.push(`${vitalSlug}End`);
});
return keys;
}, []);
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class TransactionSummaryCharts extends React.Component<Props> {

<ChartControls>
<InlineContainer>
<SectionHeading key="total-heading">{t('Total Events')}</SectionHeading>
<SectionHeading key="total-heading">{t('Total Transactions')}</SectionHeading>
<SectionValue key="total-value">{calculateTotal(totalValues)}</SectionValue>
</InlineContainer>
<InlineContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
@import 'pager.less';
@import 'labels.less';
@import 'badges.less';
@import 'jumbotron.less';
@import 'thumbnails.less';
@import 'alerts.less';
@import 'progress-bars.less';
Expand Down
53 changes: 0 additions & 53 deletions src/sentry/static/sentry/less/includes/bootstrap/jumbotron.less

This file was deleted.

11 changes: 0 additions & 11 deletions src/sentry/static/sentry/less/includes/bootstrap/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -467,17 +467,6 @@

@pager-disabled-color: @pagination-disabled-color;

//== Jumbotron
//
//##

@jumbotron-padding: 30px;
@jumbotron-color: inherit;
@jumbotron-bg: @gray-lighter;
@jumbotron-heading-color: inherit;
@jumbotron-font-size: ceil((@font-size-base * 1.5));
@jumbotron-heading-font-size: ceil((@font-size-base * 4.5));

//== Form states and alerts
//
//## Define colors for form feedback states and, by default, alerts.
Expand Down
Loading