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

Wrong pipeline status #2197

Closed
xoxys opened this issue Aug 11, 2023 · 6 comments · Fixed by #4068 · May be fixed by #3849
Closed

Wrong pipeline status #2197

xoxys opened this issue Aug 11, 2023 · 6 comments · Fixed by #4068 · May be fixed by #3849
Labels
bug Something isn't working

Comments

@xoxys
Copy link
Member

xoxys commented Aug 11, 2023

Component

server

Describe the bug

Pipeline status for cancelled pipeline is wrong:

image

image

System Info

{"source":"https://github.com/woodpecker-ci/woodpecker","version":"next-63d5c40a"}


### Additional context

_No response_

### Validations

- [X] Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).
- [X] Check that there isn't [already an issue](https://github.com/woodpecker-ci/woodpecker/issues) that reports the same bug to avoid creating a duplicate.
- [X] Checked that the bug isn't fixed in the `next` version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
- [X] Check that this is a concrete bug. For Q&A join our [Discord Chat Server](https://discord.gg/fcMQqSMXJy) or the [Matrix room](https://matrix.to/#/#woodpecker:matrix.org).
@xoxys xoxys added the bug Something isn't working label Aug 11, 2023
@pat-s
Copy link
Contributor

pat-s commented Aug 12, 2023

related #1871 #1893

@xoxys
Copy link
Member Author

xoxys commented Aug 22, 2023

It gets even worse. Even if the pipeline status is correct in the UI, CI_PIPELINE_STATUS is wrong, which makes it pretty useless to use for notifications 🙈

image

while CI_PIPELINE_STATUS has reported success during a notification step

@anbraten
Copy link
Member

anbraten commented Nov 6, 2023

Maybe related. Pipeline is already show as error, but is still running and no steps has an error 🤔
https://ci.woodpecker-ci.org/repos/3780/pipeline/9551

@anbraten
Copy link
Member

image

Step failed, but pipeline was marked as successful: https://ci.woodpecker-ci.org/repos/3780/pipeline/13542

@anbraten
Copy link
Member

Found another interesting status mismatch: https://ci.woodpecker-ci.org/repos/3780/pipeline/14498

@anbraten
Copy link
Member

I think this line could be the issue:

state.Error = ""

In case of a canceled workflow the error is set to "" (no error). The configured exit code doesn't seem to be considered by any logic at all and is only used for logging: #3848

@anbraten anbraten modified the milestones: 3.x.x, 2.7.0 Jun 27, 2024
@anbraten anbraten mentioned this issue Jun 27, 2024
4 tasks
@6543 6543 modified the milestones: 2.7.0, 2.8.0 Jul 17, 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
4 participants