Returns a new `RunPart` with the given suffix appended to `run_part_id`. The suffix is a structured key-value map that gets: - serialized as JSON and appended to `run_part_id` (e.g. `job_name-{"executor":"valgrind","run-index":0}`) - merged into the `metadata` field This is used to differentiate multiple uploads within the same run (e.g., different executors, or multiple invocations in the same
(mut self, suffix: BTreeMap<String, Value>)
| 120 | /// This is used to differentiate multiple uploads within the same run |
| 121 | /// (e.g., different executors, or multiple invocations in the same CI job). |
| 122 | pub fn with_suffix(mut self, suffix: BTreeMap<String, Value>) -> Self { |
| 123 | if suffix.is_empty() { |
| 124 | return self; |
| 125 | } |
| 126 | let suffix_str = serde_json::to_string(&suffix).expect("Unable to serialize suffix"); |
| 127 | self.run_part_id = format!("{}-{}", self.run_part_id, suffix_str); |
| 128 | self.metadata.extend(suffix); |
| 129 | self |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)] |
no test coverage detected