-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
chore(cells) Add deprecation notices for a few issue endpoints #104471
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,8 +8,10 @@ | |
| from sentry import features | ||
| from sentry.api.api_publish_status import ApiPublishStatus | ||
| from sentry.api.base import region_silo_endpoint | ||
| from sentry.api.helpers.deprecation import deprecated | ||
| from sentry.api.helpers.environments import get_environments | ||
| from sentry.api.utils import get_date_range_from_params | ||
| from sentry.constants import CELL_API_DEPRECATION_DATE | ||
| from sentry.issues.endpoints.bases.group import GroupEndpoint | ||
| from sentry.issues.suspect_flags import Distribution, get_suspect_flag_scores | ||
| from sentry.models.group import Group | ||
|
|
@@ -32,6 +34,7 @@ class ResponseData(TypedDict): | |
| class OrganizationGroupSuspectFlagsEndpoint(GroupEndpoint): | ||
| publish_status = {"GET": ApiPublishStatus.PRIVATE} | ||
|
|
||
| @deprecated(CELL_API_DEPRECATION_DATE, url_names=["sentry-api-0-suspect-flags"]) | ||
| def get(self, request: Request, group: Group) -> Response: | ||
| """Stats bucketed by time.""" | ||
| if not features.has( | ||
|
Comment on lines
34
to
40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The 🔍 Detailed AnalysisThe 💡 Suggested FixUpdate the 🤖 Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews. |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: not a blocker, but this feels a pretty circular to me.
in general i think urls are supposed to reference views rather than the other way round
If possible, I would probably prefer to go the other way and create a new view (which subclasses + reuses the other one) with the correct deprecation markers, or maybe write a helper function that dynamically attaches the deprecations to the original view...
curious what you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that quite a bit more code to add (and later remove)? For issue endpoints we would also need to rebuild the function that generates issue URLs as currently, the same function is reused with different prefixes.