Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline fails without error in UI when using service without ports #4365

Open
3 tasks done
zc-devs opened this issue Nov 12, 2024 · 0 comments
Open
3 tasks done

Pipeline fails without error in UI when using service without ports #4365

zc-devs opened this issue Nov 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@zc-devs
Copy link
Contributor

zc-devs commented Nov 12, 2024

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

  1. Install Woodpecker and Gitea on Kubernetes
  2. 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'
  1. Get cancelled steps without errors
    Screenshot 2024-11-12 1
  2. Get failed pipeline
    Screenshot 2024-11-12 2
  3. See error in Agent logs:
{"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

  1. Oh no, we got some errors!
  2. Click Show errors
  3. 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

agent.log
server.log

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]
@zc-devs zc-devs added the bug Something isn't working label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant