Skip to content

fix(kubernetes): services should have clean exit state from WaitStep on context expiry/API server errors#6669

Open
hhamalai wants to merge 1 commit into
woodpecker-ci:mainfrom
hhamalai:fix_kube_service_termination
Open

fix(kubernetes): services should have clean exit state from WaitStep on context expiry/API server errors#6669
hhamalai wants to merge 1 commit into
woodpecker-ci:mainfrom
hhamalai:fix_kube_service_termination

Conversation

@hhamalai

Copy link
Copy Markdown
Contributor

There's a corner case(s) where the pipeline service on Kubernetes backend is not cleaned up appropriately when the context is cancelled, leading to services being shown as running, even while the service pods are terminated.

Also the DestroyWorkflow changed to handler destroying steps with errgroup like handled out with Docker backend, instead of failing on the first error.

There's a corner case where the pipeline service on Kubernetes backend
is not cleaned up appropriately when the context is cancelled, leading
to services being shown as running, even while the service pods are
terminated.

Also the DestroyWorkflow changed to handler destroying steps with
errgroup like handled out with Docker backend, instead of failing on the
first error.
@6543

6543 commented May 30, 2026

Copy link
Copy Markdown
Member

Does #6672 solfe this here?

@hhamalai

hhamalai commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

Does #6672 solfe this here?
Likely helps at least to solve the timing related issues, not sure about if it solves all these corner cases.

The usage of error groups in DestroyWorkflow step would unify the logic with kubernetes/docker runners a bit. It's by no mean complete refactoring, but such refactoring would make maintaining these different backends a bit more straightforward in long run?

case <-finished:
case <-ctx.Done():
return nil, ctx.Err()
return &types.State{ExitCode: 0, Exited: true}, nil

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: make sure we dont get success state in killed steps by cancle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend/kubernetes bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants