This repository was archived by the owner on May 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 TestInstance ,
1111)
1212
13- from services .test_analytics .ta_metrics import process_flakes_summary
14-
1513log = logging .getLogger (__name__ )
1614
1715
1816FLAKE_EXPIRY_COUNT = 30
1917
2018
21- @process_flakes_summary .labels ("old" ).time ()
2219def process_flake_for_repo_commit (
2320 repo_id : int ,
2421 commit_id : str ,
Original file line number Diff line number Diff line change @@ -77,7 +77,6 @@ def handle_failure(
7777 curr_flakes [test_id ] = new_flake
7878
7979
80- @process_flakes_summary .labels ("new" ).time ()
8180def process_flakes_for_commit (repo_id : int , commit_id : str ):
8281 uploads = get_relevant_uploads (repo_id , commit_id )
8382
@@ -116,7 +115,8 @@ def process_flakes_for_repo(repo_id: int):
116115 with redis_client .lock (lock_name , timeout = 300 , blocking_timeout = 3 ):
117116 while commit_ids := redis_client .lpop (key_name , 10 ):
118117 for commit_id in commit_ids :
119- process_flakes_for_commit (repo_id , commit_id .decode ())
118+ with process_flakes_summary .labels ("new" ).time ():
119+ process_flakes_for_commit (repo_id , commit_id .decode ())
120120 return True
121121 except LockError :
122122 log .warning ("Failed to acquire lock for repo %s" , repo_id )
Original file line number Diff line number Diff line change 99
1010from app import celery_app
1111from services .processing .flake_processing import process_flake_for_repo_commit
12+ from services .test_analytics .ta_metrics import process_flakes_summary
1213from services .test_analytics .ta_process_flakes import process_flakes_for_repo
1314from tasks .base import BaseCodecovTask
1415
@@ -89,7 +90,8 @@ def run_impl(
8990 break
9091
9192 for commit_sha in commit_shas :
92- process_func (repo_id , commit_sha .decode ())
93+ with process_flakes_summary .labels ("old" ).time ():
94+ process_func (repo_id , commit_sha .decode ())
9395
9496 except LockError :
9597 log .warning ("Unable to acquire process flakeslock for key %s." , lock_name )
You can’t perform that action at this time.
0 commit comments