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
2024-01-27 21:15:10 +01:00
2024-01-22 07:56:18 +01:00
2024-01-30 17:39:00 +01:00
2024-01-30 17:39:00 +01:00
2023-12-29 20:30:20 +01:00
2024-01-11 19:17:07 +01:00
2024-01-27 21:15:10 +01:00
2024-02-02 18:57:28 +00:00
2024-01-27 21:15:10 +01:00
2024-01-27 21:15:10 +01:00
2023-12-28 16:39:14 +01:00
2024-01-11 18:43:54 +01:00
2023-12-30 15:10:31 +01:00
2024-01-27 21:15:10 +01:00
2024-01-31 17:41:26 +01:00
2024-01-27 21:15:10 +01:00
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.

Description
Woodpecker is a community fork of the Drone CI system.
Readme 153 MiB
Languages
Go 84.3%
Vue 10.8%
TypeScript 3.6%
Makefile 0.8%
CSS 0.4%