Pipeline fails without error in UI when using service without ports
Opened this issue · 0 comments
zc-devs commented
Component
server, agent, web-ui
Describe the bug
Running service
without defined port on Kubernetes leads to failed
pipeline with cancelled
all steps. There is no error in UI explaining what happened.
Steps to reproduce
- Install Woodpecker and Gitea on Kubernetes
- Run test pipeline
skip_clone: true
services:
database:
image: alpine
commands:
- echo 'Running MySQL server'
- sleep 300
steps:
build:
image: alpine
commands:
- echo 'Building the app'
{"level":"debug","repo":"wp/test","pipeline":"24","workflow_id":"131","error":"Service \"wp-svc-01jcfsknbyamqsmky9re1t47bq-database\" is invalid: spec.ports: Required value","canceled":false,"time":"2024-11-12T08:59:56Z","caller":"/src/agent/runner.go:170","message":"workflow finished"}
Expected behavior
Pipeline failed with errors visible in UI, like
Oh no, we got some errors!
- Click
Show errors
- On
Errors
tab see error like
[linter]woodpecker: steps.database cannot use service without defined ports
OR
Just on pipeline page instead of Oh no, we got some errors!
something like
Service \"wp-svc-01jcfsknbyamqsmky9re1t47bq-database\" is invalid: spec.ports: Required value
Also mentioned error should be at error
level instead of debug
.
System Info
Woodpecker `next-f87e80381b`, Gitea `1.22.3`, Postgres `16`, Kubernetes `v1.30.6+k3s1`
Additional context
Validations
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Checked that the bug isn't fixed in the
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]