Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
0d78554
chore: Add edition to rustfmt override command
Techassi Jun 13, 2025
c3d48ae
fix(stackable-versioned): Finish error accumulator
Techassi Jun 17, 2025
0f1e0a5
refactor(stackable-versioned): Simplify and improve From code generation
Techassi Jun 17, 2025
a86bf17
refactor(stackable-versioned): Remove standalone and non-K8s specific…
Techassi Jun 26, 2025
9583068
chore: Adjust CRD code to reflect attribute changes
Techassi Jun 26, 2025
4009271
feat!(stackable-versioned): Add conversion tracking
Techassi Jun 26, 2025
19017f2
fix(stackable-versioned): Fix edge-cases uncovered by UI tests
Techassi Jul 4, 2025
26e5565
test(stackable-versioned): Adjust test inputs and UI stderr snapshots
Techassi Jul 4, 2025
e8c0d93
fix(stackable-versioned): Use trait from core, use correct boolean expr
Techassi Jul 4, 2025
36ecc20
fix(stackable-versioned): Remove minor errors in generated code
Techassi Jul 4, 2025
88d9050
test(stackable-version): Review and accept updated snapshots
Techassi Jul 4, 2025
7bfc2bb
test(stackable-versioned): Adjust existing integration tests
Techassi Jul 4, 2025
502e55d
test(stackable-versioned): Add conversion roundtrip integration test
Techassi Jul 4, 2025
0f8ed66
chore(stackable-versioned): Add FIXME comments
Techassi Jul 4, 2025
277c2b1
chore(stackable-operator): Add required Default derive to ListenerStatus
Techassi Jul 4, 2025
045e980
chore(stackable-versioned): Remove unused k8s-version dependency
Techassi Jul 4, 2025
dc46e64
fix(stackable-versioned): Add missing trailing comma in generated code
Techassi Jul 8, 2025
968a52c
test(stackable-versioned): Add additional status field
Techassi Jul 8, 2025
a0e1fcd
fix(stackable-versioned): Only emit tracking_into if opted in
Techassi Jul 8, 2025
13625c9
docs(stackable-versioned): Update doc comments
Techassi Jul 8, 2025
8f26e01
chore(stackable-versioned): Ignore code block in doc comment
Techassi Jul 8, 2025
20427af
feat(stackable-versioned): Use proper JSONPath syntax
Techassi Jul 8, 2025
790bfb5
chore(stackable-versioned): Use BTreeMap instead of HashMap
Techassi Jul 8, 2025
db85e29
chore(stackable-versioned): Use jsonPath instead of fieldName as fiel…
Techassi Jul 8, 2025
6a9005f
test(stackable-versioned): Update person name
Techassi Jul 9, 2025
6cf798e
chore(stackable-operator): Sort deps alphabetically
Techassi Jul 9, 2025
c3a8dff
chore(stackable-versioned): Remove udeps ignores
Techassi Jul 9, 2025
88f1df8
chore(stackable-versioned): Replace matches! with match
Techassi Jul 9, 2025
1bbe77b
chore(stackable-versioned): Re-add some udeps ignores
Techassi Jul 9, 2025
ec4005b
chore(stackable-versioned): Move some deps back
Techassi Jul 9, 2025
b73d475
chore: Merge branch 'main' into feat/stackable-versioned-conversion-t…
Techassi Jul 9, 2025
2cfb3c9
test(stackable-versioned): Simplify gender defaulting
Techassi Jul 9, 2025
a2f2486
chore: Merge branch 'main' into feat/stackable-versioned-conversion-t…
Techassi Jul 9, 2025
65a768c
fix(stackable-versioned): Pass JSONPath variable by reference
Techassi Jul 9, 2025
710d69b
chore(stackable-versioned): Error if nested is used without experimen…
Techassi Jul 9, 2025
af66cf5
test(stackable-versioned): Fix doc test
Techassi Jul 9, 2025
97b1a41
chore(stackable-versioned): Update changelog
Techassi Jul 10, 2025
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore(stackable-versioned): Use jsonPath instead of fieldName as fiel…
…d name
  • Loading branch information
Techassi committed Jul 8, 2025
commit db85e2941ca19692d1ef2e38e1711fd9cff881fc
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ impl Struct {
Some(quote! {
// NOTE (@Techassi): This is an awkward thing to do. Can we possibly use &str for the keys here?
if let Some(upgrades) = status.changes().upgrades.remove(&#next_version_string.to_owned()) {
for #versioned_path::ChangedValue { field_name, value } in upgrades {
match field_name {
for #versioned_path::ChangedValue { json_path, value } in upgrades {
match json_path {
#match_arms
_ => unreachable!(),
}
Expand Down
4 changes: 2 additions & 2 deletions crates/stackable-versioned-macros/src/codegen/item/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ impl VersionedField {

Some(quote! {
upgrades.push(#versioned_path::ChangedValue {
field_name: #json_path_ident,
json_path: #json_path_ident,
value: #serde_yaml_path::to_value(&#from_struct_ident.#ident).unwrap(),
});
})
Expand Down Expand Up @@ -347,7 +347,7 @@ impl VersionedField {
let json_path_ident = format_ident!("__sv_{}_path", ident.as_ident());

Some(quote! {
field_name if field_name == #json_path_ident => {
json_path if json_path == #json_path_ident => {
spec.#ident = serde_yaml::from_value(value).unwrap();
},
})
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/stackable-versioned/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub struct ChangedValues {
#[serde(rename_all = "camelCase")]
pub struct ChangedValue {
/// The name of the field of the custom resource this value is for.
pub field_name: String,
pub json_path: String,

/// The value to be used when upgrading or downgrading the custom resource.
#[schemars(schema_with = "raw_object_schema")]
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.