File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
crates/runtime-config/src Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -118,14 +118,20 @@ where
118
118
& self ,
119
119
initial_key_values : impl IntoIterator < Item = & ( String , String ) > ,
120
120
) -> anyhow:: Result < ( ) > {
121
+ // We don't want to unnecessarily interact with the default store
122
+ let mut iter = initial_key_values. into_iter ( ) . peekable ( ) ;
123
+ if iter. peek ( ) . is_none ( ) {
124
+ return Ok ( ( ) ) ;
125
+ }
126
+
121
127
let store = self
122
128
. key_value_resolver
123
129
. default ( DEFAULT_KEY_VALUE_STORE_LABEL )
124
130
. expect ( "trigger was misconfigured and lacks a default store" )
125
131
. get ( DEFAULT_KEY_VALUE_STORE_LABEL )
126
132
. await
127
133
. expect ( "trigger was misconfigured and lacks a default store" ) ;
128
- for ( key, value) in initial_key_values {
134
+ for ( key, value) in iter {
129
135
store
130
136
. set ( key, value. as_bytes ( ) )
131
137
. await
You can’t perform that action at this time.
0 commit comments