diff --git a/packit_service/models.py b/packit_service/models.py index 79525006c..8f916f8ee 100644 --- a/packit_service/models.py +++ b/packit_service/models.py @@ -23,6 +23,7 @@ from cachetools import TTLCache, cached from cachetools.func import ttl_cache +from packit.config import JobConfigTriggerType from sqlalchemy import ( JSON, Boolean, @@ -54,7 +55,6 @@ from sqlalchemy.sql.functions import count from sqlalchemy.types import ARRAY -from packit.config import JobConfigTriggerType from packit_service.constants import ALLOWLIST_CONSTANTS logger = logging.getLogger(__name__) diff --git a/packit_service/worker/events/event.py b/packit_service/worker/events/event.py index 7cc40ad6d..2942446b2 100644 --- a/packit_service/worker/events/event.py +++ b/packit_service/worker/events/event.py @@ -12,8 +12,8 @@ from ogr.abstract import GitProject, PullRequest from ogr.parsing import RepoUrl - from packit.config import JobConfigTriggerType, PackageConfig + from packit_service.config import PackageConfigGetter, ServiceConfig from packit_service.models import ( AbstractProjectObjectDbType, diff --git a/packit_service/worker/handlers/mixin.py b/packit_service/worker/handlers/mixin.py index b4fdec4c2..67c7ac3bd 100644 --- a/packit_service/worker/handlers/mixin.py +++ b/packit_service/worker/handlers/mixin.py @@ -11,6 +11,7 @@ from packit.exceptions import PackitException from packit.utils.koji_helper import KojiHelper from packit.vm_image_build import ImageBuilder + from packit_service.config import ProjectToSync from packit_service.constants import COPR_SRPM_CHROOT, KojiBuildState from packit_service.models import ( diff --git a/packit_service/worker/helpers/build/build_helper.py b/packit_service/worker/helpers/build/build_helper.py index bee485eb0..171902e82 100644 --- a/packit_service/worker/helpers/build/build_helper.py +++ b/packit_service/worker/helpers/build/build_helper.py @@ -10,13 +10,13 @@ from kubernetes.client.rest import ApiException from ogr.abstract import GitProject -from sandcastle import SandcastleTimeoutReached - from packit.config import JobConfig, JobConfigTriggerType, JobType from packit.config.aliases import DEFAULT_VERSION from packit.config.package_config import PackageConfig from packit.exceptions import PackitMergeException from packit.utils import PackitFormatter +from sandcastle import SandcastleTimeoutReached + from packit_service import sentry_integration from packit_service.config import ServiceConfig from packit_service.constants import FAILURE_COMMENT_MESSAGE_VARIABLES diff --git a/packit_service/worker/helpers/build/copr_build.py b/packit_service/worker/helpers/build/copr_build.py index 976f2da89..88b8d832d 100644 --- a/packit_service/worker/helpers/build/copr_build.py +++ b/packit_service/worker/helpers/build/copr_build.py @@ -14,7 +14,6 @@ from ogr.parsing import parse_git_repo from ogr.services.github import GithubProject from ogr.services.gitlab import GitlabProject - from packit.config import JobConfig, JobConfigTriggerType, JobType from packit.config.aliases import get_aliases from packit.config.common_package_config import Deployment, MockBootstrapSetup @@ -25,6 +24,7 @@ PackitCoprSettingsException, ) from packit.utils.source_script import create_source_script + from packit_service import sentry_integration from packit_service.celerizer import celery_app from packit_service.config import ServiceConfig diff --git a/packit_service/worker/helpers/build/koji_build.py b/packit_service/worker/helpers/build/koji_build.py index 9bc0cc563..67b37766b 100644 --- a/packit_service/worker/helpers/build/koji_build.py +++ b/packit_service/worker/helpers/build/koji_build.py @@ -5,11 +5,11 @@ from typing import Optional from ogr.abstract import GitProject - from packit.config import JobConfig, JobType from packit.config.aliases import get_all_koji_targets, get_koji_targets from packit.config.package_config import PackageConfig from packit.exceptions import PackitCommandFailedError + from packit_service import sentry_integration from packit_service.config import ServiceConfig from packit_service.constants import MSG_RETRIGGER diff --git a/packit_service/worker/helpers/testing_farm.py b/packit_service/worker/helpers/testing_farm.py index 3f61e45cb..b0db5c210 100644 --- a/packit_service/worker/helpers/testing_farm.py +++ b/packit_service/worker/helpers/testing_farm.py @@ -10,11 +10,11 @@ import requests from ogr.abstract import GitProject from ogr.utils import RequestResponse - from packit.config import JobConfig, PackageConfig from packit.constants import HTTP_REQUEST_TIMEOUT from packit.exceptions import PackitConfigException, PackitException from packit.utils import nested_get + from packit_service.config import ServiceConfig from packit_service.constants import ( BASE_RETRY_INTERVAL_IN_MINUTES_FOR_OUTAGES, diff --git a/tests/integration/test_check_rerun.py b/tests/integration/test_check_rerun.py index b262f939f..8aa705219 100644 --- a/tests/integration/test_check_rerun.py +++ b/tests/integration/test_check_rerun.py @@ -8,10 +8,10 @@ from flexmock import flexmock from github.MainClass import Github from ogr.services.github import GithubProject - from packit.config import JobConfigTriggerType from packit.copr_helper import CoprHelper from packit.local_project import LocalProject + from packit_service.constants import ( TASK_ACCEPTED, ) diff --git a/tests/integration/test_listen_to_fedmsg.py b/tests/integration/test_listen_to_fedmsg.py index 60adbc20a..ba966bdce 100644 --- a/tests/integration/test_listen_to_fedmsg.py +++ b/tests/integration/test_listen_to_fedmsg.py @@ -13,8 +13,6 @@ from flexmock import flexmock from ogr.services.github import GithubProject from ogr.utils import RequestResponse - -import packit_service.service.urls as urls from packit.config import ( CommonPackageConfig, JobConfig, @@ -26,6 +24,8 @@ from packit.copr_helper import CoprHelper from packit.local_project import LocalProject from packit.utils.koji_helper import KojiHelper + +import packit_service.service.urls as urls from packit_service.config import PackageConfigGetter, ServiceConfig from packit_service.constants import COPR_API_FAIL_STATE, DEFAULT_RETRY_LIMIT from packit_service.models import ( diff --git a/tests/integration/test_pr_comment.py b/tests/integration/test_pr_comment.py index 2e4398f0b..7ef27a0a0 100644 --- a/tests/integration/test_pr_comment.py +++ b/tests/integration/test_pr_comment.py @@ -12,9 +12,6 @@ from ogr.services.github import GithubProject, GithubService from ogr.services.pagure import PagureProject from ogr.utils import RequestResponse - -import packit_service.models -import packit_service.service.urls as urls from packit.api import PackitAPI from packit.config import ( JobConfigTriggerType, @@ -25,6 +22,9 @@ from packit.local_project import LocalProject, LocalProjectBuilder from packit.upstream import GitUpstream from packit.utils.koji_helper import KojiHelper + +import packit_service.models +import packit_service.service.urls as urls from packit_service.config import ServiceConfig from packit_service.constants import ( COMMENT_REACTION, diff --git a/tests/unit/events/test_github.py b/tests/unit/events/test_github.py index 9f8bd2d9c..e5d0c2437 100644 --- a/tests/unit/events/test_github.py +++ b/tests/unit/events/test_github.py @@ -8,8 +8,8 @@ from flexmock import flexmock from ogr import GithubService from ogr.services.github import GithubProject - from packit.config import JobConfigTriggerType + from packit_service.config import PackageConfigGetter from packit_service.models import ( AllowlistStatus, diff --git a/tests/unit/test_build_helper.py b/tests/unit/test_build_helper.py index f7573c1af..651721978 100644 --- a/tests/unit/test_build_helper.py +++ b/tests/unit/test_build_helper.py @@ -3,7 +3,6 @@ import pytest from flexmock import flexmock - from packit.config import ( CommonPackageConfig, JobConfig, @@ -19,6 +18,7 @@ from packit.copr_helper import CoprHelper from packit.local_project import LocalProject from packit.utils.repo import RepositoryCache + from packit_service.config import ServiceConfig from packit_service.models import ProjectEventModelType from packit_service.worker.helpers.build.copr_build import CoprBuildJobHelper diff --git a/tests/unit/test_koji_build.py b/tests/unit/test_koji_build.py index 47f288ccf..b7ea4935c 100644 --- a/tests/unit/test_koji_build.py +++ b/tests/unit/test_koji_build.py @@ -6,7 +6,6 @@ import pytest from flexmock import flexmock from ogr.abstract import GitProject - from packit.api import PackitAPI from packit.config import ( CommonPackageConfig, @@ -17,6 +16,7 @@ ) from packit.exceptions import PackitCommandFailedError from packit.upstream import GitUpstream + from packit_service import sentry_integration from packit_service.config import ServiceConfig from packit_service.models import (