Skip to content

migrations(plugins): moved all plugins except slack and PD from test_only_plugins into new_sentry_plugins #15468

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

Merged
merged 3 commits into from
Nov 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def install_sentry_plugins():
from django.conf import settings

install_plugin_apps("sentry.new_apps", settings)
install_plugin_apps("sentry.test_only_apps", settings)

from sentry.runner.initializer import register_plugins

Expand Down
36 changes: 17 additions & 19 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,34 +141,32 @@ def run(self):
entry_points={
"console_scripts": ["sentry = sentry.runner:main"],
"sentry.new_apps": [
"jira_ac = new_sentry_plugins.jira_ac",
"jira = new_sentry_plugins.jira",
"sessionstack = new_sentry_plugins.sessionstack",
],
"sentry.test_only_apps": [
"jira_ac = test_only_plugins.jira_ac",
"jira = test_only_plugins.jira",
],
"sentry.new_plugins": [
"amazon_sqs = new_sentry_plugins.amazon_sqs.plugin:AmazonSQSPlugin",
"asana = new_sentry_plugins.asana.plugin:AsanaPlugin",
"bitbucket = new_sentry_plugins.bitbucket.plugin:BitbucketPlugin",
"clubhouse = new_sentry_plugins.clubhouse.plugin:ClubhousePlugin",
"github = new_sentry_plugins.github.plugin:GitHubPlugin",
"gitlab = new_sentry_plugins.gitlab.plugin:GitLabPlugin",
"heroku = new_sentry_plugins.heroku.plugin:HerokuPlugin",
"jira = new_sentry_plugins.jira.plugin:JiraPlugin",
"jira_ac = new_sentry_plugins.jira_ac.plugin:JiraACPlugin",
"phabricator = new_sentry_plugins.phabricator.plugin:PhabricatorPlugin",
"pivotal = new_sentry_plugins.pivotal.plugin:PivotalPlugin",
"pushover = new_sentry_plugins.pushover.plugin:PushoverPlugin",
"segment = new_sentry_plugins.segment.plugin:SegmentPlugin",
"sessionstack = new_sentry_plugins.sessionstack.plugin:SessionStackPlugin",
"splunk = new_sentry_plugins.splunk.plugin:SplunkPlugin",
"victorops = new_sentry_plugins.victorops.plugin:VictorOpsPlugin",
"vsts = new_sentry_plugins.vsts.plugin:VstsPlugin",
],
"sentry.test_only_plugins": [
"asana = test_only_plugins.asana.plugin:AsanaPlugin",
"bitbucket = test_only_plugins.bitbucket.plugin:BitbucketPlugin",
"clubhouse = test_only_plugins.clubhouse.plugin:ClubhousePlugin",
"github = test_only_plugins.github.plugin:GitHubPlugin",
"gitlab = test_only_plugins.gitlab.plugin:GitLabPlugin",
"heroku = test_only_plugins.heroku.plugin:HerokuPlugin",
"jira = test_only_plugins.jira.plugin:JiraPlugin",
"jira_ac = test_only_plugins.jira_ac.plugin:JiraACPlugin",
"pagerduty = test_only_plugins.pagerduty.plugin:PagerDutyPlugin",
"phabricator = test_only_plugins.phabricator.plugin:PhabricatorPlugin",
"pivotal = test_only_plugins.pivotal.plugin:PivotalPlugin",
"pushover = test_only_plugins.pushover.plugin:PushoverPlugin",
"segment = test_only_plugins.segment.plugin:SegmentPlugin",
"slack = test_only_plugins.slack.plugin:SlackPlugin",
"splunk = test_only_plugins.splunk.plugin:SplunkPlugin",
"victorops = test_only_plugins.victorops.plugin:VictorOpsPlugin",
"vsts = test_only_plugins.vsts.plugin:VstsPlugin",
],
},
classifiers=[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from test_only_plugins.client import AuthApiClient
from new_sentry_plugins.client import AuthApiClient
from six import text_type


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from sentry.plugins.bases.issue2 import IssuePlugin2, IssueGroupActionEndpoint
from sentry.utils.http import absolute_uri

from test_only_plugins.base import CorePluginMixin
from new_sentry_plugins.base import CorePluginMixin
from .client import AsanaClient


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from __future__ import absolute_import

from test_only_plugins.base import assert_package_not_installed
from new_sentry_plugins.base import assert_package_not_installed

assert_package_not_installed("sentry-bitbucket")
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from requests_oauthlib import OAuth1
from unidiff import PatchSet

from test_only_plugins.client import AuthApiClient
from new_sentry_plugins.client import AuthApiClient


class BitbucketClient(AuthApiClient):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from sentry.exceptions import PluginError

from test_only_plugins.base import CorePluginMixin
from new_sentry_plugins.base import CorePluginMixin

from .client import BitbucketClient

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from sentry.plugins.bases.issue2 import IssuePlugin2, IssueGroupActionEndpoint
from sentry.utils.http import absolute_uri

from test_only_plugins.exceptions import ApiError
from new_sentry_plugins.exceptions import ApiError

from .mixins import BitbucketMixin
from .repository_provider import BitbucketRepositoryProvider
Expand Down Expand Up @@ -49,7 +49,7 @@ def get_group_urls(self):
]

def get_url_module(self):
return "test_only_plugins.bitbucket.urls"
return "new_sentry_plugins.bitbucket.urls"

def is_configured(self, request, project, **kwargs):
return bool(self.get_option("repo", project))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from sentry.plugins import providers
from sentry.utils.http import absolute_uri

from test_only_plugins.exceptions import ApiError
from new_sentry_plugins.exceptions import ApiError

from .endpoints.webhook import parse_raw_user_email, parse_raw_user_name
from .mixins import BitbucketMixin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from test_only_plugins.client import ApiClient
from new_sentry_plugins.client import ApiClient


class ClubhouseClient(ApiClient):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from sentry.plugins.bases.issue2 import IssuePlugin2, IssueGroupActionEndpoint
from sentry.utils.http import absolute_uri

from test_only_plugins.base import CorePluginMixin
from test_only_plugins.utils import get_secret_field_config
from new_sentry_plugins.base import CorePluginMixin
from new_sentry_plugins.utils import get_secret_field_config

from .client import ClubhouseClient

Expand Down
7 changes: 7 additions & 0 deletions src/new_sentry_plugins/github/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from __future__ import absolute_import

from new_sentry_plugins.base import assert_package_not_installed

assert_package_not_installed("sentry-github")

from new_sentry_plugins.github import options # NOQA
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from django.conf import settings
from sentry import options

from test_only_plugins.client import ApiClient, AuthApiClient
from new_sentry_plugins.client import ApiClient, AuthApiClient


class GitHubClientMixin(AuthApiClient):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
from sentry.plugins.providers import RepositoryProvider
from sentry.utils import json

from test_only_plugins.exceptions import ApiError
from test_only_plugins.github.client import GitHubClient
from new_sentry_plugins.exceptions import ApiError
from new_sentry_plugins.github.client import GitHubClient

logger = logging.getLogger("sentry.webhooks")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
from sentry.plugins import providers
from sentry.utils.http import absolute_uri

from test_only_plugins.base import CorePluginMixin
from test_only_plugins.constants import ERR_UNAUTHORIZED, ERR_INTERNAL
from test_only_plugins.exceptions import ApiError
from new_sentry_plugins.base import CorePluginMixin
from new_sentry_plugins.constants import ERR_UNAUTHORIZED, ERR_INTERNAL
from new_sentry_plugins.exceptions import ApiError

from .client import GitHubClient, GitHubAppsClient

Expand Down Expand Up @@ -77,7 +77,7 @@ def get_group_urls(self):
]

def get_url_module(self):
return "test_only_plugins.github.urls"
return "new_sentry_plugins.github.urls"

def is_configured(self, request, project, **kwargs):
return bool(self.get_option("repo", project))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from __future__ import absolute_import

from test_only_plugins.base import assert_package_not_installed
from new_sentry_plugins.base import assert_package_not_installed

assert_package_not_installed("sentry-gitlab")
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from __future__ import absolute_import

from six.moves.urllib.parse import quote
from test_only_plugins.client import ApiClient
from new_sentry_plugins.client import ApiClient

from test_only_plugins.exceptions import ApiError
from new_sentry_plugins.exceptions import ApiError


class GitLabClient(ApiClient):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from sentry.plugins.bases.issue2 import IssuePlugin2
from sentry.utils.http import absolute_uri

from test_only_plugins.base import CorePluginMixin
from test_only_plugins.exceptions import ApiError
from test_only_plugins.utils import get_secret_field_config
from new_sentry_plugins.base import CorePluginMixin
from new_sentry_plugins.exceptions import ApiError
from new_sentry_plugins.utils import get_secret_field_config

from .client import GitLabClient

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from __future__ import absolute_import

from test_only_plugins.base import assert_package_not_installed
from new_sentry_plugins.base import assert_package_not_installed

assert_package_not_installed("sentry-heroku")
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from sentry.models import ApiKey, User, ProjectOption, Repository
from sentry.plugins.interfaces.releasehook import ReleaseHook
from test_only_plugins.base import CorePluginMixin
from new_sentry_plugins.base import CorePluginMixin
from sentry.plugins.base.configuration import react_plugin_config
from sentry.plugins.bases import ReleaseTrackingPlugin

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from __future__ import absolute_import

from test_only_plugins.base import assert_package_not_installed
from new_sentry_plugins.base import assert_package_not_installed

assert_package_not_installed("sentry-jira")
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from sentry.utils.cache import cache
from django.utils.encoding import force_bytes

from test_only_plugins.exceptions import ApiError
from test_only_plugins.client import ApiClient
from new_sentry_plugins.exceptions import ApiError
from new_sentry_plugins.client import ApiClient

log = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
from sentry.plugins.bases.issue2 import IssuePlugin2, IssueGroupActionEndpoint, PluginError
from sentry.utils.http import absolute_uri

from test_only_plugins.base import CorePluginMixin
from test_only_plugins.exceptions import ApiError, ApiUnauthorized
from test_only_plugins.jira.client import JiraClient
from test_only_plugins.utils import get_secret_field_config
from new_sentry_plugins.base import CorePluginMixin
from new_sentry_plugins.exceptions import ApiError, ApiUnauthorized
from new_sentry_plugins.jira.client import JiraClient
from new_sentry_plugins.utils import get_secret_field_config

# A list of common builtin custom field types for JIRA for easy reference.
JIRA_CUSTOM_FIELD_TYPES = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from django.db import models

from sentry.db.models import Model, FlexibleForeignKey
from test_only_plugins.jira_ac.utils import get_query_hash
from new_sentry_plugins.jira_ac.utils import get_query_hash


class JiraTenant(Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from sentry.plugins.base import Plugin

from test_only_plugins.base import CorePluginMixin
from new_sentry_plugins.base import CorePluginMixin


class JiraACPlugin(CorePluginMixin, Plugin):
Expand All @@ -13,4 +13,4 @@ class JiraACPlugin(CorePluginMixin, Plugin):
conf_key = "jira-ac"

def get_url_module(self):
return "test_only_plugins.jira_ac.urls"
return "new_sentry_plugins.jira_ac.urls"
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from django.conf.urls import patterns, url

from test_only_plugins.jira_ac.views import (
from new_sentry_plugins.jira_ac.views import (
JiraConfigView,
JiraDescriptorView,
JiraInstalledCallback,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from six.moves.urllib.parse import quote

from test_only_plugins.exceptions import ApiError
from new_sentry_plugins.exceptions import ApiError


def percent_encode(val):
Expand Down Expand Up @@ -51,7 +51,7 @@ def get_jira_auth_from_request(request):
issuer = decoded["iss"]
# Look up the sharedSecret for the clientKey, as stored
# by the add-on during the installation handshake
from test_only_plugins.jira_ac.models import JiraTenant
from new_sentry_plugins.jira_ac.models import JiraTenant

jira_auth = JiraTenant.objects.get(client_key=issuer)
# Verify the signature with the sharedSecret and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
from sentry.utils.http import absolute_uri
from sentry.web.helpers import render_to_response

from test_only_plugins.jira_ac.forms import JiraConfigForm
from test_only_plugins.jira_ac.models import JiraTenant
from test_only_plugins.jira_ac.utils import get_jira_auth_from_request, ApiError
from new_sentry_plugins.jira_ac.forms import JiraConfigForm
from new_sentry_plugins.jira_ac.models import JiraTenant
from new_sentry_plugins.jira_ac.utils import get_jira_auth_from_request, ApiError
from jwt.exceptions import ExpiredSignatureError

JIRA_KEY = "%s.jira_ac" % (urlparse(absolute_uri()).hostname,)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from sentry.utils.http import absolute_uri
from six.moves.urllib.parse import urljoin

from test_only_plugins.base import CorePluginMixin
from test_only_plugins.utils import get_secret_field_config
from new_sentry_plugins.base import CorePluginMixin
from new_sentry_plugins.utils import get_secret_field_config

import httplib
import json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from __future__ import absolute_import

from test_only_plugins.base import assert_package_not_installed
from new_sentry_plugins.base import assert_package_not_installed

assert_package_not_installed("sentry-pivotal")
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from sentry.utils import json
from six.moves.urllib.parse import urlencode

from test_only_plugins.base import CorePluginMixin
from test_only_plugins.utils import get_secret_field_config
from new_sentry_plugins.base import CorePluginMixin
from new_sentry_plugins.utils import get_secret_field_config


class PivotalPlugin(CorePluginMixin, IssuePlugin2):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from __future__ import absolute_import

from test_only_plugins.base import assert_package_not_installed
from new_sentry_plugins.base import assert_package_not_installed

assert_package_not_installed("sentry-pushover")
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from test_only_plugins.client import ApiClient
from new_sentry_plugins.client import ApiClient


class PushoverClient(ApiClient):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

from sentry.plugins.bases.notify import NotifyPlugin

from test_only_plugins.base import CorePluginMixin
from test_only_plugins.utils import get_secret_field_config
from new_sentry_plugins.base import CorePluginMixin
from new_sentry_plugins.utils import get_secret_field_config

from .client import PushoverClient

Expand Down
Loading