Skip to content

Conversation

@markstory
Copy link
Member

We'll need to deprecate some of the URL names/mount points for APIs as part of the cells project. I've also fixed the default option names, as prior to this change the default deprecation key name would log an exception for every request. For example, to deprecate one of the group-details URLs, we could use:

@deprecated(datetime(2026, 2, 28, 0, 0, 0, tzinfo=UTC), url_names=["sentry-api-0-group-details"])

Refs INFRENG-200

We'll need to deprecate some of the URL names/mount points for APIs as
part of the cells project. I've also fixed the default option names, as
prior to this change the default deprecation key name would log an
exception for every request. For example, to deprecate one of
the group-details URLs, we could use:

```
@deprecated(datetime(2026, 2, 28, 0, 0, 0, tzinfo=UTC), url_names=["sentry-api-0-group-details"])
```

Refs INFRENG-200
@linear
Copy link

linear bot commented Nov 20, 2025

@markstory markstory requested a review from a team November 20, 2025 20:11
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 20, 2025
except UnknownOption:
logger.exception("Unrecognized deprecation duration %s", key)
brownout_duration = options.get("api.deprecation.brownout-duration-seconds")
brownout_duration = options.get("api.deprecation.brownout-duration")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now matches the default brownout-duration key name. Prior to this, if a deprecated endpoint didn't define key it would log an exception on every request.

@markstory markstory requested a review from a team November 20, 2025 20:19
@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/api/helpers/deprecation.py 0.00% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #103758      +/-   ##
===========================================
- Coverage   80.50%    80.47%   -0.03%     
===========================================
  Files        9274      9278       +4     
  Lines      395963    397289    +1326     
  Branches    25250     25250              
===========================================
+ Hits       318770    319725     +955     
- Misses      76764     77135     +371     
  Partials      429       429              

@markstory markstory merged commit 1fac221 into master Nov 21, 2025
67 checks passed
@markstory markstory deleted the feat-deprecate-url-name branch November 21, 2025 16:49
@github-actions github-actions bot locked and limited conversation to collaborators Dec 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants