woodpecker-ci / woodpecker

Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
4.26k stars 369 forks source link

Service step doesn't change its status #2831

Open zc-devs opened 11 months ago

zc-devs commented 11 months ago

Component

web-ui

Describe the bug

Running pipeline with a service, it doesn't change its status and logs are empty unless page are reloaded.

Pipeline:

services:
  database:
    image: mysql
    environment:
      - MYSQL_DATABASE=test
      - MYSQL_ROOT_PASSWORD=example
    ports:
      - 3306
steps:
  get-version:
    image: ubuntu
    commands:
      - ( apt update && apt dist-upgrade -y && apt install -y mysql-client 2>&1 )> /dev/null
      - sleep 60s # need to wait for mysql-server init
      - echo 'SHOW VARIABLES LIKE "version"' | mysql -uroot -hdatabase test -pexample

Start pipeline and click on the service step - logs exist: Screenshot 2023-11-16 152141

Then switch to the general step and wait to complete - there are logs, status changes to completed, execution timer stops: Screenshot 2023-11-16 152553

Switch back to the service - now there are no logs, step is executing forever: Screenshot 2023-11-16 152702

After page reloading, all displays as expected - logs, status and execution timer: Screenshot 2023-11-16 152756

The later should be without refreshing page.

System Info

2.0.0-rc.0, Kubernetes

Additional context

No response

Validations

6543 commented 10 months ago

we have the info witch steps are services now.

so if we get an update about the pipeline/workflow e.g. that it has changed it's status. we now just need to update that services acordingliy