File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ impl RunIndexState {
3636 . join ( ".codspeed" )
3737 . join ( "run-state" )
3838 . join ( run_id)
39- . join ( format ! ( "{}.json" , & run_part_id_hash [ .. 16 ] ) ) ;
39+ . join ( format ! ( "{run_part_id_hash }.json" ) ) ;
4040
4141 Self { state_file_path }
4242 }
Original file line number Diff line number Diff line change @@ -100,23 +100,20 @@ pub trait RunEnvironmentProvider {
100100 // Apply run index suffix to run_part if applicable.
101101 // This differentiates multiple uploads within the same CI job execution
102102 // (e.g., running both simulation and memory benchmarks in the same job).
103- let run_part = match self . get_run_provider_run_part ( ) {
104- Some ( run_part) => {
105- let run_index_state = RunIndexState :: new (
106- & run_environment_metadata. repository_root_path ,
107- & run_part. run_id ,
108- & run_part. run_part_id ,
109- ) ;
110- match run_index_state. get_and_increment ( ) {
111- Ok ( run_index) => Some ( run_part. with_run_index ( run_index) ) ,
112- Err ( e) => {
113- warn ! ( "Failed to track run index: {e}. Continuing with index 0." ) ;
114- Some ( run_part. with_run_index ( 0 ) )
115- }
103+ let run_part = self . get_run_provider_run_part ( ) . map ( |run_part| {
104+ let run_index_state = RunIndexState :: new (
105+ & run_environment_metadata. repository_root_path ,
106+ & run_part. run_id ,
107+ & run_part. run_part_id ,
108+ ) ;
109+ match run_index_state. get_and_increment ( ) {
110+ Ok ( run_index) => run_part. with_run_index ( run_index) ,
111+ Err ( e) => {
112+ warn ! ( "Failed to track run index: {e}. Continuing with index 0." ) ;
113+ run_part. with_run_index ( 0 )
116114 }
117115 }
118- None => None ,
119- } ;
116+ } ) ;
120117
121118 Ok ( UploadMetadata {
122119 version : Some ( LATEST_UPLOAD_METADATA_VERSION ) ,
You can’t perform that action at this time.
0 commit comments