From db6c6044ea2181c8ceefea213b6b5f948558b95b Mon Sep 17 00:00:00 2001 From: Esteban Borai Date: Thu, 21 Nov 2024 18:42:50 -0300 Subject: [PATCH] chore: update versions for refs --- .../fluvio-smartengine/src/transformation.rs | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/crates/fluvio-smartengine/src/transformation.rs b/crates/fluvio-smartengine/src/transformation.rs index c83ffb2c27..ecdf139b2a 100644 --- a/crates/fluvio-smartengine/src/transformation.rs +++ b/crates/fluvio-smartengine/src/transformation.rs @@ -1,12 +1,11 @@ -use std::{ - collections::BTreeMap, - fmt::{self, Display}, - path::PathBuf, - fs::File, - io::Read, - ops::Deref, - time::Duration, -}; +use std::collections::BTreeMap; +use std::fmt::{self, Display}; +use std::path::PathBuf; +use std::fs::File; +use std::io::Read; +use std::ops::Deref; +use std::time::Duration; + use serde::{ Deserialize, Serialize, Deserializer, de::{Visitor, self, SeqAccess, MapAccess}, @@ -197,7 +196,7 @@ mod tests { TransformationConfig { transforms: vec![ TransformationStep { - uses: "infinyon/jolt@0.1.0".to_string(), + uses: "infinyon/jolt@0.4.1".to_string(), lookback: Some(Lookback{ last: 0, age: Some(Duration::from_secs(3600 * 24 * 7)) }), with: BTreeMap::from([( "spec".to_string(), @@ -205,7 +204,7 @@ mod tests { )]) }, TransformationStep { - uses: "infinyon/jolt@0.1.0".to_string(), + uses: "infinyon/jolt@0.4.1".to_string(), lookback: Some(Lookback{ last: 1, age: None }), with: BTreeMap::from([( "spec".to_string(), @@ -213,7 +212,7 @@ mod tests { )]) }, TransformationStep { - uses: "infinyon/json-sql@0.1.0".to_string(), + uses: "infinyon/json-sql@0.2.1".to_string(), lookback: Some(Lookback{ last: 10, age: Some(Duration::from_secs(12)) }), with: BTreeMap::from([( "mapping".to_string(), @@ -240,8 +239,8 @@ mod tests { fn test_from_vec() { //given let vec = vec![ - r#"{"uses":"infinyon/jolt@0.1.0","invoke":"insert","with":{"spec":"[{\"operation\":\"remove\",\"spec\":{\"length\":\"\"}}]"}}"#, - r#"{"uses":"infinyon/json-sql@0.1.0","invoke":"insert","with":{"mapping":"{\"table\":\"topic_message_demo\",\"map-columns\":{\"fact\":{\"json-key\":\"fact\",\"value\":{\"type\":\"text\",\"required\":true}},\"record\":{\"json-key\":\"$\",\"value\":{\"type\":\"jsonb\",\"required\":true}}}}"}}"#, + r#"{"uses":"infinyon/jolt@0.4.1","invoke":"insert","with":{"spec":"[{\"operation\":\"remove\",\"spec\":{\"length\":\"\"}}]"}}"#, + r#"{"uses":"infinyon/json-sql@0.2.1","invoke":"insert","with":{"mapping":"{\"table\":\"topic_message_demo\",\"map-columns\":{\"fact\":{\"json-key\":\"fact\",\"value\":{\"type\":\"text\",\"required\":true}},\"record\":{\"json-key\":\"$\",\"value\":{\"type\":\"jsonb\",\"required\":true}}}}"}}"#, ]; //when @@ -249,7 +248,7 @@ mod tests { //then assert_eq!(config.transforms.len(), 2); - assert_eq!(config.transforms[0].uses, "infinyon/jolt@0.1.0"); + assert_eq!(config.transforms[0].uses, "infinyon/jolt@0.4.1"); assert_eq!( config.transforms[0].with, BTreeMap::from([( @@ -258,7 +257,7 @@ mod tests { )]) ); - assert_eq!(config.transforms[1].uses, "infinyon/json-sql@0.1.0"); + assert_eq!(config.transforms[1].uses, "infinyon/json-sql@0.2.1"); assert_eq!( config.transforms[1].with, BTreeMap::from([(