App Connect

App Connect

Join this online user group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Startup scripts run order

    Posted Wed July 31, 2024 08:17 AM

    I recently noticed that the order in which I define startup scripts for a standalone IS is not the order in which they are executed.

    The order in the sever.conf.yaml

    StartupScripts:
      CurrentDir:
        command: 'echo script 1'
        readVariablesFromOutput: 'false'        
        directErrorToCommandOutput: false      
        includeCommandOutputInLogs: true       
        #stopServerOnError: true               
      UpdateOverridesServerConfYaml:
        command: 'echo script 2'
        readVariablesFromOutput: 'false'       
        directErrorToCommandOutput: false      
        includeCommandOutputInLogs: true       
        #stopServerOnError: true               
      OptimizeServer:
        command: 'echo script 3'
        readVariablesFromOutput: 'false'       
        directErrorToCommandOutput: false      
        includeCommandOutputInLogs: true       
        #stopServerOnError: true  

    The order of execution

    So it's actually running scripts 1 > 3 > 2

    Any reason for that? Any way of forcing the order? If you have dependencies between scripts you are basically obligated to make one orchestrator scripts and run that on in stead of running the scripts straight from the yaml.



    ------------------------------
    Regards
    Matthias Blomme
    ------------------------------


  • 2.  RE: Startup scripts run order

    Posted Thu August 01, 2024 07:04 AM
    Edited by Dominic Storey Thu August 01, 2024 07:06 AM

    Hello Matthias,

    I believe this will be due to the way the yaml is parsed into a structure before we then execute them in series. In this case it looks like its sorting alphabetically, so CurrentDir, OptimizeServer, UpdateOverridesServerConfYaml (1,3,2)

    Could you rename those structures too 1CurrentDir, 2OptimizeServer, 3UpdateOverridesServerConfYaml as a workaround? or change the names so they are alphabetic in the order you want to run them in. We can make a doc update to make this behaviour clearer... 

    Thanks,

    Dom



    ------------------------------
    Dominic Storey
    ------------------------------



  • 3.  RE: Startup scripts run order

    Posted Fri August 02, 2024 06:21 AM
    Edited by Matthias Blomme Fri August 02, 2024 06:23 AM

    Hi Dominic

    It indeed appears to be sorted alphanumericall



    ------------------------------
    Regards
    Matthias Blomme
    ------------------------------