Skip to content

Commit

Permalink
Merge branch 'master' into feat/crons-ingest-kafka
Browse files Browse the repository at this point in the history
* master: (79 commits)
  feat(perf-issues): Add performance issue detection timing runner command (#44912)
  Revert "chore: Investigating org slug already set to a different value (#45134)"
  fix(hybrid-cloud): Redirect to org restoration page for customer domains (#45159)
  bug(replays): Fix 500 error when marshaling tags field (#45097)
  ref(sourcemaps): Redesign lookup of source and sourcemaps (#45032)
  chore: Investigating org slug already set to a different value (#45134)
  feat(dynamic-sampling): Implement prioritize by project bias [TET-574] (#42939)
  feat(dynamic-sampling): Add transaction name prioritize option - (#45034)
  feat(dyn-sampling): add new bias toggle to project details for prioritise by tx name [TET-717] (#44944)
  feat(admin) Add admin relay project config view [TET-509] (#45120)
  Revert "chore(assignment): Add analytics when autoassigning after a manual assignment (#45099)"
  feat(sourcemaps): Implement new tables supporting debug ids (#44572)
  ref(js): Remove usage of react-document-title (#45170)
  chore(py): Consistently name urls using `organization-` prefix (#45180)
  ref: rename acceptance required checks collector (#45156)
  chore(assignment): Add analytics when autoassigning after a manual assignment (#45099)
  feat(source-maps): Update copy for source map debug alerts (#45164)
  ref(js): Remove custom usage of DocumentTitle (#45165)
  chore(login): update the login banners (#45151)
  ref(py): Remove one more legacy project_id from Environment (#45160)
  ...
  • Loading branch information
jan-auer committed Feb 28, 2023
2 parents d1c6a5a + 7fe102e commit ef4f440
Show file tree
Hide file tree
Showing 246 changed files with 6,209 additions and 1,913 deletions.
23 changes: 3 additions & 20 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,10 @@ jobs:
uses: ./.github/actions/artifacts
if: ${{ always() && needs.files-changed.outputs.backend_all == 'true' }}

visual-diff:
# triggers visual snapshot is a required check so we need this job to
# always run and report a status.
acceptance-required-checks:
# this is a required check so we need this job to always run and report a status.
if: always()
name: triggers visual snapshot
name: Acceptance
needs: [acceptance, files-changed]
runs-on: ubuntu-20.04
timeout-minutes: 20
Expand All @@ -160,19 +159,3 @@ jobs:
api-token: ${{ secrets.VISUAL_SNAPSHOT_SECRET }}
gcs-bucket: 'sentry-visual-snapshots'
gcp-service-account-key: ${{ secrets.SNAPSHOT_GOOGLE_SERVICE_ACCOUNT_KEY }}

# "Visual Snapshot" is a required check, so we either skip the visual tests
# and need to post a status passing OR we run the visual tests and let the
# visual snapshot service post a status.
#
# This handles the skip case and creates a status we skip acceptance tests.
fake-visual-snapshot:
name: Visual Snapshot
needs: [files-changed]
# Opposite condition to "triggers visual snapshot" required check
if: needs.files-changed.outputs.acceptance != 'true'
runs-on: ubuntu-20.04
steps:
- name: Sentaur attack
run: |
echo "This check creates a Visual Snapshot to satisfy Github required checks when we skip acceptance tests."
25 changes: 1 addition & 24 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,29 +119,6 @@ jobs:
if: steps.dependencies.outcome == 'success'
run: yarn tsc -p config/tsconfig.ci.json

webpack:
if: github.ref == 'refs/heads/master' || needs.files-changed.outputs.frontend == 'true'
needs: files-changed
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0

- uses: getsentry/action-setup-volta@54775a59c41065f54ecc76d1dd5f2cdc7a1550cb # v1.1.0

- name: Install dependencies
run: yarn install --frozen-lockfile

- uses: getsentry/size-limit-action@7be9865310d295ad211da9a8464332288d60d837 # v5
env:
SENTRY_INSTRUMENTATION: 1
SENTRY_WEBPACK_WEBHOOK_SECRET: ${{ secrets.SENTRY_WEBPACK_WEBHOOK_SECRET }}
with:
main_branch: master
skip_step: install
build_script: build
windows_verbatim_arguments: false
github_token: ${{ secrets.GITHUB_TOKEN }}

frontend-browser-tests:
if: needs.files-changed.outputs.frontend == 'true'
needs: files-changed
Expand Down Expand Up @@ -249,7 +226,7 @@ jobs:
# It symbolizes that all required Frontend checks have succesfully passed (Or skipped)
# This check is the only required Github check
frontend-required-check:
needs: [typescript-and-lint, webpack, frontend-browser-tests]
needs: [typescript-and-lint, frontend-browser-tests]
name: Frontend
# This is necessary since a failed/skipped dependent job would cause this job to be skipped
if: always()
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/issue-status-helper.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/visual-diff.yml

This file was deleted.

7 changes: 7 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
codecov:
notify:
# The minimum amount of codecov reporting checks that need to complete
# For FE we have 5 checks and for BE we have 11
# TODO: Remove this when we have support of after_n_builds per flag
after_n_builds: 5

# Setting coverage targets per flag
coverage:
status:
Expand Down
22 changes: 22 additions & 0 deletions fixtures/js-stubs/codeOwner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import {GitHubIntegration} from './githubIntegration';

export function CodeOwner(params = {}) {
return {
id: '1225',
raw: '',
dateCreated: '2022-11-18T15:05:47.450354Z',
dateUpdated: '2023-02-24T18:43:08.729490Z',
codeMappingId: '11',
provider: 'github',
codeMapping: GitHubIntegration(),
ownershipSyntax: '',
errors: {
missing_user_emails: [],
missing_external_users: [],
missing_external_teams: [],
teams_without_access: [],
users_without_access: [],
},
...params,
};
}
1 change: 1 addition & 0 deletions fixtures/js-stubs/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type TestStubFixtures = {
Breadcrumb: OverridableStub;
Broadcast: OverridableStub;
BuiltInSymbolSources: OverridableStubList;
CodeOwner: OverridableStub;
Commit: OverridableStub;
CommitAuthor: OverridableStub;
Config: OverridableStub;
Expand Down
2 changes: 1 addition & 1 deletion migrations_lockfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ To resolve this, rebase against latest master and regenerate your migration. Thi
will then be regenerated, and you should be able to merge without conflicts.

nodestore: 0002_nodestore_no_dictfield
sentry: 0360_authenticator_config_type_change
sentry: 0363_debug_id_artifact_bundle
social_auth: 0001_initial
14 changes: 4 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
"@react-types/radio": "^3.3.1",
"@react-types/shared": "^3.8.0",
"@sentry-internal/global-search": "^0.5.7",
"@sentry-internal/rrweb": "^1.104.0",
"@sentry-internal/rrweb-player": "^1.104.0",
"@sentry/integrations": "7.38.0",
"@sentry/node": "7.38.0",
"@sentry/profiling-node": "^0.1.0",
Expand All @@ -68,7 +70,6 @@
"@types/prismjs": "^1.26.0",
"@types/react": "~17.0.14",
"@types/react-date-range": "^1.4.4",
"@types/react-document-title": "^2.0.5",
"@types/react-dom": "~17.0.9",
"@types/react-grid-layout": "^1.3.2",
"@types/react-mentions": "4.1.6",
Expand Down Expand Up @@ -138,7 +139,6 @@
"react": "17.0.2",
"react-autosize-textarea": "7.1.0",
"react-date-range": "^1.4.0",
"react-document-title": "2.0.3",
"react-dom": "17.0.2",
"react-grid-layout": "^1.3.4",
"react-lazyload": "^2.3.0",
Expand All @@ -150,8 +150,6 @@
"react-sparklines": "1.7.0",
"react-virtualized": "^9.22.3",
"reflux": "0.4.1",
"rrweb": "^1.1.3",
"rrweb-player": "^0.7.13",
"screenfull": "^6.0.2",
"scroll-to-element": "^2.0.0",
"sprintf-js": "1.0.3",
Expand All @@ -170,7 +168,6 @@
"@babel/plugin-transform-react-jsx-source": "^7.19.6",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
"@sentry/jest-environment": "^4.0.0-alpha.2",
"@size-limit/preset-small-lib": "^5.0.5",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^12.1.2",
"@testing-library/react-hooks": "^8.0.1",
Expand All @@ -189,13 +186,12 @@
"jest-environment-jsdom": "^29.4.1",
"jest-fail-on-console": "^3.0.2",
"jest-fetch-mock": "^3.0.3",
"jest-junit": "14.0.1",
"jest-junit": "15.0.0",
"jest-sentry-environment": "3.0.0",
"postcss-jsx": "0.36.4",
"postcss-syntax": "0.36.2",
"react-refresh": "0.14.0",
"react-test-renderer": "17.0.2",
"size-limit": "^5.0.5",
"stylelint": "14.8.2",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-recommended": "^8.0.0",
Expand All @@ -208,9 +204,7 @@
"fsevents": "^2.3.2"
},
"resolutions": {
"**/ua-parser-js": "<=0.7.28",
"webpack": "5.75.0",
"style-loader": "^3.3.1"
"**/ua-parser-js": "<=0.7.28"
},
"APIMethod": "stub",
"proxyURL": "http://localhost:8000",
Expand Down
4 changes: 2 additions & 2 deletions requirements-dev-frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ click==8.0.4
confluent-kafka==1.9.2
coverage==6.3.3
croniter==0.3.37
cryptography==38.0.3
cryptography==39.0.1
cssselect==1.0.3
cssutils==2.4.0
datadog==0.29.3
Expand Down Expand Up @@ -120,7 +120,7 @@ pycountry==17.5.14
pycparser==2.21
pyflakes==3.0.1
pyjwt==2.4.0
pyopenssl==22.0.0
pyopenssl==23.0.0
pyparsing==3.0.9
pyrsistent==0.18.1
pysocks==1.7.1
Expand Down
4 changes: 2 additions & 2 deletions requirements-frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ chardet==4.0.0
click==8.0.4
confluent-kafka==1.9.2
croniter==0.3.37
cryptography==38.0.3
cryptography==39.0.1
cssselect==1.0.3
cssutils==2.4.0
datadog==0.29.3
Expand Down Expand Up @@ -82,7 +82,7 @@ pyasn1-modules==0.2.4
pycountry==17.5.14
pycparser==2.21
pyjwt==2.4.0
pyopenssl==22.0.0
pyopenssl==23.0.0
pyparsing==3.0.9
pyrsistent==0.18.1
pysocks==1.7.1
Expand Down
2 changes: 2 additions & 0 deletions src/sentry/api/bases/organization_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from sentry.search.events.types import SnubaParams
from sentry.snuba import (
discover,
functions,
issue_platform,
metrics_enhanced_performance,
metrics_performance,
Expand All @@ -43,6 +44,7 @@
"metrics": metrics_performance,
"profiles": profiles,
"issuePlatform": issue_platform,
"profile_functions": functions,
}


Expand Down
43 changes: 43 additions & 0 deletions src/sentry/api/endpoints/admin_project_configs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
from django.http import Http404
from rest_framework.request import Request
from rest_framework.response import Response

from sentry.api.base import Endpoint, pending_silo_endpoint
from sentry.api.permissions import SuperuserPermission
from sentry.models import Project
from sentry.relay import projectconfig_cache


@pending_silo_endpoint
class AdminRelayProjectConfigsEndpoint(Endpoint):
private = True
permission_classes = (SuperuserPermission,)

def get(self, request: Request) -> Response:
project_id = request.GET.get("projectId")

project_keys = []
if project_id is not None:
try:
project = Project.objects.get_from_cache(id=project_id)
for project_key in project.key_set.all():
project_keys.append(project_key.public_key)

except Exception:
raise Http404

project_key = request.GET.get("projectKey")
if project_key is not None:
project_keys.append(project_key)

configs = {}
for key in project_keys:
cached_config = projectconfig_cache.get(key)
if cached_config is not None:
configs[key] = cached_config
else:
configs[key] = None

# TODO if we don't think we'll add anything to the endpoint
# we may as well return just the configs
return Response({"configs": configs}, status=200)
2 changes: 1 addition & 1 deletion src/sentry/api/endpoints/project_stacktrace_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def fetch_codecov_data(
ref=ref if ref else branch,
ref_type="sha" if ref else "branch",
path=path,
set_timeout=features.has("organizations:codecov-stacktrace-integration-v2", org),
organization=org,
)
if lineCoverage and codecovUrl:
codecov_data = {
Expand Down
Loading

0 comments on commit ef4f440

Please sign in to comment.