Skip to content

Commit 6fd4aff

Browse files
committed
Merge remote-tracking branch 'origin/master' into sshin/consolidated-checks
2 parents 9a8da6d + 417a017 commit 6fd4aff

File tree

299 files changed

+7846
-16813
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

299 files changed

+7846
-16813
lines changed

.github/actions/setup-sentry/action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,15 @@ runs:
8080
echo "TOTAL_TEST_GROUPS=$MATRIX_INSTANCE_TOTAL" >> $GITHUB_ENV
8181
fi
8282
83+
- name: Clear Python cache
84+
shell: bash --noprofile --norc -eo pipefail -ux {0}
85+
env:
86+
WORKDIR: ${{ inputs.workdir }}
87+
run: |
88+
cd "$WORKDIR"
89+
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
90+
find . -type f -name "*.pyc" -delete 2>/dev/null || true
91+
8392
- uses: astral-sh/setup-uv@884ad927a57e558e7a70b92f2bccf9198a4be546 # v6
8493
with:
8594
version: '0.8.2'

.github/workflows/shuffle-tests.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ concurrency:
2323
env:
2424
SENTRY_SHUFFLE_TESTS: true
2525
jobs:
26-
per-test-coverage:
27-
if: ${{ inputs.per-test-coverage == 'true' || github.event_name == 'schedule' }}
28-
uses: ./.github/workflows/codecov_per_test_coverage.yml
29-
secrets: inherit
3026
backend-test:
3127
name: run backend tests
3228
runs-on: ubuntu-24.04

eslint.config.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import * as emotion from '@emotion/eslint-plugin';
1212
import eslint from '@eslint/js';
1313
import pluginQuery from '@tanstack/eslint-plugin-query';
1414
import prettier from 'eslint-config-prettier';
15-
// @ts-expect-error TS(7016): Could not find a declaration file
1615
import boundaries from 'eslint-plugin-boundaries';
1716
import importPlugin from 'eslint-plugin-import';
1817
import jest from 'eslint-plugin-jest';
@@ -33,6 +32,7 @@ import globals from 'globals';
3332
import invariant from 'invariant';
3433
import typescript from 'typescript-eslint';
3534

35+
// eslint-disable-next-line boundaries/element-types
3636
import * as sentryScrapsPlugin from './static/eslint/eslintPluginScraps/index.mjs';
3737

3838
invariant(react.configs.flat, 'For typescript');
@@ -985,6 +985,9 @@ export default typescript.config([
985985
boundaries,
986986
},
987987
settings: {
988+
// Analyze both static and dynamic imports for boundary checks
989+
// https://www.jsboundaries.dev/docs/setup/settings/#boundariesdependency-nodes
990+
'boundaries/dependency-nodes': ['import', 'dynamic-import'],
988991
// order matters here because of nested directories
989992
'boundaries/elements': [
990993
// --- stories ---
@@ -1099,8 +1102,9 @@ export default typescript.config([
10991102
...boundaries.configs.strict.rules,
11001103
'boundaries/no-ignored': 'off',
11011104
'boundaries/no-private': 'off',
1105+
'boundaries/no-unknown': 'off',
11021106
'boundaries/element-types': [
1103-
'warn',
1107+
'error',
11041108
{
11051109
default: 'disallow',
11061110
message: '${file.type} is not allowed to import ${dependency.type}',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
"eslint": "9.34.0",
204204
"eslint-config-prettier": "10.1.8",
205205
"eslint-import-resolver-typescript": "^3.8.3",
206-
"eslint-plugin-boundaries": "^5.0.1",
206+
"eslint-plugin-boundaries": "5.3.1",
207207
"eslint-plugin-import": "2.32.0",
208208
"eslint-plugin-jest": "29.0.1",
209209
"eslint-plugin-jest-dom": "^5.5.0",

pnpm-lock.yaml

Lines changed: 52 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/sentry/api/endpoints/organization_releases.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@
2424
MergingOffsetPaginator,
2525
OffsetPaginator,
2626
)
27-
from sentry.api.release_search import FINALIZED_KEY, RELEASE_FREE_TEXT_KEY, parse_search_query
27+
from sentry.api.release_search import (
28+
FINALIZED_KEY,
29+
RELEASE_CREATED_KEY,
30+
RELEASE_FREE_TEXT_KEY,
31+
parse_search_query,
32+
)
2833
from sentry.api.serializers import serialize
2934
from sentry.api.serializers.rest_framework import (
3035
ReleaseHeadCommitSerializer,
@@ -166,6 +171,13 @@ def _filter_releases_by_query(queryset, organization, query, filter_params):
166171
negated=negated,
167172
)
168173

174+
if search_filter.key.name == RELEASE_CREATED_KEY:
175+
queryset = queryset.filter(
176+
**{
177+
f"date_added__{OPERATOR_TO_DJANGO[search_filter.operator]}": search_filter.value.raw_value
178+
}
179+
)
180+
169181
return queryset
170182

171183

src/sentry/api/endpoints/project_repo_path_parsing.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
from sentry.integrations.services.integration import RpcIntegration, integration_service
1616
from sentry.integrations.source_code_management.repository import RepositoryIntegration
1717
from sentry.issues.auto_source_code_config.code_mapping import find_roots
18-
from sentry.issues.auto_source_code_config.errors import UnsupportedFrameInfo
18+
from sentry.issues.auto_source_code_config.errors import (
19+
UnexpectedPathException,
20+
UnsupportedFrameInfo,
21+
)
1922
from sentry.issues.auto_source_code_config.frame_info import FrameInfo, create_frame_info
2023
from sentry.models.project import Project
2124
from sentry.models.repository import Repository
@@ -142,7 +145,14 @@ def post(self, request: Request, project: Project) -> Response:
142145

143146
branch = installation.extract_branch_from_source_url(repo, source_url)
144147
source_path = installation.extract_source_path_from_source_url(repo, source_url)
145-
stack_root, source_root = find_roots(frame_info, source_path)
148+
149+
try:
150+
stack_root, source_root = find_roots(frame_info, source_path)
151+
except UnexpectedPathException:
152+
return self.respond(
153+
{"detail": "Could not determine code mapping from provided paths"},
154+
status=status.HTTP_400_BAD_REQUEST,
155+
)
146156

147157
return self.respond(
148158
{

src/sentry/api/release_search.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
RELEASE_FREE_TEXT_KEY = "release_free_text"
1414
FINALIZED_KEY = "finalized"
15+
RELEASE_CREATED_KEY = "release.created"
1516
INVALID_SEMVER_MESSAGE = (
1617
'Invalid format of semantic version. For searching non-semver releases, use "release:" instead.'
1718
)
@@ -25,7 +26,9 @@
2526
SEMVER_BUILD_ALIAS,
2627
SEMVER_PACKAGE_ALIAS,
2728
FINALIZED_KEY,
29+
RELEASE_CREATED_KEY,
2830
},
31+
date_keys={RELEASE_CREATED_KEY},
2932
allow_boolean=False,
3033
free_text_key=RELEASE_FREE_TEXT_KEY,
3134
)

src/sentry/api/urls.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@
162162
)
163163
from sentry.data_export.endpoints.data_export import DataExportEndpoint
164164
from sentry.data_export.endpoints.data_export_details import DataExportDetailsEndpoint
165+
from sentry.data_secrecy.api.waive_data_secrecy import WaiveDataSecrecyEndpoint
165166
from sentry.discover.endpoints.discover_homepage_query import DiscoverHomepageQueryEndpoint
166167
from sentry.discover.endpoints.discover_key_transactions import (
167168
KeyTransactionEndpoint,
@@ -1408,6 +1409,12 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]:
14081409
DataExportDetailsEndpoint.as_view(),
14091410
name="sentry-api-0-organization-data-export-details",
14101411
),
1412+
# Data Secrecy
1413+
re_path(
1414+
r"^(?P<organization_id_or_slug>[^/]+)/data-secrecy/$",
1415+
WaiveDataSecrecyEndpoint.as_view(),
1416+
name="sentry-api-0-data-secrecy",
1417+
),
14111418
# Incidents
14121419
re_path(
14131420
r"^(?P<organization_id_or_slug>[^/]+)/incidents/(?P<incident_identifier>[^/]+)/$",

src/sentry/data_secrecy/api/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)