Browse Source

Merge branch 'master' into ryan953/update-react-aria

Ryan Albrecht 7 months ago
parent
commit
8416a43fa2

+ 28 - 0
.eslintrc.js

@@ -26,6 +26,17 @@ module.exports = {
       'error',
       {additionalHooks: '(useEffectAfterFirstRender|useMemoWithPrevious)'},
     ],
+    'no-restricted-imports': [
+      'error',
+      {
+        patterns: [
+          {
+            group: ['sentry/components/devtoolbar/*'],
+            message: 'Do not depend on toolbar internals',
+          },
+        ],
+      },
+    ],
 
     // TODO(@anonrig): Remove this from eslint-sentry-config
     'space-infix-ops': 'off',
@@ -44,6 +55,23 @@ module.exports = {
   // and formatting these files.
   ignorePatterns: ['*.json'],
   overrides: [
+    {
+      files: ['static/app/components/devtoolbar/**/*.{ts,tsx}'],
+      rules: {
+        'no-restricted-imports': [
+          'error',
+          {
+            paths: [
+              {
+                name: 'sentry/utils/queryClient',
+                message:
+                  'Import from `@tanstack/react-query` and `./hooks/useFetchApiData` or `./hooks/useFetchInfiniteApiData` instead.',
+              },
+            ],
+          },
+        ],
+      },
+    },
     {
       files: ['static/**/*.spec.{ts,js}', 'tests/js/**/*.{ts,js}'],
       extends: ['plugin:testing-library/react', 'sentry-app/strict'],

+ 3 - 4
.vscode/settings.json

@@ -102,8 +102,7 @@
   "python.testing.pytestEnabled": true,
   "python.testing.unittestEnabled": false,
   "python.testing.pytestPath": "${workspaceFolder}/.venv/bin/pytest",
-  "python.testing.pytestArgs": [
-    "tests"
-  ],
-  "python.analysis.autoImportCompletions": true
+  "python.testing.pytestArgs": ["tests"],
+  "python.analysis.autoImportCompletions": true,
+  "prettier.configPath": "package.json"
 }

+ 0 - 3
api-docs/openapi.json

@@ -117,9 +117,6 @@
     "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/stats/": {
       "$ref": "paths/projects/stats.json"
     },
-    "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/user-feedback/": {
-      "$ref": "paths/projects/user-feedback.json"
-    },
     "/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/hooks/": {
       "$ref": "paths/projects/service-hooks.json"
     },

+ 0 - 175
api-docs/paths/projects/user-feedback.json

@@ -1,175 +0,0 @@
-{
-  "get": {
-    "tags": ["Projects"],
-    "description": "Return a list of user feedback items within this project.",
-    "operationId": "List a Project's User Feedback",
-    "parameters": [
-      {
-        "name": "organization_id_or_slug",
-        "in": "path",
-        "description": "The id or slug of the organization.",
-        "required": true,
-        "schema": {
-          "type": "string"
-        }
-      },
-      {
-        "name": "project_id_or_slug",
-        "in": "path",
-        "description": "The id or slug of the project.",
-        "required": true,
-        "schema": {
-          "type": "string"
-        }
-      }
-    ],
-    "responses": {
-      "200": {
-        "description": "Success",
-        "content": {
-          "application/json": {
-            "schema": {
-              "type": "array",
-              "items": {
-                "$ref": "../../components/schemas/user-feedback.json#/UserFeedback"
-              }
-            },
-            "example": [
-              {
-                "comments": "It broke!",
-                "dateCreated": "2018-11-06T21:20:11.468Z",
-                "email": "jane@example.com",
-                "event": {
-                  "eventID": "14bad9a2e3774046977a21440ddb39b2",
-                  "id": null
-                },
-                "eventID": "14bad9a2e3774046977a21440ddb39b2",
-                "id": "1",
-                "issue": null,
-                "name": "Jane Smith",
-                "user": null
-              }
-            ]
-          }
-        }
-      },
-      "403": {
-        "description": "Forbidden"
-      },
-      "404": {
-        "description": "Not Found"
-      }
-    },
-    "security": [
-      {
-        "auth_token": ["project:read"]
-      }
-    ]
-  },
-  "post": {
-    "tags": ["Projects"],
-    "description": "Submit and associate user feedback with an issue.\n\nFeedback must be received by the server no more than 30 minutes after the event was saved.\n\nAdditionally, within 5 minutes of submitting feedback it may also be overwritten. This is useful in situations where you may need to retry sending a request due to network failures.\n\nIf feedback is rejected due to a mutability threshold, a 409 status code will be returned.\n\nNote: Feedback may be submitted with DSN authentication (see auth documentation).",
-    "operationId": "Submit User Feedback",
-    "parameters": [
-      {
-        "name": "organization_id_or_slug",
-        "in": "path",
-        "description": "The id or slug of the organization.",
-        "required": true,
-        "schema": {
-          "type": "string"
-        }
-      },
-      {
-        "name": "project_id_or_slug",
-        "in": "path",
-        "description": "The id or slug of the project.",
-        "required": true,
-        "schema": {
-          "type": "string"
-        }
-      }
-    ],
-    "requestBody": {
-      "content": {
-        "application/json": {
-          "schema": {
-            "required": ["event_id", "name", "email", "comments"],
-            "type": "object",
-            "properties": {
-              "event_id": {
-                "type": "string",
-                "description": "The event ID. This can be retrieved from the [beforeSend callback](https://docs.sentry.io/platforms/javascript/configuration/filtering/#using-beforesend)."
-              },
-              "name": {
-                "type": "string",
-                "description": "User's name."
-              },
-              "email": {
-                "type": "string",
-                "description": "User's email address."
-              },
-              "comments": {
-                "type": "string",
-                "description": "Comments supplied by user."
-              }
-            }
-          },
-          "example": {
-            "event_id": "14bad9a2e3774046977a21440ddb39b2",
-            "name": "Jane Schmidt",
-            "email": "jane@empowerplant.io",
-            "comments": "It broke!"
-          }
-        }
-      },
-      "required": false
-    },
-    "responses": {
-      "200": {
-        "description": "Success",
-        "content": {
-          "application/json": {
-            "schema": {
-              "$ref": "../../components/schemas/user-feedback.json#/UserFeedback"
-            },
-            "example": {
-              "comments": "It broke!",
-              "dateCreated": "2018-11-06T21:20:11.468Z",
-              "email": "jane@example.com",
-              "event": {
-                "eventID": "14bad9a2e3774046977a21440ddb39b2",
-                "id": null
-              },
-              "eventID": "14bad9a2e3774046977a21440ddb39b2",
-              "id": "1",
-              "issue": null,
-              "name": "Jane Smith",
-              "user": null
-            }
-          }
-        }
-      },
-      "400": {
-        "description": "Bad Input"
-      },
-      "403": {
-        "description": "Forbidden"
-      },
-      "404": {
-        "description": "The requested resource does not exist"
-      },
-      "409": {
-        "description": "Conflict"
-      }
-    },
-    "security": [
-      {
-        "auth_token": ["project:write"]
-      },
-      {
-        "dsn": []
-      }
-    ]
-  }
-}

+ 1 - 1
fixtures/gitlab.py

@@ -1,8 +1,8 @@
 from time import time
 
 from sentry.integrations.gitlab.integration import GitlabIntegration
+from sentry.integrations.models.integration import Integration
 from sentry.models.identity import Identity, IdentityProvider
-from sentry.models.integrations.integration import Integration
 from sentry.models.repository import Repository
 from sentry.silo.base import SiloMode
 from sentry.testutils.cases import APITestCase

+ 1 - 1
fixtures/sdk_crash_detection/crash_event_dart.py

@@ -88,7 +88,7 @@ def get_crash_event_with_frames(frames: Sequence[Mapping[str, str]], **kwargs) -
                 "type": "os",
             },
         },
-        "sdk": {"name": "sentry.dart.flutter", "version": "8.2.0"},
+        "sdk": {"name": "sentry.dart.flutter", "version": "8.2.1"},
         "timestamp": time.time(),
         "type": "error",
     }

+ 1 - 1
fixtures/vsts.py

@@ -6,9 +6,9 @@ from urllib.parse import parse_qs, urlencode, urlparse
 import pytest
 import responses
 
+from sentry.integrations.models.integration import Integration
 from sentry.integrations.vsts import VstsIntegrationProvider
 from sentry.integrations.vsts.integration import VstsIntegration
-from sentry.models.integrations.integration import Integration
 from sentry.silo.base import SiloMode
 from sentry.testutils.cases import IntegrationTestCase
 from sentry.testutils.helpers.integrations import get_installation_of_type

+ 0 - 12
pyproject.toml

@@ -134,7 +134,6 @@ module = [
     "sentry.api.endpoints.group_integration_details",
     "sentry.api.endpoints.group_integrations",
     "sentry.api.endpoints.index",
-    "sentry.api.endpoints.integrations.install_request",
     "sentry.api.endpoints.integrations.sentry_apps.details",
     "sentry.api.endpoints.integrations.sentry_apps.index",
     "sentry.api.endpoints.integrations.sentry_apps.installation.index",
@@ -143,8 +142,6 @@ module = [
     "sentry.api.endpoints.integrations.sentry_apps.requests",
     "sentry.api.endpoints.integrations.sentry_apps.stats.details",
     "sentry.api.endpoints.internal.mail",
-    "sentry.api.endpoints.organization_code_mapping_codeowners",
-    "sentry.api.endpoints.organization_code_mappings",
     "sentry.api.endpoints.organization_details",
     "sentry.api.endpoints.organization_events",
     "sentry.api.endpoints.organization_events_facets",
@@ -163,7 +160,6 @@ module = [
     "sentry.api.endpoints.organization_projects",
     "sentry.api.endpoints.organization_projects_experiment",
     "sentry.api.endpoints.organization_releases",
-    "sentry.api.endpoints.organization_repositories",
     "sentry.api.endpoints.organization_request_project_creation",
     "sentry.api.endpoints.organization_search_details",
     "sentry.api.endpoints.organization_sessions",
@@ -195,14 +191,10 @@ module = [
     "sentry.api.permissions",
     "sentry.api.serializers.models.auth_provider",
     "sentry.api.serializers.models.dashboard",
-    "sentry.api.serializers.models.doc_integration",
     "sentry.api.serializers.models.environment",
     "sentry.api.serializers.models.event",
-    "sentry.api.serializers.models.external_actor",
     "sentry.api.serializers.models.group",
     "sentry.api.serializers.models.group_stream",
-    "sentry.api.serializers.models.integration",
-    "sentry.api.serializers.models.integration_feature",
     "sentry.api.serializers.models.notification_action",
     "sentry.api.serializers.models.organization",
     "sentry.api.serializers.models.plugin",
@@ -213,7 +205,6 @@ module = [
     "sentry.api.serializers.models.team",
     "sentry.api.serializers.models.user",
     "sentry.api.serializers.models.user_identity_config",
-    "sentry.api.serializers.rest_framework.doc_integration",
     "sentry.api.serializers.rest_framework.mentions",
     "sentry.api.serializers.rest_framework.notification_action",
     "sentry.api.serializers.rest_framework.rule",
@@ -308,7 +299,6 @@ module = [
     "sentry.integrations.pagerduty.integration",
     "sentry.integrations.pipeline",
     "sentry.integrations.slack.actions.form",
-    "sentry.integrations.slack.client",
     "sentry.integrations.slack.integration",
     "sentry.integrations.slack.message_builder.issues",
     "sentry.integrations.slack.message_builder.notifications.digest",
@@ -338,7 +328,6 @@ module = [
     "sentry.middleware.auth",
     "sentry.middleware.ratelimit",
     "sentry.middleware.superuser",
-    "sentry.models.integrations.external_issue",
     "sentry.models.integrations.sentry_app_installation",
     "sentry.models.organizationaccessrequest",
     "sentry.monitors.consumers.monitor_consumer",
@@ -388,7 +377,6 @@ module = [
     "sentry.sentry_apps.installations",
     "sentry.sentry_metrics.consumers.indexer.slicing_router",
     "sentry.sentry_metrics.indexer.postgres.postgres_v2",
-    "sentry.shared_integrations.client.base",
     "sentry.shared_integrations.client.proxy",
     "sentry.similarity.features",
     "sentry.snuba.errors",

+ 1 - 1
requirements-base.txt

@@ -65,7 +65,7 @@ sentry-arroyo>=2.16.5
 sentry-kafka-schemas>=0.1.101
 sentry-ophio==0.2.7
 sentry-redis-tools>=0.1.7
-sentry-relay>=0.9.0
+sentry-relay>=0.9.1
 sentry-sdk>=2.11.0
 slack-sdk>=3.27.2
 snuba-sdk>=2.0.33

+ 2 - 2
requirements-dev-frozen.txt

@@ -180,12 +180,12 @@ selenium==4.16.0
 sentry-arroyo==2.16.5
 sentry-cli==2.16.0
 sentry-devenv==1.7.0
-sentry-forked-django-stubs==5.0.2.post6
+sentry-forked-django-stubs==5.0.2.post8
 sentry-forked-djangorestframework-stubs==3.15.0.post1
 sentry-kafka-schemas==0.1.101
 sentry-ophio==0.2.7
 sentry-redis-tools==0.1.7
-sentry-relay==0.9.0
+sentry-relay==0.9.1
 sentry-sdk==2.11.0
 sentry-usage-accountant==0.0.10
 simplejson==3.17.6

Some files were not shown because too many files changed in this diff