Skip to content

Commit 0f8ed66

Browse files
committed
chore(stackable-versioned): Add FIXME comments
1 parent 502e55d commit 0f8ed66

File tree

2 files changed

+9
-3
lines changed
  • crates
    • stackable-versioned-macros/src/codegen/container/struct
    • stackable-versioned/src

2 files changed

+9
-3
lines changed

crates/stackable-versioned-macros/src/codegen/container/struct/conversion.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ impl Struct {
164164
}
165165
};
166166

167+
// FIXME (@Techassi): Both inserts and removals currently "leak" how the fields are named
168+
// internally in Rust and not what they are serialized as (camelCase most of the time). This
169+
// can be especially confusing for users who look at the status and see those field names.
170+
// Ideally we would integrate with the serde(rename) functionality to produce these field
171+
// names.
167172
let inserts = self.generate_tracking_inserts(direction, next_version, mod_gen_ctx);
168173
let removals = self.generate_tracking_removals(direction, next_version, mod_gen_ctx);
169174
let json_paths = self.generate_json_paths(next_version);

crates/stackable-versioned/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ pub trait TrackingStatus {
5959
}
6060

6161
// NOTE (@Techassi): This struct represents a rough first draft of how tracking values across
62-
// CRD versions can be achieved. It is currently untested and unproven and might change down the
63-
// line. Currently, this struct is only generated by the macro but not actually used by any other
64-
// code. The tracking itself will be introduced in a follow-up PR.
62+
// CRD versions can be achieved. It might change down the line.
63+
// FIXME (@Techassi): Ideally we don't serialize empty maps. Further, we shouldn't serialize the
64+
// changedValues field in the status, if there it is empty. This currently "pollutes" the status
65+
// with empty JSON objects.
6566
/// Contains changed values during upgrades and downgrades of CRDs.
6667
#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize, schemars::JsonSchema)]
6768
pub struct ChangedValues {

0 commit comments

Comments
 (0)