Open DenisPalnitsky opened 7 months ago
I checked the args that prepareJob
function receives and it does not have unique 'name'
"services": [
{
"image": "redis:6.2.5",
"dockerfile": null,
"entryPointArgs": [],
"entryPoint": null,
"workingDirectory": null,
"createOptions": null,
"registry": null,
"environmentVariables": {},
"portMappings": [],
"systemMountVolumes": [],
"userMountVolumes": []
},
{
"image": "redis:6.2.5",
"dockerfile": null,
"entryPointArgs": [],
"entryPoint": null,
"workingDirectory": null,
"createOptions": null,
"registry": null,
"environmentVariables": {},
"portMappings": [],
"systemMountVolumes": [],
"userMountVolumes": []
}
]
I guess we need to add names to that code that passes those args first.
Prerequisites
Have Actions Runners Controller with
AutoscalingRunnerSet
configured in Kubernetes modeSteps to reproduce
jobs: build:
container: image: ghcr.io/actions/actions-runner:latest
[debug]Evaluating condition for step: 'Initialize containers'
[debug]Evaluating: success()
[debug]Evaluating success:
[debug]=> true
[debug]Result: true
[debug]Starting: Initialize containers
[debug]Register post job cleanup for stopping/deleting containers.
Run '/home/runner/k8s/index.js' shell: /home/runner/externals/node16/bin/node {0}
[debug]/home/runner/externals/node16/bin/node /home/runner/k8s/index.js
[debug]Using image 'ghcr.io/actions/actions-runner:latest' for job image
[debug]Adding service 'redis:6.2.5' to pod definition
[debug]Adding service 'redis:6.2.5' to pod definition
Error: Error: failed to create job pod: HttpError: HTTP request failed Error: Process completed with exit code 1. Error: Executing the custom container implementation failed. Please contact your self hosted runner administrator.
[debug]System.Exception: Executing the custom container implementation failed. Please contact your self hosted runner administrator.
[debug] ---> System.Exception: The hook script at '/home/runner/k8s/index.js' running command 'PrepareJob' did not execute successfully
[debug] at GitHub.Runner.Worker.Container.ContainerHooks.ContainerHookManager.ExecuteHookScript[T](IExecutionContext context, HookInput input, ActionRunStage stage, String prependPath)
[debug] --- End of inner exception stack trace ---
[debug] at GitHub.Runner.Worker.Container.ContainerHooks.ContainerHookManager.ExecuteHookScript[T](IExecutionContext context, HookInput input, ActionRunStage stage, String prependPath)
[debug] at GitHub.Runner.Worker.Container.ContainerHooks.ContainerHookManager.PrepareJobAsync(IExecutionContext context, List`1 containers)
[debug] at GitHub.Runner.Worker.ContainerOperationProvider.StartContainersAsync(IExecutionContext executionContext, Object data)
[debug] at GitHub.Runner.Worker.JobExtensionRunner.RunAsync()
[debug] at GitHub.Runner.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken)
[debug]Finishing: Initialize containers