File tree Expand file tree Collapse file tree
subprojects/hydra-queue-runner/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 121121 type = lib . types . ints . positive ;
122122 default = 5 ;
123123 } ;
124- tokenListPath = lib . mkOption {
125- description = "Path to a list of allowed authentication tokens." ;
124+ tokenPaths = lib . mkOption {
125+ description = "List of paths of allowed authentication tokens." ;
126126 type = lib . types . nullOr ( lib . types . listOf lib . types . path ) ;
127127 default = null ;
128128 } ;
Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ struct AppConfig {
249249 #[ serde( default = "default_concurrent_upload_limit" ) ]
250250 concurrent_upload_limit : usize ,
251251
252- token_list_path : Option < std:: path:: PathBuf > ,
252+ token_paths : Option < Vec < std:: path:: PathBuf > > ,
253253
254254 #[ serde( default = "default_enable_fod_checker" ) ]
255255 enable_fod_checker : bool ,
@@ -323,10 +323,17 @@ impl TryFrom<AppConfig> for PreparedApp {
323323 let hydra_log_dir = val. hydra_data_dir . join ( "build-logs" ) ;
324324 let lockfile = val. hydra_data_dir . join ( "queue-runner/lock" ) ;
325325
326- let token_list = val. token_list_path . and_then ( |p| {
327- fs_err:: read_to_string ( p)
328- . map ( |s| s. lines ( ) . map ( |t| t. trim ( ) . to_string ( ) ) . collect ( ) )
329- . ok ( )
326+ let token_list = val. token_paths . and_then ( |l| {
327+ l. iter ( )
328+ . map ( |p| {
329+ fs_err:: read_to_string ( p)
330+ . map ( |s| s. trim ( ) . to_string ( ) )
331+ . inspect_err ( |e| {
332+ tracing:: warn!( "Failed to load token file, skipping file. Err={e}" ) ;
333+ } )
334+ . ok ( )
335+ } )
336+ . collect ( )
330337 } ) ;
331338
332339 Ok ( Self {
You can’t perform that action at this time.
0 commit comments