@@ -69,6 +69,7 @@ impl PreComputeArgs {
6969 ) {
7070 Ok ( output_dir) => output_dir,
7171 Err ( e) => {
72+ error ! ( "Failed to read output directory: {e:?}" ) ;
7273 return ( PreComputeArgs :: default ( ) , vec ! [ e] ) ;
7374 }
7475 } ;
@@ -80,11 +81,13 @@ impl PreComputeArgs {
8081 Ok ( s) => match s. to_lowercase ( ) . parse :: < bool > ( ) {
8182 Ok ( value) => value,
8283 Err ( _) => {
84+ error ! ( "Invalid boolean format for IS_DATASET_REQUIRED: {s}" ) ;
8385 exit_causes. push ( ReplicateStatusCause :: PreComputeIsDatasetRequiredMissing ) ;
8486 false
8587 }
8688 } ,
8789 Err ( e) => {
90+ error ! ( "Failed to read IS_DATASET_REQUIRED: {e:?}" ) ;
8891 exit_causes. push ( e) ;
8992 false
9093 }
@@ -97,11 +100,13 @@ impl PreComputeArgs {
97100 Ok ( s) => match s. parse :: < usize > ( ) {
98101 Ok ( value) => value,
99102 Err ( _) => {
103+ error ! ( "Invalid numeric format for IEXEC_BULK_SLICE_SIZE: {s}" ) ;
100104 exit_causes. push ( ReplicateStatusCause :: PreComputeFailedUnknownIssue ) ;
101105 0
102106 }
103107 } ,
104108 Err ( e) => {
109+ error ! ( "Failed to read IEXEC_BULK_SLICE_SIZE: {e:?}" ) ;
105110 exit_causes. push ( e) ;
106111 0
107112 }
@@ -118,6 +123,7 @@ impl PreComputeArgs {
118123 ) {
119124 Ok ( filename) => filename,
120125 Err ( e) => {
126+ error ! ( "Failed to read dataset {i} filename: {e:?}" ) ;
121127 exit_causes. push ( e) ;
122128 continue ;
123129 }
@@ -129,6 +135,7 @@ impl PreComputeArgs {
129135 ) {
130136 Ok ( url) => url,
131137 Err ( e) => {
138+ error ! ( "Failed to read dataset {i} URL: {e:?}" ) ;
132139 exit_causes. push ( e) ;
133140 continue ;
134141 }
@@ -140,6 +147,7 @@ impl PreComputeArgs {
140147 ) {
141148 Ok ( checksum) => checksum,
142149 Err ( e) => {
150+ error ! ( "Failed to read dataset {i} checksum: {e:?}" ) ;
143151 exit_causes. push ( e) ;
144152 continue ;
145153 }
@@ -151,6 +159,7 @@ impl PreComputeArgs {
151159 ) {
152160 Ok ( key) => key,
153161 Err ( e) => {
162+ error ! ( "Failed to read dataset {i} key: {e:?}" ) ;
154163 exit_causes. push ( e) ;
155164 continue ;
156165 }
@@ -166,30 +175,31 @@ impl PreComputeArgs {
166175 Ok ( s) => match s. parse :: < usize > ( ) {
167176 Ok ( value) => value,
168177 Err ( _) => {
178+ error ! ( "Invalid numeric format for IEXEC_INPUT_FILES_NUMBER: {s}" ) ;
169179 exit_causes. push ( ReplicateStatusCause :: PreComputeInputFilesNumberMissing ) ;
170180 0
171181 }
172182 } ,
173183 Err ( e) => {
184+ error ! ( "Failed to read IEXEC_INPUT_FILES_NUMBER: {e:?}" ) ;
174185 exit_causes. push ( e) ;
175186 0
176187 }
177188 } ;
178189
179- let input_files: Vec < String > = ( 1 ..=input_files_nb)
180- . filter_map ( |i| {
181- match get_env_var_or_error (
182- TeeSessionEnvironmentVariable :: IexecInputFileUrlPrefix ( i) ,
183- ReplicateStatusCause :: PreComputeAtLeastOneInputFileUrlMissing ( i) ,
184- ) {
185- Ok ( url) => Some ( url) ,
186- Err ( e) => {
187- exit_causes. push ( e) ;
188- None
189- }
190+ let mut input_files: Vec < String > = Vec :: new ( ) ;
191+ for i in 1 ..=input_files_nb {
192+ match get_env_var_or_error (
193+ TeeSessionEnvironmentVariable :: IexecInputFileUrlPrefix ( i) ,
194+ ReplicateStatusCause :: PreComputeAtLeastOneInputFileUrlMissing ( i) ,
195+ ) {
196+ Ok ( url) => input_files. push ( url) ,
197+ Err ( e) => {
198+ error ! ( "Failed to read input file {i} URL: {e:?}" ) ;
199+ exit_causes. push ( e)
190200 }
191- } )
192- . collect ( ) ;
201+ }
202+ }
193203
194204 if !exit_causes. is_empty ( ) {
195205 error ! (
0 commit comments