close: https://github.com/woodpecker-ci/woodpecker/issues/3555
Put the same logic from `waitStep` and call the function
`isImagePullBackOffState` in the `tailStep` function.
---------
Co-authored-by: elias.souza <elias.souza@quintoandar.com.br>
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
Fix Issue: https://github.com/woodpecker-ci/woodpecker/issues/3288
The way the pod service starts up makes it impossible to run two or more
pipelines at the same time when we have a service section.
The idea is to set the name of the service in the same way we did for
the pod name.
Pipeline:
```yaml
services:
mydb:
image: mysql
environment:
- MYSQL_DATABASE=test
- MYSQL_ROOT_PASSWORD=example
ports:
- 3306/tcp
steps:
get-version:
image: ubuntu
commands:
- ( apt update && apt dist-upgrade -y && apt install -y mysql-client 2>&1 )> /dev/null
- sleep 30s # need to wait for mysql-server init
- echo 'SHOW VARIABLES LIKE "version"' | mysql -uroot -hmydb test -pexample
```
Running more than one pipeline result:
![image](https://github.com/woodpecker-ci/woodpecker/assets/22245125/e512309f-0d1e-4125-bab9-2357a710fedd)
---------
Co-authored-by: elias.souza <elias.souza@quintoandar.com.br>
Currently, backend options are parsed in the yaml parser.
This has some issues:
- backend specific code should be in the backend folders
- it is not possible to add backend options for backends added via
addons
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)
Mostly those that did not require much work.
From #2960
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>