Skip to content

feat(issues): Consolidate share and publish modals #90715

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

Closed
wants to merge 71 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
56cff50
consolidate share and publish
roggenkemper Apr 30, 2025
af32f3e
fix(releases): Fix finalize button size (#90716)
ryan953 May 1, 2025
32cb664
feat(insights): eap starred transaction column updates (#90696)
DominikB2014 May 1, 2025
33df396
chore(ci): Handle artifacts should continue on error (#90429)
hubertdeng123 May 1, 2025
d8d8763
chore(perf-issues): Increase rollout to 0.5 for HTTP Detectors (#90722)
leeandher May 1, 2025
917420c
fix(api): Make trace item details rename type=double to type=float (#…
colin-sentry May 1, 2025
c2ecd2e
fix(tests) Unskip test and narrow scope of query count assertion (#90…
markstory May 1, 2025
c89900f
fix(taskworker) Update cluster_projects so it can not use pickle (#90…
markstory May 1, 2025
5228737
test(ourlogs): Add acceptance test for attribute values (#90694)
k-fish May 1, 2025
f54cc2c
feat(explore): Add pagination analytics (#90727)
narsaynorath May 1, 2025
915fb3c
feat(insights): add user column to overview pages, remove slow op cha…
DominikB2014 May 1, 2025
6782fe3
fix(saved-searches): Fix custom search button styles (#90735)
malwilley May 1, 2025
6aaa91a
fix(ourlogs): Avoid unnecessary wrapping (#90726)
colin-sentry May 1, 2025
9874ad2
feat(ACI): Create Detector serializer for old rule endpoints (#90255)
ceorourke May 1, 2025
900dfa4
chore(issue_platform): Support deletions by default (#90614)
armenzg May 1, 2025
20715e9
:wrench: chore(aci): use integration provider enum in config definit…
iamrajjoshi May 1, 2025
6bdf733
drop(munging): Drop original Java munging logic (#90521)
armenzg May 1, 2025
f2589ed
ref: avoid very old fixed dates in test_organization_stats_summary (#…
asottile-sentry May 1, 2025
5362d14
feat(bitbucket-server): CODEOWNERS support and stacktrace linking (#8…
jianyuan May 1, 2025
4909326
fix(saved-searches): Fix saved search sidebar button styles (#90739)
malwilley May 1, 2025
41bf261
fix(ui): optIn banner styling in chonk (#90734)
TkDodo May 1, 2025
7af0067
fix(deletions) Run reattempt deletions more often (#90732)
markstory May 1, 2025
dd71a6a
ref(workflow_engine): Add indices to the alert_rule_id and rule_id fi…
saponifi3d May 1, 2025
93622c5
fix(ui): give focused button in the group a higher zIndex (#90654)
TkDodo May 1, 2025
43f7495
feat(gitlab): Suspect PR comments - Backend (#90249)
jianyuan May 1, 2025
50de2f3
feat(eap-spans): add tpm function (#90741)
DominikB2014 May 1, 2025
8ac64fb
feat(eap): Default unspecified sampling mode to high accuracy (#90704)
narsaynorath May 1, 2025
43e0498
ref(ourlogs): Change default (24h) and max (14d) period for logs (#90…
k-fish May 1, 2025
65cbbbc
fix(ourlogs): Extend allowed page size for logs (#89757)
k-fish May 1, 2025
c5d4899
fixes
roggenkemper May 1, 2025
6438fb2
fix(taskworker) Switch cluster_projects to use project_ids (#90731)
markstory May 1, 2025
08f22e8
fix(autofix): Use org-prefixed urls for autofix (#90181)
jennmueng May 1, 2025
9c322b2
ref(github): Open PR Comment Workflow (#90717)
jianyuan May 1, 2025
a11d352
fix test
roggenkemper May 1, 2025
49723f3
feat(insights): add perf score column to frontend overview (#90736)
DominikB2014 May 1, 2025
7798ab6
chore(issues): Remove streamline experiment (#90730)
leeandher May 1, 2025
0e5250a
feat(releases): Release links that use hovercard will open in drawer …
billyvg May 1, 2025
09df127
fix test
roggenkemper May 1, 2025
846ad47
chore(autofix): Restyle insight cards (#90744)
roaga May 1, 2025
1e0810f
ref(shared-views): Add feature flag check to prefersStackedNav checks…
MichaelSun48 May 1, 2025
8f875d9
fix(explore): Pass type properly for analytics (#90753)
narsaynorath May 1, 2025
b4d35ea
Revert "feat(billing): update cancellation reasons (#90593)"
getsentry-bot May 1, 2025
81c13d4
feat(taskworker): Make ingest errors taskworker compatible (#90340)
enochtangg May 1, 2025
4ce5da7
chore(shared-views): Swap out issue-view-sharing flag for enforce-sta…
MichaelSun48 May 1, 2025
d8dc162
fix(widget-builder): Add tooltip around project filters (#90757)
narsaynorath May 1, 2025
6455535
feat(trace-explorer-ai): Add setup endpoint to create LLM state (#90748)
colin-sentry May 1, 2025
8b90df7
feat(ourlogs): Lock columns to 1 in trace view (#90750)
k-fish May 1, 2025
21b727e
feat(insights): add percentile_if functions (#90752)
DominikB2014 May 1, 2025
a64f27f
feat(explore): Use trace item search query builder (#90711)
Zylphrex May 1, 2025
0f28b05
feat(ai): Add an endpoint which lets you convert freetext into trace …
colin-sentry May 1, 2025
ec456ff
feat(taskworker): Make ingest transactions taskworker compatible (#90…
enochtangg May 1, 2025
0c34250
feat(eap-spans): create failure_rate_if function (#90759)
DominikB2014 May 1, 2025
c0bbb9a
ref: fix organization_stats_v2 test flakiness (#90758)
asottile-sentry May 1, 2025
86fec74
ref(flags): add analytic to track read more clicks in CTA (#90733)
michellewzhang May 1, 2025
4de15f6
feat(autofix): Scroll to section when clicking on sidebar cards (#90747)
roaga May 1, 2025
5020e8d
ref(uptime): Read uptime_status from uptime_subscription (#90434)
evanpurkhiser May 1, 2025
a55817a
fix(explore): Add back is_transaction (#90772)
Zylphrex May 1, 2025
aff05d5
fix(ourlogs): Fix trace id link in attributes being broken (#90777)
k-fish May 1, 2025
18ecc37
fix(aci): Add open periods to project deletion (#90743)
snigdhas May 1, 2025
2320f6f
fix(releases): Fix Release Drawer on reload (#90781)
billyvg May 1, 2025
cd7b9ae
fix(shared-views): Center star and ellipsis buttons (#90770)
MichaelSun48 May 1, 2025
5c36d24
Revert "ref(github): Open PR Comment Workflow (#90717)"
getsentry-bot May 1, 2025
05139d1
style(flags): fix alignment on ff section in issues (#90773)
michellewzhang May 1, 2025
5a14a38
feat(ui): Add `error.cause` to `<ErrorHandler>` (#90749)
billyvg May 1, 2025
065fe65
feat(ui): Fix `/settings/` when user is not part of any orgs (#90771)
billyvg May 1, 2025
acb9b1a
fix(dropdown-menu): Remove custom link behavior (#90713)
malwilley May 1, 2025
9c0bb3d
ref(issue-types): Remove unused issue types from frontend (#90769)
malwilley May 1, 2025
6a6e166
merge?;
roggenkemper May 1, 2025
e8b1431
Merge branch 'roggenkemper/consolidatepublish' of github.com:getsentr…
roggenkemper May 1, 2025
3d0f802
fix test
roggenkemper May 1, 2025
2f44a93
Merge branch 'roggenkemper/consolidatepublish' of github.com:getsentr…
roggenkemper May 1, 2025
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
1 change: 1 addition & 0 deletions .github/actions/artifacts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ runs:
steps:
- name: Download and Verify Codecov CLI
shell: bash
continue-on-error: true
run: |
./.github/actions/artifacts/download_codecov_cli.py
- name: Upload Coverage and Test Results
Expand Down
52 changes: 52 additions & 0 deletions fixtures/page_objects/explore_logs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
from selenium.webdriver.common.by import By

from .base import BasePage
from .global_selection import GlobalSelectionPage


class ExploreLogsPage(BasePage):
def __init__(self, browser, client):
super().__init__(browser)
self.client = client
self.global_selection = GlobalSelectionPage(browser)

def visit_explore_logs(self, org):
self.browser.get(f"/organizations/{org}/explore/logs/")
self.wait_until_loaded()

def toggle_log_row_with_message(self, message):
row = self.get_log_row_with_message(message)
try:
expanded_count = len(
self.browser.find_elements(By.CSS_SELECTOR, '*[data-test-id="fields-tree"]')
)
except Exception:
expanded_count = 0
if expanded_count > 0:
row.click()
# If this is breaking make sure to only have one row expanded at a time.
# TODO: Target the correct field-tree with xpath.
self.browser.wait_until_not('[data-test-id="fields-tree"]')
else:
row.click()
self.browser.wait_until('[data-test-id="fields-tree"]')

return row

def get_log_row_with_message(self, message):
row = self.browser.find_element(
by=By.XPATH,
value=f'//*[@data-test-id="log-table-row" and .//*[contains(text(),"{message}")]]',
)
return row

def get_log_row_columns(self, row):
# The expanded row actually makes a new sibling row that contains the fields-tree.
columns = row.find_elements(
By.XPATH, 'following-sibling::*[1]//*[@data-test-id="attribute-tree-column"]'
)
return columns

def wait_until_loaded(self):
self.browser.wait_until_not('[data-test-id="loading-indicator"]')
self.browser.wait_until_test_id("logs-table")
2 changes: 1 addition & 1 deletion migrations_lockfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ tempest: 0002_make_message_type_nullable

uptime: 0037_fix_drift_default_to_db_default

workflow_engine: 0052_migrate_errored_metric_alerts
workflow_engine: 0053_add_legacy_rule_indices
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ module = [
"sentry.issues.status_change",
"sentry.issues.status_change_consumer",
"sentry.issues.status_change_message",
"sentry.issues.streamline",
"sentry.issues.update_inbox",
"sentry.lang.java.processing",
"sentry.llm.*",
Expand Down
2 changes: 1 addition & 1 deletion requirements-base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ rfc3986-validator>=0.1.1
sentry-arroyo>=2.21.0
sentry-kafka-schemas>=1.2.0
sentry-ophio>=1.1.3
sentry-protos==0.1.72
sentry-protos==0.1.74
sentry-redis-tools>=0.5.0
sentry-relay>=0.9.8
sentry-sdk[http2]>=2.25.1
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev-frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ sentry-forked-djangorestframework-stubs==3.15.3.post1
sentry-forked-email-reply-parser==0.5.12.post1
sentry-kafka-schemas==1.2.0
sentry-ophio==1.1.3
sentry-protos==0.1.72
sentry-protos==0.1.74
sentry-redis-tools==0.5.0
sentry-relay==0.9.8
sentry-sdk==2.27.0
Expand Down
2 changes: 1 addition & 1 deletion requirements-frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ sentry-arroyo==2.21.0
sentry-forked-email-reply-parser==0.5.12.post1
sentry-kafka-schemas==1.2.0
sentry-ophio==1.1.3
sentry-protos==0.1.72
sentry-protos==0.1.74
sentry-redis-tools==0.5.0
sentry-relay==0.9.8
sentry-sdk==2.27.0
Expand Down
14 changes: 14 additions & 0 deletions src/sentry/api/endpoints/organization_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
DEBUG_FILES_ROLE_DEFAULT,
EVENTS_MEMBER_ADMIN_DEFAULT,
GITHUB_COMMENT_BOT_DEFAULT,
GITLAB_COMMENT_BOT_DEFAULT,
HIDE_AI_FEATURES_DEFAULT,
ISSUE_ALERTS_THREAD_DEFAULT,
JOIN_REQUESTS_DEFAULT,
Expand Down Expand Up @@ -199,6 +200,12 @@
bool,
GITHUB_COMMENT_BOT_DEFAULT,
),
(
"gitlabPRBot",
"sentry:gitlab_pr_bot",
bool,
GITLAB_COMMENT_BOT_DEFAULT,
),
(
"issueAlertsThreadFlag",
"sentry:issue_alerts_thread_flag",
Expand Down Expand Up @@ -263,6 +270,7 @@ class OrganizationSerializer(BaseOrganizationSerializer):
githubOpenPRBot = serializers.BooleanField(required=False)
githubNudgeInvite = serializers.BooleanField(required=False)
githubPRBot = serializers.BooleanField(required=False)
gitlabPRBot = serializers.BooleanField(required=False)
issueAlertsThreadFlag = serializers.BooleanField(required=False)
metricAlertsThreadFlag = serializers.BooleanField(required=False)
require2FA = serializers.BooleanField(required=False)
Expand Down Expand Up @@ -793,6 +801,12 @@ class OrganizationDetailsPutSerializer(serializers.Serializer):
required=False,
)

# gitlab features
gitlabPRBot = serializers.BooleanField(
help_text="Specify `true` to allow Sentry to comment on recent pull requests suspected of causing issues. Requires a GitLab integration.",
required=False,
)

# slack features
issueAlertsThreadFlag = serializers.BooleanField(
help_text="Specify `true` to allow the Sentry Slack integration to post replies in threads for an Issue Alert notification. Requires a Slack integration.",
Expand Down
4 changes: 4 additions & 0 deletions src/sentry/api/endpoints/organization_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
errors,
metrics_enhanced_performance,
metrics_performance,
ourlogs,
spans_rpc,
transactions,
)
Expand Down Expand Up @@ -754,6 +755,8 @@ def fn(offset, limit):

data_fn = data_fn_factory(dataset)

max_per_page = 1000 if dataset == ourlogs else None

with handle_query_errors():
# Don't include cursor headers if the client won't be using them
if request.GET.get("noPagination"):
Expand All @@ -779,4 +782,5 @@ def fn(offset, limit):
standard_meta=True,
dataset=dataset,
),
max_per_page=max_per_page,
)
4 changes: 2 additions & 2 deletions src/sentry/api/endpoints/organization_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from sentry.auth.superuser import is_active_superuser
from sentry.db.models.query import in_iexact
from sentry.hybridcloud.rpc import IDEMPOTENCY_KEY_LENGTH
from sentry.issues.streamline import apply_streamline_rollout_group
from sentry.models.organization import Organization, OrganizationStatus
from sentry.models.organizationmember import OrganizationMember
from sentry.models.projectplatform import ProjectPlatform
Expand Down Expand Up @@ -307,6 +306,7 @@ def post(self, request: Request) -> Response:
organization_id=org.id,
)

apply_streamline_rollout_group(organization=org)
# New organizations should not see the legacy UI
org.update_option("sentry:streamline_ui_only", True)

return Response(serialize(org, request.user), status=201)
2 changes: 2 additions & 0 deletions src/sentry/api/endpoints/project_trace_item_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def convert_rpc_attribute_to_json(
column_type = "string"
elif val_type in ["int", "float", "double"]:
column_type = "number"
if val_type == "double":
val_type = "float"
else:
raise BadRequest(f"unknown column type in protobuf: {val_type}")

Expand Down
116 changes: 116 additions & 0 deletions src/sentry/api/endpoints/trace_explorer_ai_query.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
from __future__ import annotations

import logging
from typing import Any

import orjson
import requests
from django.conf import settings
from rest_framework import status
from rest_framework.response import Response

from sentry import features
from sentry.api.api_owners import ApiOwner
from sentry.api.api_publish_status import ApiPublishStatus
from sentry.api.base import region_silo_endpoint
from sentry.api.bases import OrganizationEndpoint
from sentry.models.organization import Organization
from sentry.seer.seer_setup import get_seer_org_acknowledgement, get_seer_user_acknowledgement
from sentry.seer.signed_seer_api import sign_with_seer_secret

logger = logging.getLogger(__name__)

from rest_framework.request import Request


def send_translate_request(org_id: int, project_ids: list[int], natural_language_query: str) -> Any:
"""
Sends a request to seer to create the initial cached prompt / setup the AI models
"""
body = orjson.dumps(
{
"org_id": org_id,
"project_ids": project_ids,
"natural_language_query": natural_language_query,
}
)

response = requests.post(
f"{settings.SEER_AUTOFIX_URL}/v1/assisted-query/translate",
data=body,
headers={
"content-type": "application/json;charset=utf-8",
**sign_with_seer_secret(body),
},
)
response.raise_for_status()
return response.json()


@region_silo_endpoint
class TraceExplorerAIQuery(OrganizationEndpoint):
"""
This endpoint is called when a user visits the trace explorer with the correct flags enabled.
"""

publish_status = {
"POST": ApiPublishStatus.EXPERIMENTAL,
}
owner = ApiOwner.ML_AI

@staticmethod
def post(request: Request, organization: Organization) -> Response:
"""
Checks if we are able to run Autofix on the given group.
"""
project_ids = [int(x) for x in request.data.get("project_ids", [])]
natural_language_query = request.data.get("natural_language_query")

if len(project_ids) == 0 or not natural_language_query:
return Response(
{
"detail": "Missing one or more required parameters: project_ids, natural_language_query"
},
status=status.HTTP_400_BAD_REQUEST,
)

if not features.has(
"organizations:gen-ai-explore-traces", organization=organization, actor=request.user
):
return Response(
{"detail": "Organization does not have access to this feature"},
status=status.HTTP_403_FORBIDDEN,
)

user_acknowledgement = get_seer_user_acknowledgement(
user_id=request.user.id, org_id=organization.id
)
org_acknowledgement = user_acknowledgement or get_seer_org_acknowledgement(
org_id=organization.id
)

if not org_acknowledgement:
return Response(
{"detail": "Organization has not opted in to this feature."},
status=status.HTTP_403_FORBIDDEN,
)

if not settings.SEER_AUTOFIX_URL:
return Response(
{"detail": "Seer is not properly configured."},
status=status.HTTP_500_INTERNAL_SERVER_ERROR,
)
data = send_translate_request(organization.id, project_ids, natural_language_query)

return Response(
{
"status": "ok",
"query": data["query"], # the sentry EQS query as a string
"stats_period": data["stats_period"],
"group_by": list(data.get("group_by", [])),
"visualization": list(
data.get("visualization")
), # [{chart_type: 1, y_axes: ["count_message"]}, ...]
"sort": data["sort"],
}
)
Loading
Loading