@@ -21,7 +21,6 @@ use pb::{
2121#[ cfg( any( test, feature = "testing" ) ) ]
2222use proptest:: prelude:: * ;
2323use serde_json:: Value as JsonValue ;
24- use sync_types:: CanonicalizedUdfPath ;
2524use value:: ConvexValue ;
2625
2726use super :: HttpActionResult ;
@@ -34,10 +33,10 @@ use crate::{
3433 ValidatedPathAndArgs ,
3534} ;
3635
37- #[ derive( Debug , Clone ) ]
38- #[ cfg_attr( any( test, feature = "testing" ) , derive( PartialEq ) ) ]
36+ #[ derive( Clone ) ]
37+ #[ cfg_attr( any( test, feature = "testing" ) , derive( Debug , PartialEq ) ) ]
3938pub struct ActionOutcome {
40- pub udf_path : CanonicalizedUdfPath ,
39+ pub path : CanonicalizedComponentFunctionPath ,
4140 pub arguments : ConvexArray ,
4241 pub identity : InertIdentity ,
4342
@@ -59,16 +58,16 @@ impl ActionOutcome {
5958 identity : InertIdentity ,
6059 rt : impl Runtime ,
6160 udf_server_version : Option < semver:: Version > ,
62- ) -> anyhow :: Result < Self > {
63- Ok ( ActionOutcome {
64- udf_path : path. into_root_udf_path ( ) ? ,
61+ ) -> Self {
62+ ActionOutcome {
63+ path,
6564 arguments,
6665 identity,
6766 unix_timestamp : rt. unix_timestamp ( ) ,
6867 result : Err ( js_error) ,
6968 syscall_trace : SyscallTrace :: new ( ) ,
7069 udf_server_version,
71- } )
70+ }
7271 }
7372
7473 pub ( crate ) fn from_proto (
@@ -92,7 +91,7 @@ impl ActionOutcome {
9291 } ;
9392 let ( path, arguments, udf_server_version) = path_and_args. consume ( ) ;
9493 Ok ( Self {
95- udf_path : path. into_root_udf_path ( ) ? ,
94+ path,
9695 arguments,
9796 identity,
9897 unix_timestamp : unix_timestamp
@@ -110,7 +109,7 @@ impl TryFrom<ActionOutcome> for ActionOutcomeProto {
110109
111110 fn try_from (
112111 ActionOutcome {
113- udf_path : _,
112+ path : _,
114113 arguments : _,
115114 identity : _,
116115 unix_timestamp,
@@ -142,16 +141,16 @@ impl Arbitrary for ActionOutcome {
142141 fn arbitrary_with ( _args : Self :: Parameters ) -> Self :: Strategy {
143142 use proptest:: prelude:: * ;
144143 (
145- any :: < CanonicalizedUdfPath > ( ) ,
144+ any :: < CanonicalizedComponentFunctionPath > ( ) ,
146145 any :: < ConvexArray > ( ) ,
147146 any :: < InertIdentity > ( ) ,
148147 any :: < UnixTimestamp > ( ) ,
149148 any :: < Result < JsonPackedValue , JsError > > ( ) ,
150149 any :: < SyscallTrace > ( ) ,
151150 )
152151 . prop_map (
153- |( udf_path , arguments, identity, unix_timestamp, result, syscall_trace) | Self {
154- udf_path ,
152+ |( path , arguments, identity, unix_timestamp, result, syscall_trace) | Self {
153+ path ,
155154 arguments,
156155 identity,
157156 unix_timestamp,
@@ -228,12 +227,12 @@ mod tests {
228227 #[ test]
229228 fn test_action_udf_outcome_roundtrips( udf_outcome in any:: <ActionOutcome >( ) ) {
230229 let udf_outcome_clone = udf_outcome. clone( ) ;
231- let udf_path = udf_outcome. udf_path . clone( ) ;
230+ let path = udf_outcome. path . clone( ) ;
232231 let arguments = udf_outcome. arguments. clone( ) ;
233232 let version = udf_outcome. udf_server_version. clone( ) ;
234233 let identity = udf_outcome_clone. identity. clone( ) ;
235234 let path_and_args = ValidatedPathAndArgs :: new_for_tests(
236- udf_path ,
235+ path ,
237236 arguments,
238237 version
239238 ) ;
0 commit comments