This repository was archived by the owner on Jun 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +3
-12
lines changed Expand file tree Collapse file tree 4 files changed +3
-12
lines changed Original file line number Diff line number Diff line change 11import json
2- from unittest .mock import Mock , call , patch
2+ from unittest .mock import Mock , patch
33
44from ariadne import ObjectType , make_executable_schema
55from ariadne .validation import cost_directive
Original file line number Diff line number Diff line change @@ -818,8 +818,6 @@ def generate_upload_prometheus_metrics_tags(
818818 "upload_version" : upload_version ,
819819 }
820820
821- for field , value in optional_fields .items ():
822- if value or fill_labels :
823- metrics_tags [field ] = value
821+ metrics_tags .update ({field : value for field , value in optional_fields .items () if value or fill_labels })
824822
825823 return metrics_tags
Original file line number Diff line number Diff line change 22
33from rest_framework .exceptions import NotAuthenticated
44from rest_framework .generics import ListCreateAPIView
5- from shared .metrics import Counter
65
76from codecov_auth .authentication .repo_auth import (
87 GitHubOIDCTokenAuthentication ,
Original file line number Diff line number Diff line change 1616from rest_framework .exceptions import ValidationError
1717from rest_framework .permissions import AllowAny
1818from rest_framework .views import APIView
19- from shared .metrics import metrics , Counter
19+ from shared .metrics import metrics
2020
2121from codecov .db import sync_to_async
2222from codecov_auth .commands .owner import OwnerCommands
4545
4646log = logging .getLogger (__name__ )
4747
48- API_UPLOAD_COUNTER = Counter (
49- "api_upload" ,
50- "Number of times API upload endpoint request starts" ,
51- ["version" ],
52- )
53-
5448
5549class PlainTextRenderer (renderers .BaseRenderer ):
5650 media_type = "text/plain"
You can’t perform that action at this time.
0 commit comments