actions / runner-container-hooks

Runner Container Hooks for GitHub Actions
MIT License
63 stars 41 forks source link

Add debug trace for errors #158

Closed timmjd closed 2 months ago

timmjd commented 2 months ago

This change will increase the debugging capability of the runner-container-hooks if something is buggy within the Kubernetes configuration (permission issues, policy configurations, node configurations, ...)

The usual error sadly does not tell anything where the error happen but to contact your local Administrator. Also the console log of the runner is quiet silent about the origin of such errors - even with debug enabled. gha_error

This change will simply dump the trace log into the console whenever there is a error happening within the k8s hooks that will point the user towards the direction where to have a look. gha_trace

There would be an alternative implementation by forwarding the log via core.debug(error.stack). This looks better from the console integration. Sadly it does only contain the hints into the minified code - and by this it's hard to track down the root cause of the error. gha_debug