Skip to content

Commit

Permalink
soft ripping out PreProcessUpload task (#775)
Browse files Browse the repository at this point in the history
  • Loading branch information
giovanni-guidini authored Aug 27, 2024
1 parent 80d64ad commit 6ef163d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions rollouts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ def owner_slug(owner: Owner) -> str:

__all__ = ["Feature"]

NO_PREPROCESS_UPLOAD = Feature("no_PreProcessUpload")


# By default, features have one variant:
# { "enabled": FeatureVariant(True, 1.0) }
9 changes: 6 additions & 3 deletions upload/views/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
repo_auth_custom_exception_handler,
)
from reports.models import CommitReport, ReportResults
from rollouts import NO_PREPROCESS_UPLOAD
from services.task import TaskService
from upload.helpers import generate_upload_sentry_metrics_tags
from upload.serializers import CommitReportSerializer, ReportResultsSerializer
Expand Down Expand Up @@ -61,9 +62,11 @@ def perform_create(self, serializer):
commit_id=commit.id,
report_type=CommitReport.ReportType.COVERAGE,
)
TaskService().preprocess_upload(
repository.repoid, commit.commitid, instance.code
)

if NO_PREPROCESS_UPLOAD.check_value(identifier=repository.repoid, default=True):
TaskService().preprocess_upload(
repository.repoid, commit.commitid, instance.code
)
sentry_metrics.incr(
"upload",
tags=generate_upload_sentry_metrics_tags(
Expand Down

0 comments on commit 6ef163d

Please sign in to comment.