\n\ni did attempt `pull_5323-alpine` as recomended in #5238 but it didnt work. the pod never stood up.\n\n### Steps to reproduce\n\n1. install woodpecker (using longhorn as a storage backend and forgejo as a forge but that hasnt been an issue before) on k3s cluster.\n2. create pipeline.\n3. attempt to run it.\n4. will never complete pod creation.\n\n### Expected behavior\n\ncreates pod, and run pipeline\n\n### System Info\n\n```shell\nsource\t\"https://github.com/woodpecker-ci/woodpecker\"\nversion\t\"3.8.0\"\n```\n\n### Additional context\n\n\u003Cimg width=\"1875\" height=\"143\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/6fbbcd41-751c-4d5d-b852-f05e57d6ca12\" />\n\n\u003Cimg width=\"1008\" height=\"312\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/6fc6001e-01e4-4cce-b9c4-2ccc144b9b1a\" />\n\n### Validations\n\n- [x] Read the [docs](https://woodpecker-ci.org/docs/intro).\n- [x] Check that there isn't [already an issue](https://github.com/woodpecker-ci/woodpecker/issues) that reports the same bug to avoid creating a duplicate.\n- [x] Checked that the bug isn't fixed in the `next` version already [https://woodpecker-ci.org/versions]",[3084],{"name":3019,"color":3020},5345,"Kubernetes Pod never completes initialisation - hangs forever","2025-07-21T14:12:00Z","https://github.com/woodpecker-ci/woodpecker/issues/5345",0.6974393,{"description":3091,"labels":3092,"number":3094,"owner":3025,"repository":3026,"state":3095,"title":3096,"updated_at":3097,"url":3098,"score":3099},"### Component\n\nagent\n\n### Describe the bug\n\nI'm getting this error for the woodpecker-next agent today:\r\n\r\n```\r\nwoodpecker-agent-1 | {\"level\":\"info\",\"time\":\"2024-12-31T16:38:42Z\",\"message\":\"log level: info\"}\r\nwoodpecker-agent-1 | {\"level\":\"info\",\"time\":\"2024-12-31T16:38:42Z\",\"message\":\"starting Woodpecker agent with version 'next-5b0d788737' and backend 'docker' using platform 'linux/amd64' running up to 1 pipelines in parallel\"}\r\nwoodpecker-agent-1 | panic: runtime error: invalid memory address or nil pointer dereference\r\nwoodpecker-agent-1 | \tpanic: runtime error: invalid memory address or nil pointer dereference\r\nwoodpecker-agent-1 | [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa8413f]\r\nwoodpecker-agent-1 | \r\nwoodpecker-agent-1 | goroutine 74 [running]:\r\nwoodpecker-agent-1 | go.woodpecker-ci.org/woodpecker/v3/pipeline/backend/docker.(*docker).DestroyWorkflow(0x34358a0, {0x231b610, 0xc000469630}, 0xc000018b00, {0xc00052c635, 0x5})\r\nwoodpecker-agent-1 | \t/src/pipeline/backend/docker/docker.go:326 +0xff\r\nwoodpecker-agent-1 | go.woodpecker-ci.org/woodpecker/v3/pipeline.(*Runtime).Run.func1()\r\nwoodpecker-agent-1 | \t/src/pipeline/pipeline.go:112 +0x7f\r\nwoodpecker-agent-1 | panic({0x1cde8e0?, 0x33f99f0?})\r\nwoodpecker-agent-1 | \t/usr/local/go/src/runtime/panic.go:785 +0x132\r\nwoodpecker-agent-1 | go.woodpecker-ci.org/woodpecker/v3/pipeline/backend/docker.(*docker).SetupWorkflow(0x34358a0, {0x231b610, 0xc000469630}, 0xc000018b00, {0xc00052c635, 0x5})\r\nwoodpecker-agent-1 | \t/src/pipeline/backend/docker/docker.go:148 +0xf5\r\nwoodpecker-agent-1 | go.woodpecker-ci.org/woodpecker/v3/pipeline.(*Runtime).Run(0xc0002389a0, {0x231b610, 0xc000469630})\r\nwoodpecker-agent-1 | \t/src/pipeline/pipeline.go:118 +0x31b\r\nwoodpecker-agent-1 | go.woodpecker-ci.org/woodpecker/v3/agent.(*Runner).Run(0xc000018a00, {0x231b610, 0xc000469630}, {0x231b5a0, 0x3456900})\r\nwoodpecker-agent-1 | \t/src/agent/runner.go:153 +0xeef\r\nwoodpecker-agent-1 | go.woodpecker-ci.org/woodpecker/v3/cmd/agent/core.run.func5()\r\nwoodpecker-agent-1 | \t/src/cmd/agent/core/agent.go:293 +0x205\r\nwoodpecker-agent-1 | golang.org/x/sync/errgroup.(*Group).Go.func1()\r\nwoodpecker-agent-1 | \t/src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 +0x50\r\nwoodpecker-agent-1 | created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 1\r\nwoodpecker-agent-1 | \t/src/vendor/golang.org/x/sync/errgroup/errgroup.go:75 +0x96\r\nwoodpecker-agent-1 | {\"level\":\"info\",\"time\":\"2024-12-31T16:38:44Z\",\"message\":\"log level: info\"}\r\nwoodpecker-agent-1 | {\"level\":\"info\",\"time\":\"2024-12-31T16:38:45Z\",\"message\":\"starting Woodpecker agent with version 'next-5b0d788737' and backend 'docker' using platform 'linux/amd64' running up to 1 pipelines in parallel\"}\r\n```\n\n### Steps to reproduce\n\nInstall woodpecker-agent:next\n\n### Expected behavior\n\n_No response_\n\n### System Info\n\n```shell\nAgent error: image is : `21f2e0733e93`\n```\n\n\n### Additional context\n\nNA\n\n### Validations\n\n- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).\n- [X] Check that there isn't [already an issue](https://github.com/woodpecker-ci/woodpecker/issues) that reports the same bug to avoid creating a duplicate.\n- [X] Checked that the bug isn't fixed in the `next` version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]",[3093],{"name":3019,"color":3020},4652,"closed","woodpecker-next error: `panic: runtime error: invalid memory address or nil pointer dereference`","2025-01-02T21:52:32Z","https://github.com/woodpecker-ci/woodpecker/issues/4652",0.6181167,{"description":3101,"labels":3102,"number":3107,"owner":3025,"repository":3026,"state":3095,"title":3108,"updated_at":3109,"url":3110,"score":3111},"### Component\r\n\r\nserver\r\n\r\n### Describe the bug\r\n\r\nWith the latest Docker image I get an runtime error after the agent connects to the server:\r\n\r\n```\r\n...\r\nwoodpecker_1 | [GIN-debug] POST /api/hook --> github.com/woodpecker-ci/woodpecker/server/api.PostHook (12 handlers)\r\nwoodpecker_1 | [GIN-debug] GET /stream/events --> github.com/woodpecker-ci/woodpecker/server/api.EventStreamSSE (12 handlers)\r\nwoodpecker_1 | [GIN-debug] GET /stream/logs/:owner/:name/:build/:number --> github.com/woodpecker-ci/woodpecker/server/api.LogStreamSSE (15 handlers)\r\nwoodpecker_1 | {\"level\":\"debug\",\"time\":\"2021-12-08T11:36:14Z\",\"message\":\"agent connected: agent: polling\"}\r\nwoodpecker_1 | panic: runtime error: invalid memory address or nil pointer dereference\r\nwoodpecker_1 | [signal SIGSEGV: segmentation violation code=0x1 addr=0xa0 pc=0x9cec57]\r\nwoodpecker_1 | \r\nwoodpecker_1 | goroutine 50 [running]:\r\nwoodpecker_1 | github.com/woodpecker-ci/woodpecker/server/model.Tree(0xc00020e680, 0x4, 0x32, 0x4, 0x32, 0x0)\r\nwoodpecker_1 | \t/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/model/proc.go:74 +0x117\r\nwoodpecker_1 | github.com/woodpecker-ci/woodpecker/server/grpc.(*RPC).Update(0xc0002d01c0, 0x13d6018, 0xc000242030, 0xc0003bb99c, 0x4, 0xc0003bba78, 0x5, 0x0, 0x0, 0x61b095a1, ...)\r\nwoodpecker_1 | \t/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/grpc/rpc.go:144 +0x88b\r\nwoodpecker_1 | github.com/woodpecker-ci/woodpecker/server/grpc.(*WoodpeckerServer).Update(0xc0002d01c0, 0x13d6018, 0xc000242030, 0xc0003bd4c0, 0xc0002d01c0, 0xc000230378, 0xc000242780)\r\nwoodpecker_1 | \t/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/grpc/rpc.go:567 +0x1ff\r\nwoodpecker_1 | github.com/woodpecker-ci/woodpecker/pipeline/rpc/proto._Woodpecker_Update_Handler.func1(0x13d6018, 0xc000242030, 0x11303a0, 0xc0003bd4c0, 0x0, 0x203000, 0x7f914451be60, 0x18)\r\nwoodpecker_1 | \t/woodpecker/src/github.com/woodpecker-ci/woodpecker/pipeline/rpc/proto/woodpecker_grpc.pb.go:274 +0x89\r\nwoodpecker_1 | main.(*authorizer).unaryIntercaptor(0xc0001a0cf0, 0x13d6018, 0xc000242030, 0x11303a0, 0xc0003bd4c0, 0xc0003c0ac0, 0xc00021a990, 0x18, 0x10d6e00, 0xc000242001, ...)\r\nwoodpecker_1 | \t/woodpecker/src/github.com/woodpecker-ci/woodpecker/cmd/server/server.go:313 +0xb0\r\nwoodpecker_1 | github.com/woodpecker-ci/woodpecker/pipeline/rpc/proto._Woodpecker_Update_Handler(0x114ab40, 0xc0002d01c0, 0x13d6018, 0xc000242030, 0xc000202840, 0xc0001a0d20, 0x13d6018, 0xc000242030, 0xc0004fce20, 0x1b)\r\nwoodpecker_1 | \t/woodpecker/src/github.com/woodpecker-ci/woodpecker/pipeline/rpc/proto/woodpecker_grpc.pb.go:276 +0x150\r\nwoodpecker_1 | google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001ec8c0, 0x13dfcd8, 0xc00008b800, 0xc00036e900, 0xc0000e94a0, 0x19d4af8, 0x0, 0x0, 0x0)\r\nwoodpecker_1 | \t/woodpecker/src/github.com/woodpecker-ci/woodpecker/vendor/google.golang.org/grpc/server.go:1279 +0x52b\r\nwoodpecker_1 | google.golang.org/grpc.(*Server).handleStream(0xc0001ec8c0, 0x13dfcd8, 0xc00008b800, 0xc00036e900, 0x0)\r\nwoodpecker_1 | \t/woodpecker/src/github.com/woodpecker-ci/woodpecker/vendor/google.golang.org/grpc/server.go:1608 +0xd0c\r\nwoodpecker_1 | google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0003bb8a0, 0xc0001ec8c0, 0x13dfcd8, 0xc00008b800, 0xc00036e900)\r\nwoodpecker_1 | \t/woodpecker/src/github.com/woodpecker-ci/woodpecker/vendor/google.golang.org/grpc/server.go:923 +0xab\r\nwoodpecker_1 | created by google.golang.org/grpc.(*Server).serveStreams.func1\r\nwoodpecker_1 | \t/woodpecker/src/github.com/woodpecker-ci/woodpecker/vendor/google.golang.org/grpc/server.go:921 +0x1fd\r\n```\r\n\r\n### System Info\r\n\r\nVersion\r\n\r\n```\r\n{\"source\":\"https://github.com/woodpecker-ci/woodpecker\",\"version\":\"next-4642d98f\"}\r\n```\r\n\r\nConfig\r\n\r\n```\r\nservices:\r\n database:\r\n image: postgres:13-alpine\r\n restart: always\r\n environment:\r\n - POSTGRES_USER=...\r\n - POSTGRES_PASSWORD=...\r\n - POSTGRES_DB=...\r\n volumes:\r\n - ./database:/var/lib/postgresql/data\r\n\r\n woodpecker:\r\n image: woodpeckerci/woodpecker-server\r\n restart: always\r\n ports:\r\n - 127.0.0.1:8000:8000\r\n command: --log-level=trace\r\n volumes:\r\n - ./woodpecker:/var/lib/woodpecker/\r\n depends_on:\r\n - database\r\n environment:\r\n - WOODPECKER_OPEN=true\r\n - WOODPECKER_HOST=https://ci.sp-codes.de\r\n - WOODPECKER_DATABASE_DRIVER=postgres\r\n - WOODPECKER_DATABASE_DATASOURCE=postgres://...:...@database/...?sslmode=disable\r\n - WOODPECKER_GITEA=true\r\n - WOODPECKER_GITEA_URL=https://git.sp-codes.de\r\n - WOODPECKER_GITEA_CLIENT=...\r\n - WOODPECKER_GITEA_SECRET=...\r\n - WOODPECKER_AGENT_SECRET=...\r\n - WOODPECKER_ADMIN=...\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\r\n\r\n- [X] Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/master/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).\r\n- [X] Check that there isn't [already an issue](https://github.com/woodpecker-ci/woodpecker/issues) that reports the same bug to avoid creating a duplicate.\r\n- [X] Check that this is a concrete bug. For Q&A join our [Discord Chat Server](https://discord.gg/fcMQqSMXJy).",[3103,3104],{"name":3019,"color":3020},{"name":3105,"color":3106},"server","5D7A92",577,"Runtime error with latest Docker image","2021-12-08T22:36:23Z","https://github.com/woodpecker-ci/woodpecker/issues/577",0.6324614,{"description":3113,"labels":3114,"number":3116,"owner":3025,"repository":3026,"state":3095,"title":3117,"updated_at":3118,"url":3119,"score":3120},"### Component\n\nagent\n\n### Describe the bug\n\nWhen running an agent with the Kubernetes backend, not setting any labels in the agent config (`WOODPECKER_BACKEN_K8S_POD_LABELS`) causes an assignment to a non initialized string map.\r\n\r\n\r\n```text\r\npanic: assignment to entry in nil map\r\n\r\ngoroutine 90 [running]:\r\ngithub.com/woodpecker-ci/woodpecker/pipeline/backend/kubernetes.Pod({0xc000054051, 0xa}, 0xc00016ef00, 0x0, 0x0)\r\n\t/src/pipeline/backend/kubernetes/pod.go:91 +0x81b\r\ngithub.com/woodpecker-ci/woodpecker/pipeline/backend/kubernetes.(*kube).Exec(0xc0002819e0, {0x1cf52c0, 0xc0003ea440}, 0x2900450?)\r\n\t/src/pipeline/backend/kubernetes/kubernetes.go:165 +0x65\r\ngithub.com/woodpecker-ci/woodpecker/pipeline.(*Runtime).exec(0xc00046c540, 0xc00016ef00)\r\n\t/src/pipeline/pipeline.go:218 +0x42\r\ngithub.com/woodpecker-ci/woodpecker/pipeline.(*Runtime).execAll.func1()\r\n\t/src/pipeline/pipeline.go:186 +0x1ce\r\ngolang.org/x/sync/errgroup.(*Group).Go.func1()\r\n\t/src/vendor/golang.org/x/sync/errgroup/errgroup.go:75 +0x64\r\ncreated by golang.org/x/sync/errgroup.(*Group).Go\r\n\t/src/vendor/golang.org/x/sync/errgroup/errgroup.go:72 +0xa5\r\n{\"level\":\"info\",\"time\":\"2023-01-04T01:00:43Z\",\"message\":\"Starting Woodpecker agent with version 'next-f1e9c841' and backend 'kubernetes' running up to 1 pipelines in parallel\"}\r\n```\n\n### System Info\n\n```shell\nServer: next-f1e9c841\r\nAgent next-f1e9c841 and backend kubernetes\n```\n\n\n### Additional context\n\nThe Issue was likely introduced in #1510 since it completely changed the label handling (before that there was just a single statement initializing and setting the step label).\r\n\r\nThe line causing the panic is the assignment of the `labels[\"step\"] = podName(step)`, if there is no extra label provided in the agents config, `labels` is uninitialized at this point (nil), due to the `yaml.Unmarshal` not writing anything into the `&config.PodLabels` which causes the error.\r\n\r\nUnmarshalling\r\n\r\nhttps://github.com/woodpecker-ci/woodpecker/blob/f1e9c8416dafb6c236694765d9f7dde9620592da/pipeline/backend/kubernetes/kubernetes.go#L61\r\n\r\nAssignment where the assignment to nil happens\r\n\r\nhttps://github.com/woodpecker-ci/woodpecker/blob/f1e9c8416dafb6c236694765d9f7dde9620592da/pipeline/backend/kubernetes/pod.go#L91\r\n\r\nJust noting this down here before I have time to fix it...\r\n\r\nI'd tend to fix this by doing a nil check after the unmarshaling of the podLabels in kubernetes.go#61 (before the return), any opinions on that or should it rather be fixed by checking for nil in within the function in pod.go, before reaching pod.go#91 ?\r\n\r\n\r\n\n\n### Validations\n\n- [X] Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/master/CONTRIBUTING.md).\n- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).\n- [X] Check that there isn't [already an issue](https://github.com/woodpecker-ci/woodpecker/issues) that reports the same bug to avoid creating a duplicate.\n- [X] Check that this is a concrete bug. For Q&A join our [Discord Chat Server](https://discord.gg/fcMQqSMXJy) or the [Matrix room](https://matrix.to/#/#woodpecker:matrix.org).",[3115],{"name":3019,"color":3020},1527,"Backend Kubernetes Panic when no WOODPECKER_BACKEN_K8S_POD_LABELS are provided","2023-01-04T17:51:24Z","https://github.com/woodpecker-ci/woodpecker/issues/1527",0.6374615,["Reactive",3122],{},["Set"],["ShallowReactive",3125],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fat9dv9HRqQyUJOKUtuNQxo9UNsRO5RQLZ27o7gYSECY":-1},"/woodpecker-ci/woodpecker/3330"]