Closed harryfinbow closed 2 months ago
That would be a great addition indeed! In terms of structure, I like the fact of having it defined at the runner group level as you did, but I also think that it may come as a bit cumbersome if you have to rewrite the same job_started
/job_completed
parameter for every runner group.
Not a deal breaker but something to think about. I'm actually more curious to know if you have different kind of scripts to run depending on the runner group. And if it becomes an issue we can always implement a global settings at the root of the config and one that will take priority at the group level.
Now, I know I didn't do a great job in terms of data structure of all the models and how the startup script itself is "templated". But I believe it is possible to achieve what you want without having to rewrite how everything is setup.
If you have the bandwidth to work on this, I will gladly take this change in, and as per the values that are currently defined, we can remove them and I can implement them on the configuration side on my end. (Or we can set them as default value, whatever we think it's best).
We would like the ability to run some additional commands during the
job_started
andjob_completed
hooks. Currently they just run the commands defined in thestartup.sh
script which would require rebuilding therunner-manager
image for any changes.Use Case
Logging into to a private ECR repository when runners start a job.
Example
Possible Solutions
Config Option
An additional config option (in the
runner-manager.yaml
) which would take in a string of additional commands and run them after the default commands but before theecho "Done"
.Limitations
Does not allow modifications to be made to the existing commands in the hooks or run commands before/in between the existing set.
Mount
job_started
/job_completed
scriptsThe
job_started
andjob_completed
functions could be pulled out ofstartup.sh
as their own scripts so that they can be mounted, similar to how therunner-manager.yaml
config file is, allowing for full control over these hooks.Mount
startup.sh
scriptSimilar to "Mount
job_started
/job_completed
scripts" but mount the entirestartup.sh
script for full control over what is happening during the startup of the node.