-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
ref(hybrid-cloud): use organization_slug in SharedGroupDetails #42792
ref(hybrid-cloud): use organization_slug in SharedGroupDetails #42792
Conversation
src/sentry/api/urls.py
Outdated
@@ -2334,6 +2334,11 @@ | |||
SharedGroupDetailsEndpoint.as_view(), | |||
name="sentry-api-0-shared-group-details", | |||
), | |||
url( | |||
r"^shared/(?P<organization_slug>[^\/]+)/(?:issues|groups)/(?P<share_id>[^\/]+)/$", |
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.
I'm a little concerned about placing the organization slug at various places inside the URL structure, rather than following the "REST-ful noun" pattern of organizations/(?P<organization_slug>[^\/]+)
at the beginning. (I'm not sure how many other mappings are already doing this -- I noticed at least one, after I'd already hit "approve" on it the other day.)
In general, it seems like it's inviting ambiguity. In this case, it looks like we'd be relying on not having an org with "issues" or "groups" as its slug (I don't know if those words are already included in reserved slugs).
When adding org slugs to mappings, would it be plausible to just always follow the pattern of "organizations/
+ org slug + old mapping"? Or am I assuming too much?
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.
it should definitely be possible... i can follow up this PR with another one to modify the ones i've already changed
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.
see #42825
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
r"^issues/(?P<organization_slug>[^\/]+)/(?P<issue_id>[^\/]+)/participants/$", | ||
r"^organizations/(?P<organization_slug>[^\/]+)/issues/(?P<issue_id>[^\/]+)/participants/$", |
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.
Do we need the old URL for participants?
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.
i'm keeping it for now since it's getting some occasional hits
Adds organization_slug to the url for the SharedGroupDetails endpoint. Keeps the original orgless URL for now.
Also fixes the GroupParticipants url with organization_slug to have the
/organizations/{organization_slug}/
... formatFor HC-516