Woodpecker is a community fork of the Drone CI system.
Find a file
Fernando Barbosa c7467b9828
fix: agent panic when node is terminated during step execution (#3331)
Fixes https://github.com/woodpecker-ci/woodpecker/issues/3330

This adds error handling on the agent's WaitStep function, on two
sections where it could encounter a `panic: runtime error: invalid
memory address or nil pointer dereference` in case it could no longer
access complete information about a specific pod.

This error was found to happen if the node in which the pod was running
was terminated during the step's execution.
spite active pipelines being executed on the node.

Now instead of a panic on the agent's logs and undefined behavior on the
UI it will display a more helpful error message on the UI.

### Additional context

We observed the bug first on v2.1.1, but tested the fix internally on
top of 2.3.0.


![image](https://github.com/woodpecker-ci/woodpecker/assets/7269710/dfbcf089-85f7-4b5d-8102-f21af95c5cda)
2024-02-05 22:46:14 +01:00
.github Fix/improve issue templates (#3232) 2024-01-20 18:29:19 +01:00
.vscode Add spellcheck config (#3018) 2024-01-27 21:15:10 +01:00
.woodpecker chore(deps): update docker.io/woodpeckerci/plugin-docker-buildx docker tag to v3.0.1 (#3324) 2024-02-04 07:30:43 +01:00
agent Clean up models (#3228) 2024-01-22 07:56:18 +01:00
cli Add release event trigger (#3226) 2024-01-30 17:39:00 +01:00
cmd Add release event trigger (#3226) 2024-01-30 17:39:00 +01:00
contrib/woodpecker-test-repo/.woodpecker Cleanups + prefer .yaml (#3069) 2024-01-11 18:43:54 +01:00
docker Fix build output paths (#3065) 2023-12-29 20:30:20 +01:00
docs chore(deps): update dependency marked to v12 (#3325) 2024-02-05 06:59:07 +01:00
nfpm build: fix nfpm path for server binary (#3246) 2024-01-21 23:08:53 +01:00
pipeline fix: agent panic when node is terminated during step execution (#3331) 2024-02-05 22:46:14 +01:00
server Remove accidentally added file (#3304) 2024-01-31 18:38:39 +01:00
shared Lowercase all log strings (#3173) 2024-01-11 19:17:07 +01:00
version Add spellcheck config (#3018) 2024-01-27 21:15:10 +01:00
web Translated using Weblate (French) 2024-02-02 18:57:28 +00:00
woodpecker-go Add release event trigger (#3226) 2024-01-30 17:39:00 +01:00
.cspell.json Add spellcheck config (#3018) 2024-01-27 21:15:10 +01:00
.ecrc Add spellcheck config (#3018) 2024-01-27 21:15:10 +01:00
.editorconfig Use editorconfig-checker (#982) 2022-06-17 12:03:34 +02:00
.gitattributes Fix "check_swagger" step (#2024) 2023-07-20 22:12:32 +02:00
.gitignore Use dag in ci config (#3010) 2023-12-28 16:39:14 +01:00
.gitpod.yml Fix Gitpod: Gitea auth token creation (#3299) 2024-01-30 18:39:59 +01:00
.golangci.yaml Replace goimports with gci (#3202) 2024-01-14 18:22:06 +01:00
.hadolint.yaml Cleanups + prefer .yaml (#3069) 2024-01-11 18:43:54 +01:00
.markdownlint.yaml Add spellcheck config (#3018) 2024-01-27 21:15:10 +01:00
.pre-commit-config.yaml Add spellcheck config (#3018) 2024-01-27 21:15:10 +01:00
.prettierignore Do not run prettier with pre-commit (#3196) 2024-01-14 21:14:00 +01:00
.prettierrc.json Remove old files (#3077) 2023-12-30 15:10:31 +01:00
.yamllint.yaml Add spellcheck config (#3018) 2024-01-27 21:15:10 +01:00
CHANGELOG.md 🎉 Release 2.3.0 (#3249) 2024-01-31 17:41:26 +01:00
docker-compose.example.yaml Cleanups + prefer .yaml (#3069) 2024-01-11 18:43:54 +01:00
docker-compose.gitpod.yaml Add spellcheck config (#3018) 2024-01-27 21:15:10 +01:00
go.mod fix(deps): update module github.com/moby/moby to v24.0.9+incompatible [security] (#3323) 2024-02-04 07:53:53 +01:00
go.sum fix(deps): update module github.com/moby/moby to v24.0.9+incompatible [security] (#3323) 2024-02-04 07:53:53 +01:00
LICENSE Check for correct license header (#2137) 2023-08-10 11:06:00 +02:00
Makefile Update UI building in Makefile (#3250) 2024-01-22 09:10:28 +02:00
README.md Add spellcheck config (#3018) 2024-01-27 21:15:10 +01:00
release-config.ts Add release helper (#1976) 2023-09-07 17:17:17 +02:00

Woodpecker

Woodpecker


Build Status Code coverage Translation status Discord chat Matrix space Go Report Card go reference GitHub release Docker pulls License: Apache-2.0 OpenSSF best practices pre-commit.ci


Woodpecker is a simple yet powerful CI/CD engine with great extensibility.

woodpecker

🫶 Support

Please consider donating and become a backer. 🙏 [Become a backer]

Open Collective backers

📖 Documentation

https://woodpecker-ci.org/

Contribute

See Contributing Guide

Open in Gitpod

📣 Translate

We use an own Weblate instance at translate.woodpecker-ci.org.

Translation status

👋 Who uses Woodpecker?

Woodpecker is used by itself multiple well-known companies, organizations like Codeberg, hobbyist and many others.

Leave a comment if you're using it as well.

Also consider using the topic WoodpeckerCI in your repository, so others can learn from your config and use the hashtag #WoodpeckerCI when talking about the project on social media!

Here are some places where people mention Woodpecker:

Stars over time

Stargazers over time

License

Woodpecker is Apache 2.0 licensed with the source files in this repository having a header indicating which license they are under and what copyrights apply.

Files under the docs/ folder are licensed under Creative Commons Attribution-ShareAlike 4.0 International Public License.