Skip to content

Commit cf2c87c

Browse files
committed
chore(instrumentation): Add comments for future improvements
1 parent 100669a commit cf2c87c

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

rust/helm-sys/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ pub fn uninstall_helm_release(
5656
}
5757
}
5858

59+
// TODO (@NickLarsenNZ): Add tracing to helm-sys, maybe?
60+
// #[instrument]
5961
pub fn check_helm_release_exists(release_name: &str, namespace: &str) -> bool {
6062
let release_name = CString::new(release_name).unwrap();
6163
let namespace = CString::new(namespace).unwrap();

rust/stackable-cockpit/src/utils/chartsource.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ use serde::Deserialize;
44

55
#[derive(Clone, Debug, Deserialize)]
66
pub struct ChartSourceMetadata {
7+
// TODO (@NickLarsenNZ): Add a field for the repo name.
8+
// This would remove the need for the nested HashMaps
9+
// See: around rust/stackablectl/src/cmds/operator.rs:519
710
pub entries: HashMap<String, Vec<ChartSourceEntry>>,
811
}
912

rust/stackablectl/src/cmds/operator.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,19 @@ async fn build_source_index_file_list<'a>(
468468
source_index_files = oci::get_oci_index().await.context(OciSnafu)?;
469469

470470
debug!(count = source_index_files.len(), "OCI Repository entries");
471+
472+
// TODO (@NickLarsenNZ): Look into why this is so deeply nested with duplicate data.
473+
// source_index_files
474+
// .iter()
475+
// .for_each(|(&repo_name, chart_source_metadata)| {
476+
// let x = chart_source_metadata.entries.len();
477+
// tracing::trace!(repo_name, x, "thing");
478+
// let _ = &chart_source_metadata
479+
// .entries
480+
// .iter()
481+
// // y (below) is a Vec
482+
// .for_each(|(x, y)| tracing::error!(x, "blah {:?}", y));
483+
// });
471484
}
472485
ChartSourceType::Repo => {
473486
for helm_repo_name in [

0 commit comments

Comments
 (0)