Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus authored Aug 1, 2024
2 parents 19b8ebc + 6078b8e commit b06588d
Show file tree
Hide file tree
Showing 224 changed files with 3,982 additions and 1,693 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,13 +325,15 @@ jobs:

- run: |
# mypy does not have granular codes so don't allow specific messages to regress
set -euo pipefail
! grep "'Settings' object has no attribute" .artifacts/mypy-all
! grep 'Cannot override class variable' .artifacts/mypy-all
! grep 'Exception type must be derived from BaseException' .artifacts/mypy-all
! grep 'Incompatible default for argument' .artifacts/mypy-all
! grep 'Incompatible return value type (got "HttpResponseBase"' .artifacts/mypy-all
! grep 'Incompatible types in "yield"' .artifacts/mypy-all
! grep 'Module "sentry.*has no attribute' .artifacts/mypy-all
! grep 'Unpacking a string is disallowed' .artifacts/mypy-all
! grep 'base class .* defined the type as.*Permission' .artifacts/mypy-all
! grep 'does not explicitly export attribute' .artifacts/mypy-all
Expand Down
3 changes: 3 additions & 0 deletions api-docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@
"/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"
},
Expand Down
175 changes: 175 additions & 0 deletions api-docs/paths/projects/user-feedback.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
{
"get": {
"tags": ["Projects"],
"description": "Return a list of user feedback items within this project.\n\n*This list does not include submissions from the [User Feedback Widget](https://docs.sentry.io/product/user-feedback/#user-feedback-widget). This is because it is based on an older format called User Reports - read more [here](https://develop.sentry.dev/application/feedback-architecture/#user-reports).*",
"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": "*This endpoint is DEPRECATED. We document it here for older SDKs and users who are still migrating to the [User Feedback Widget](https://docs.sentry.io/product/user-feedback/#user-feedback-widget) or [API](https://docs.sentry.io/platforms/javascript/user-feedback/#user-feedback-api)(multi-platform). If you are a new user, do not use this endpoint - unless you don't have a JS frontend, and your platform's SDK does not offer a feedback API.*\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": []
}
]
}
}
7 changes: 1 addition & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,7 @@ module = [
"sentry.integrations.github.client",
"sentry.integrations.github.integration",
"sentry.integrations.github.issues",
"sentry.integrations.github.repository",
"sentry.integrations.github.webhook",
"sentry.integrations.github_enterprise.integration",
"sentry.integrations.github_enterprise.webhook",
"sentry.integrations.gitlab.client",
"sentry.integrations.gitlab.integration",
"sentry.integrations.gitlab.issues",
Expand Down Expand Up @@ -434,12 +431,10 @@ module = [
"sentry.web.frontend.disabled_member_view",
"sentry.web.frontend.group_plugin_action",
"sentry.web.frontend.idp_email_verification",
"sentry.web.frontend.integration_extension_configuration",
"sentry.web.frontend.js_sdk_loader",
"sentry.web.frontend.newest_issue",
"sentry.web.frontend.oauth_authorize",
"sentry.web.frontend.oauth_token",
"sentry.web.frontend.organization_integration_setup",
"sentry.web.frontend.pipeline_advancer",
"sentry.web.frontend.project_event",
"sentry.web.frontend.react_page",
Expand All @@ -465,7 +460,6 @@ module = [
"tests.sentry.digests.test_notifications",
"tests.sentry.eventstore.test_base",
"tests.sentry.grouping.test_result",
"tests.sentry.identity.test_oauth2",
"tests.sentry.incidents.test_logic",
"tests.sentry.ingest.test_slicing",
"tests.sentry.issues.test_utils",
Expand Down Expand Up @@ -501,6 +495,7 @@ module = [
"sentry.buffer.*",
"sentry.build.*",
"sentry.db.models.fields.citext",
"sentry.db.models.fields.foreignkey",
"sentry.db.models.fields.hybrid_cloud_foreign_key",
"sentry.db.models.fields.types",
"sentry.db.models.manager.*",
Expand Down
10 changes: 5 additions & 5 deletions requirements-dev-frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ django==5.0.7
django-crispy-forms==1.14.0
django-csp==3.8
django-pg-zero-downtime-migrations==0.13
django-stubs-ext==5.0.2
django-stubs-ext==5.0.4
djangorestframework==3.15.2
docker==6.1.3
drf-spectacular==0.26.3
Expand Down Expand Up @@ -101,7 +101,7 @@ mmh3==4.0.0
more-itertools==8.13.0
msgpack==1.0.7
msgpack-types==0.2.0
mypy==1.11.0
mypy==1.11.1
mypy-extensions==1.0.0
nodeenv==1.8.0
oauthlib==3.1.0
Expand Down Expand Up @@ -157,7 +157,7 @@ python-rapidjson==1.8
python-u2flib-server==5.0.0
python-utils==3.3.3
python3-saml==1.15.0
pyupgrade==3.15.0
pyupgrade==3.17.0
pyuwsgi==2.0.23.post0
pyvat==1.3.15
pyyaml==6.0.1
Expand All @@ -179,8 +179,8 @@ s3transfer==0.10.0
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.post8
sentry-devenv==1.8.0
sentry-forked-django-stubs==5.0.4.post1
sentry-forked-djangorestframework-stubs==3.15.0.post1
sentry-kafka-schemas==0.1.102
sentry-ophio==0.2.7
Expand Down
8 changes: 4 additions & 4 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--index-url https://pypi.devinfra.sentry.io/simple

sentry-devenv>=1.7.0
sentry-devenv>=1.8.0

covdefaults>=2.3.0
docker>=6
Expand All @@ -26,7 +26,7 @@ black>=22.10.0
flake8>=7
flake8-bugbear>=22.10
flake8-logging>=1.5
pyupgrade>=3.15
pyupgrade>=3.17
isort>=5.10.1

# For tools/. To be moved into redistributable dev environments.
Expand All @@ -35,11 +35,11 @@ pip-tools>=7.1.0
packaging>=21.3

# for type checking
sentry-forked-django-stubs>=5.0.2.post8
sentry-forked-django-stubs>=5.0.4.post1
sentry-forked-djangorestframework-stubs>=3.15.0.post1
lxml-stubs
msgpack-types>=0.2.0
mypy>=1.11
mypy>=1.11.1
types-beautifulsoup4
types-cachetools
types-croniter
Expand Down
51 changes: 0 additions & 51 deletions scripts/start-colima.py

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/use-colima.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ with open(os.path.expanduser("~/.docker/config.json"), "w") as f:
EOF

echo "Starting colima."
python3 -uS scripts/start-colima.py
devenv colima start

echo "Recreating your postgres volume for use with colima. May take a few minutes."
docker volume create --name sentry_postgres
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/api/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from sentry.auth import access
from sentry.auth.staff import has_staff_option
from sentry.models.environment import Environment
from sentry.organizations.absolute_url import generate_organization_url
from sentry.ratelimits.config import DEFAULT_RATE_LIMIT_CONFIG, RateLimitConfig
from sentry.silo.base import SiloLimit, SiloMode
from sentry.types.ratelimit import RateLimit, RateLimitCategory
Expand Down Expand Up @@ -65,7 +66,6 @@
SuperuserOrStaffFeatureFlaggedPermission,
SuperuserPermission,
)
from .utils import generate_organization_url

__all__ = [
"Endpoint",
Expand Down
Loading

0 comments on commit b06588d

Please sign in to comment.