-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
chore: Remove project template endpoints #109632
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -113,7 +113,6 @@ | |
| from sentry.models.project import Project | ||
| from sentry.models.projectbookmark import ProjectBookmark | ||
| from sentry.models.projectcodeowners import ProjectCodeOwners | ||
| from sentry.models.projecttemplate import ProjectTemplate | ||
| from sentry.models.pullrequest import PullRequestCommit | ||
| from sentry.models.release import Release, ReleaseStatus | ||
| from sentry.models.releasecommit import ReleaseCommit | ||
|
|
@@ -588,17 +587,6 @@ def create_project( | |
|
|
||
| return project | ||
|
|
||
| @staticmethod | ||
|
Contributor
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. Orphaned endpoint file imports from deleted serializer moduleMedium Severity
|
||
| @assume_test_silo_mode(SiloMode.REGION) | ||
| def create_project_template(project=None, organization=None, **kwargs) -> ProjectTemplate: | ||
| if not kwargs.get("name"): | ||
| kwargs["name"] = petname.generate(2, " ", letters=10).title() | ||
|
|
||
| with transaction.atomic(router.db_for_write(Project)): | ||
| project_template = ProjectTemplate.objects.create(organization=organization, **kwargs) | ||
|
|
||
| return project_template | ||
|
|
||
| @staticmethod | ||
| @assume_test_silo_mode(SiloMode.CONTROL) | ||
| def create_data_access_grant(**kwargs): | ||
|
Comment on lines
587
to
592
Contributor
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 Suggested FixThe Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews. |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,6 @@ | |
| from sentry.models.organizationmember import OrganizationMember | ||
| from sentry.models.organizationmemberteam import OrganizationMemberTeam | ||
| from sentry.models.project import Project | ||
| from sentry.models.projecttemplate import ProjectTemplate | ||
| from sentry.models.rule import Rule | ||
| from sentry.models.team import Team | ||
| from sentry.monitors.models import ( | ||
|
|
@@ -216,9 +215,6 @@ def create_project(self, **kwargs) -> Project: | |
| kwargs["teams"] = [self.team] | ||
| return Factories.create_project(**kwargs) | ||
|
|
||
| def create_project_template(self, **kwargs) -> ProjectTemplate: | ||
|
Contributor
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. Removed factory method still used in existing testHigh Severity The Additional Locations (1) |
||
| return Factories.create_project_template(**kwargs) | ||
|
|
||
| def create_project_bookmark(self, project=None, *args, **kwargs): | ||
| if project is None: | ||
| project = self.project | ||
|
|
||


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.
Orphaned endpoint file left with broken imports
Medium Severity
The PR deletes
project_template_detail.py, the serializerproject_template.py, and removes both URL registrations fromurls.py, but leavesproject_templates_index.pyin the codebase. That orphaned file imports from the now-deletedsentry.api.serializers.models.project_template, so any attempt to import it will fail. Since the PR's stated goal is to remove the project template endpoints, this file appears to have been missed.