Skip to content
Draft
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
2 changes: 1 addition & 1 deletion apps/worker/database/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
FlakeSymptomType,
Notification,
NotificationState,
ReportType,
notification_type_status_or_checks,
)
from shared.django_apps.reports.models import ReportType # noqa: F401
from shared.plan.constants import TrialStatus # noqa: F401
8 changes: 2 additions & 6 deletions apps/worker/database/models/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@
import database.models
from database.base import CodecovBaseModel, MixinBaseClass, MixinBaseClassNoExternalID
from database.utils import ArchiveField
from shared.django_apps.enums import (
Decoration,
Notification,
NotificationState,
ReportType,
)
from shared.django_apps.enums import Decoration, Notification, NotificationState
from shared.django_apps.reports.models import ReportType
from shared.django_apps.utils.config import should_write_data_to_storage_config_check
from shared.helpers.github_apps import is_configured
from shared.plan.constants import DEFAULT_FREE_PLAN, PlanName
Expand Down
2 changes: 1 addition & 1 deletion apps/worker/services/bundle_analysis/comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
BundleAnalysisComparison,
BundleAnalysisReportLoader,
)
from shared.django_apps.enums import ReportType
from shared.django_apps.reports.models import ReportType


class ComparisonLoader:
Expand Down
2 changes: 1 addition & 1 deletion apps/worker/services/bundle_analysis/notify/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from services.repository import EnrichedPull
from shared.api_archive.archive import ArchiveService
from shared.bundle_analysis.storage import get_bucket_name
from shared.django_apps.enums import ReportType
from shared.django_apps.reports.models import ReportType

SAMPLE_FOLDER_PATH = Path(__file__).resolve().parent / "tests" / "samples"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
)
from services.repository import get_repo_provider_service
from shared.bundle_analysis import BundleAnalysisReport, BundleAnalysisReportLoader
from shared.django_apps.enums import ReportType
from shared.django_apps.reports.models import ReportType
from shared.torngit.base import TorngitBaseAdapter
from shared.typings.torngit import AdditionalData, UploadType
from shared.validation.types import BundleThreshold
Expand Down
2 changes: 1 addition & 1 deletion apps/worker/services/bundle_analysis/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from shared.django_apps.bundle_analysis.service.bundle_analysis import (
BundleAnalysisCacheConfigService,
)
from shared.django_apps.enums import ReportType
from shared.django_apps.reports.models import ReportType
from shared.metrics import Counter
from shared.reports.enums import UploadState, UploadType
from shared.storage.exceptions import FileNotInStorageError, PutRequestRateLimitError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from shared.bundle_analysis.models import AssetType
from shared.bundle_analysis.storage import get_bucket_name
from shared.config import PATCH_CENTRIC_DEFAULT_CONFIG
from shared.django_apps.enums import ReportType
from shared.django_apps.reports.models import ReportType
from shared.yaml import UserYaml
from tests.helpers import mock_all_plans_and_tiers

Expand Down
2 changes: 1 addition & 1 deletion apps/worker/services/lock_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
DEFAULT_LOCK_TIMEOUT_SECONDS,
)
from shared.config import get_config
from shared.django_apps.enums import ReportType
from shared.django_apps.reports.models import ReportType
from shared.helpers.redis import get_redis_connection # type: ignore

log = logging.getLogger(__name__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from services.yaml import UserYaml
from shared.django_apps.core.models import Commit as DjangoCommit
from shared.django_apps.core.models import Repository as DjangoRepo
from shared.django_apps.enums import ReportType
from shared.django_apps.reports.models import ReportType
from shared.django_apps.reports.tests.factories import (
UploadErrorFactory as DjangoUploadErrorFactory,
)
Expand Down
2 changes: 1 addition & 1 deletion apps/worker/services/test_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from services.urls import get_members_url, get_test_analytics_url
from services.yaml import read_yaml_field
from shared.django_apps.codecov_auth.models import Plan
from shared.django_apps.enums import ReportType
from shared.django_apps.reports.models import ReportType
from shared.plan.constants import TierName
from shared.yaml import UserYaml

Expand Down
2 changes: 1 addition & 1 deletion apps/worker/services/tests/test_lock_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from redis.exceptions import LockError

from services.lock_manager import LockManager, LockRetry, LockType
from shared.django_apps.enums import ReportType
from shared.django_apps.reports.models import ReportType
from tasks.base import BaseCodecovTask


Expand Down
2 changes: 1 addition & 1 deletion apps/worker/tasks/bundle_analysis_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
BUNDLE_ANALYSIS_PROCESSOR_MAX_RETRIES,
bundle_analysis_processor_task_name,
)
from shared.django_apps.enums import ReportType
from shared.django_apps.reports.models import ReportType
from shared.reports.enums import UploadState
from shared.yaml import UserYaml
from tasks.base import BaseCodecovTask
Expand Down
2 changes: 1 addition & 1 deletion apps/worker/tasks/manual_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
notify_task_name,
pulls_task_name,
)
from shared.django_apps.enums import ReportType
from shared.django_apps.reports.models import ReportType
from shared.reports.enums import UploadState
from tasks.base import BaseCodecovTask

Expand Down
8 changes: 2 additions & 6 deletions apps/worker/tasks/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,8 @@
)
from shared.config import get_config
from shared.django_apps.codecov_auth.models import Service
from shared.django_apps.enums import (
CommitErrorTypes,
Decoration,
NotificationState,
ReportType,
)
from shared.django_apps.enums import CommitErrorTypes, Decoration, NotificationState
from shared.django_apps.reports.models import ReportType
from shared.django_apps.upload_breadcrumbs.models import Errors, Milestones
from shared.helpers.redis import Redis, get_redis_connection
from shared.reports.readonly import ReadOnlyReport
Expand Down
2 changes: 1 addition & 1 deletion apps/worker/tasks/notify_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from helpers.checkpoint_logger.flows import UploadFlow
from helpers.notifier import BaseNotifier, NotifierResult
from services.yaml import UserYaml
from shared.django_apps.enums import ReportType
from shared.django_apps.reports.models import ReportType
from tasks.base import BaseCodecovTask, celery_app

log = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion apps/worker/tasks/test_analytics_notifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
)
from shared.celery_config import test_analytics_notifier_task_name
from shared.django_apps.core.models import Repository
from shared.django_apps.enums import ReportType
from shared.django_apps.reports.models import ReportType
from shared.helpers.redis import get_redis_connection
from shared.reports.types import UploadType
from shared.typings.torngit import AdditionalData
Expand Down
2 changes: 1 addition & 1 deletion apps/worker/tasks/test_results_finisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from services.lock_manager import LockManager, LockRetry, LockType
from services.test_analytics.ta_finish_upload import ta_finish_upload
from shared.celery_config import test_results_finisher_task_name
from shared.django_apps.enums import ReportType
from shared.django_apps.reports.models import ReportType
from shared.yaml import UserYaml
from tasks.base import BaseCodecovTask
from tasks.notify import notify_task_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from shared.bundle_analysis.storage import get_bucket_name
from shared.celery_config import BUNDLE_ANALYSIS_PROCESSOR_MAX_RETRIES
from shared.django_apps.bundle_analysis.models import CacheConfig
from shared.django_apps.enums import ReportType
from shared.django_apps.reports.models import ReportType
from shared.storage.exceptions import PutRequestRateLimitError
from tasks.bundle_analysis_processor import BundleAnalysisProcessorTask
from tasks.bundle_analysis_save_measurements import (
Expand Down
2 changes: 1 addition & 1 deletion apps/worker/tasks/tests/unit/test_upload_finisher_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
timeseries_save_commit_measurements_task_name,
upload_breadcrumb_task_name,
)
from shared.django_apps.enums import ReportType
from shared.django_apps.reports.models import ReportType
from shared.django_apps.upload_breadcrumbs.models import (
BreadcrumbData,
Errors,
Expand Down
2 changes: 1 addition & 1 deletion apps/worker/tasks/tests/unit/test_upload_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from services.lock_manager import LockRetry
from services.report import NotReadyToBuildReportYetError, ReportService
from shared.celery_config import upload_breadcrumb_task_name
from shared.django_apps.enums import ReportType
from shared.django_apps.reports.models import ReportType
from shared.django_apps.upload_breadcrumbs.models import (
BreadcrumbData,
Errors,
Expand Down
2 changes: 1 addition & 1 deletion apps/worker/tasks/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from services.test_results import TestResultsReportService
from shared.celery_config import DEFAULT_LOCK_TIMEOUT_SECONDS, upload_task_name
from shared.config import get_config
from shared.django_apps.enums import ReportType
from shared.django_apps.reports.models import ReportType
from shared.django_apps.upload_breadcrumbs.models import Errors, Milestones
from shared.django_apps.user_measurements.models import UserMeasurement
from shared.helpers.redis import get_redis_connection
Expand Down
3 changes: 2 additions & 1 deletion apps/worker/tasks/upload_finisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
timeseries_save_commit_measurements_task_name,
upload_finisher_task_name,
)
from shared.django_apps.enums import CommitErrorTypes, ReportType
from shared.django_apps.enums import CommitErrorTypes
from shared.django_apps.reports.models import ReportType
from shared.django_apps.upload_breadcrumbs.models import Errors, Milestones
from shared.helpers.cache import cache
from shared.helpers.redis import get_redis_connection
Expand Down
6 changes: 0 additions & 6 deletions libs/shared/shared/django_apps/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ class CommitErrorTypes(Enum):
REPO_BOT_INVALID = "repo_bot_invalid"


class ReportType(Enum):
COVERAGE = "coverage"
TEST_RESULTS = "test_results"
BUNDLE_ANALYSIS = "bundle_analysis"


class FlakeSymptomType(Enum):
FAILED_IN_DEFAULT_BRANCH = "failed_in_default_branch"
CONSECUTIVE_DIFF_OUTCOMES = "consecutive_diff_outcomes"
Expand Down
Loading