1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2026-06-03 16:35:37 +02:00
Simon C. Kemper a765cb885a fix(kubernetes): retry WaitStep when container terminated state not yet finalized (#6672)
## Problem

Kubelet sets `pod.Status.Phase = Succeeded` before finalizing `containerStatuses[0].state.terminated`. When the informer sees the phase change and `WaitStep` calls `Get()`, the container status may still show `Terminated == nil`, causing a hard error:

```
no terminated state found for container wp-XXX/wp-XXX
```

This is a known race in the Kubernetes API server/kubelet eventually-consistent model. The window is normally milliseconds but widens to seconds under load (apiserver latency spikes, ResourceQuota admission storms, node pressure).

## Fix

Wrap the post-informer `Get()` + `Terminated == nil` check in `backoff.Retry` with exponential backoff (200ms initial, 5s max interval, 15s total budget). This mirrors the retry pattern already used for `TailStep` log stream recovery (#5550).
2026-05-30 12:35:53 +02:00
2025-09-28 22:05:56 +02:00
2026-05-28 13:33:38 +02:00
2026-05-28 13:33:38 +02:00
2026-03-24 01:21:04 +01:00
2024-11-23 09:17:19 +01:00
2026-03-23 11:54:07 +01:00
2026-05-14 14:11:55 +02:00
2025-10-21 12:19:39 +02:00
2024-12-28 15:36:23 +01:00
2026-05-28 12:39:16 +02:00
2026-04-17 00:46:53 +02:00
2026-05-27 14:30:37 +02:00

Woodpecker

Woodpecker


Pipeline Status Code coverage Translation status 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

Installation & Resources

Woodpecker can be installed in various ways (see the Installation Instructions) and runs with SQLite as database by default. It requires around 100 MB of RAM (Server) and 30 MB (Agent) at runtime in idle mode.

Support

You can support the project by becoming a backer on Open Collective or via GitHub Sponsors.

Open Collective backers

Documentation

Our documentation can be found at https://woodpecker-ci.org/docs/intro.

Translation

We have a self-hosted Weblate instance at translate.woodpecker-ci.org.

An overview of the current translation state is available at https://translate.woodpecker-ci.org/projects/woodpecker-ci/#languages.

Public Woodpecker Instances

Woodpecker is used as the main CI/CD engine at Codeberg, an alternative Git hosting platform with a focus on privacy and free software development.

Plugins

Woodpecker can be extended via plugins. The plugin overview website helps browsing available plugins. It combines both plugins by the Woodpecker core team and community-maintained ones.

Star History

Star History Chart

License

Woodpecker is Apache 2.0 licensed. The source files have a header indicating which license they are under and what copyrights apply.

Everything in docs/ is licensed under the Creative Commons Attribution-ShareAlike 4.0 International Public License.

S
Description
Woodpecker is a simple yet powerful CI/CD engine with great extensibility.
Readme Apache-2.0 293 MiB
Languages
Go 86.1%
Vue 8.8%
TypeScript 2.6%
CSS 1.6%
Makefile 0.7%