Skip to content
Merged
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 src/run/run_index_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl RunIndexState {
.join(".codspeed")
.join("run-state")
.join(run_id)
.join(format!("{}.json", &run_part_id_hash[..16]));
.join(format!("{run_part_id_hash}.json"));

Self { state_file_path }
}
Expand Down
27 changes: 12 additions & 15 deletions src/run_environment/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,20 @@ pub trait RunEnvironmentProvider {
// Apply run index suffix to run_part if applicable.
// This differentiates multiple uploads within the same CI job execution
// (e.g., running both simulation and memory benchmarks in the same job).
let run_part = match self.get_run_provider_run_part() {
Some(run_part) => {
let run_index_state = RunIndexState::new(
&run_environment_metadata.repository_root_path,
&run_part.run_id,
&run_part.run_part_id,
);
match run_index_state.get_and_increment() {
Ok(run_index) => Some(run_part.with_run_index(run_index)),
Err(e) => {
warn!("Failed to track run index: {e}. Continuing with index 0.");
Some(run_part.with_run_index(0))
}
let run_part = self.get_run_provider_run_part().map(|run_part| {
let run_index_state = RunIndexState::new(
&run_environment_metadata.repository_root_path,
&run_part.run_id,
&run_part.run_part_id,
);
match run_index_state.get_and_increment() {
Ok(run_index) => run_part.with_run_index(run_index),
Err(e) => {
warn!("Failed to track run index: {e}. Continuing with index 0.");
run_part.with_run_index(0)
}
}
None => None,
};
});

Ok(UploadMetadata {
version: Some(LATEST_UPLOAD_METADATA_VERSION),
Expand Down
Loading