Skip to content

circleci local execute results in immediate panic #1189

@rupert-madden-abbott

Description

@rupert-madden-abbott

Meta:

CircleCI CLI Version:
0.1.34770+49672ea (release)

Operating System:
Ubuntu 24.04.3 LTS

CircleCI CLI Diagnostic:

---
CircleCI CLI Diagnostics
---
Debugger mode: false
Config found: /home/rupert/.circleci/cli.yml
API host: https://circleci.com
API endpoint: graphql-unstable
OK, got a token.
Hello, Rupert Madden-Abbott.

Current behavior:

First I process my config:

circleci config process .circleci/config.yml > /tmp/process.yml

Which looks like this:

cat /tmp/process.yml
version: 2
jobs:
  build:
    docker:
    - image: cimg/base:2026.03
      auth:
        username: $DOCKER_USER
        password: $DOCKER_PASSWORD
    resource_class: small
    steps:
    - checkout
workflows:
  build:
    jobs:
    - build:
        context: foobar
  version: 2

Then I try to run it locally:

circleci local execute -c /tmp/process.yml build \
  --env "DOCKER_USER=foo" \
  --env "DOCKER_PASSWORD=bar"
Fetching latest build environment...
Docker image digest: sha256:008ba7f4223f1e26c11df9575283491b620074fa96da6961e0dcde47fb757014
====>> Spin up environment
Build-agent version  ()
process panic
goroutine 1 [running]:
runtime/debug.Stack()
        /usr/local/go/src/runtime/debug/stack.go:24 +0x65
github.com/circleci/build-agent/cmd/internal/setup.PanicHandler()
        /mnt/ramdisk/circleci/project/cmd/internal/setup/handlers.go:23 +0x85
panic({0x156a6a0, 0xc000126ed0})
        /usr/local/go/src/runtime/panic.go:1038 +0x215
github.com/circleci/build-agent/outer/docker.NewDockerExecutorWithClient({{{{0xc000040108, 0x15}, {{...}, {...}, 0x0, 0x1, {...}, {...}, {...}, {...}, ...}, ...}, ...}, ...}, ...)
        /mnt/ramdisk/circleci/project/outer/docker/docker.go:67 +0x699
github.com/circleci/build-agent/outer/docker.NewDockerExecutor({{{{0xc000040108, 0x15}, {{...}, {...}, 0x0, 0x1, {...}, {...}, {...}, {...}, ...}, ...}, ...}, ...}, ...)
        /mnt/ramdisk/circleci/project/outer/docker/docker.go:103 +0xdc
github.com/circleci/build-agent/outer.newExecutor({_, _}, {{{{0xc000040108, 0x15}, {{...}, {...}, 0x0, 0x1, {...}, {...}, ...}, ...}, ...}, ...}, ...)
        /mnt/ramdisk/circleci/project/outer/run.go:369 +0x265
github.com/circleci/build-agent/outer.ConfigureAndRun({_, _}, {{0xc000041e48, 0x15}, {0x0, 0x0}, {0xc000041fb0, 0x16}, {0x0, 0x0}, ...})
        /mnt/ramdisk/circleci/project/outer/run.go:219 +0x17ad
github.com/circleci/build-agent/cmd/internal/outer/local.runExecuteJob(0xc0003a8a80, 0x0, {0x1987540, 0x0})
        /mnt/ramdisk/circleci/project/cmd/internal/outer/local/execute.go:125 +0x2b6
github.com/circleci/build-agent/cmd/internal/outer/local.NewExecuteJobCmd.func1(0xc0002b4280, {0x165cc0d, 0xd, 0xd})
        /mnt/ramdisk/circleci/project/cmd/internal/outer/local/execute.go:64 +0x29
github.com/spf13/cobra.(*Command).execute(0xc0002b4280, {0xc0006e3ba0, 0xd, 0xd})
        /home/circleci/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:856 +0x60e
github.com/spf13/cobra.(*Command).ExecuteC(0xc0002b4000)
        /home/circleci/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
        /home/circleci/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:902
github.com/circleci/build-agent/cmd.Execute()
        /mnt/ramdisk/circleci/project/cmd/root.go:64 +0x2cf
main.main()
        /mnt/ramdisk/circleci/project/main.go:14 +0xca

Expected behavior:

It should not panic

When did this begin / Was this previously working?:

I'm not sure, it's been a long time since I've tried.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions