actions / actions/runner-container-hooks

no-volume initialize containers fails

Open
#299 1 comment 12 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
153
Forks
112
Avg merge
6m
Merged PRs (30d)
1

Description

Hi,

We are testing the kubernetes-novolume mode on the arc, and when used with this job, the initialize container fails

Controler and scaleset charts: version 0.13.0
ghcr.io/actions/actions-runner:2.330.0

Image
##[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-novolume/index.js'
##[debug]/home/runner/externals/node20/bin/node /home/runner/k8s-novolume/index.js
##[debug]Job pod created, waiting for it to come online <EDITED>
##[debug]Copying /home/runner/_work to pod <EDITED> at /__w
(node:5521) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
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: Response file could not be read at '/home/runner/k8s-novolume/index.js' running command 'PrepareJob'
##[debug]   at GitHub.Runner.Worker.Container.ContainerHooks.ContainerHookManager.GetResponse[T](HookInput input)
##[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

Other workflows work with kubernetes-novolume, and this specific job worked fine with kubernetes mode

  setup_vars:
    name: Feature Branch Init
    container:
      image: alpine/k8s:1.28.0
    env:
      RELEASE_NAME: ${{ needs.setup_vars.outputs.branch_name }}
    steps:
      - uses: FranzDiebold/github-env-vars-action@v2
      # Conditional step to exit if on excluded branch
      - name: Check branch
        run: |
          if [ "${{ github.ref }}" == "refs/heads/main" ]; then
            echo "This workflow cannot run on 'main'. Exiting."
            exit 1
          fi
      - name: Set branch_name
        id: setup-vars
        run: |
          # Take the first 15 characters and remove trailing dashes
          branch_name=$(echo "${CI_ACTION_REF_NAME_SLUG:0:15}" | sed 's/-*$//')
          echo "branch_name=$branch_name" >> $GITHUB_OUTPUT
    outputs:
      branch_name: ${{ steps.setup-vars.outputs.branch_name }}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the kubernetes-novolume hook entry point at /home/runner/k8s-novolume/index.js and trace the PrepareJob response handling shown in the log. Compare this path with the working kubernetes mode and reproduce the setup_vars job using the listed chart and runner versions; done means the Initialize containers step completes without the response-file error.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, kubernetes, node.js, typescript
Domain
ci-cd, devops, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.