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

Confusing [bad_habit] Please set an event filter on all when branches message #3607

Closed
3 tasks done
oliverpool opened this issue Apr 11, 2024 · 2 comments · Fixed by #3634
Closed
3 tasks done

Confusing [bad_habit] Please set an event filter on all when branches message #3607

oliverpool opened this issue Apr 11, 2024 · 2 comments · Fixed by #3634
Labels
enhancement improve existing features good first issue Likely to be an easy fix
Milestone

Comments

@oliverpool
Copy link

oliverpool commented Apr 11, 2024

Component

web-ui

Describe the bug

Initially reported on https://codeberg.org/Codeberg-CI/feedback/issues/170

When a when block has no event field, a [bad_habit] Please set an event filter on all when branches message warning is shown, introduced by #3222.

image

This is not really actionable for the user:

  • no idea which part of the pipeline is faulty
  • no much idea how to solve it.

System Info

source	"https://github.com/woodpecker-ci/woodpecker"
version	"2.4.1"

Additional context

Having the step involved would be nice (it is recorded, but not displayed).

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]
@oliverpool oliverpool added the bug Something isn't working label Apr 11, 2024
@zc-devs
Copy link
Contributor

zc-devs commented Apr 11, 2024

warning is shown

even though there is no "when" directive at all.

@qwerty287 qwerty287 added enhancement improve existing features and removed bug Something isn't working labels Apr 14, 2024
@qwerty287 qwerty287 added this to the 2.x.x milestone Apr 14, 2024
@qwerty287 qwerty287 added the good first issue Likely to be an easy fix label Apr 18, 2024
@anbraten anbraten mentioned this issue Apr 19, 2024
3 tasks
@anbraten
Copy link
Member

If I am correct the idea was basically to encourage the user to add at least some kind of when filters as otherwise in the case we add more functionality like additional events the existing pipelines would also be triggered by those new events when updating.

I guess we can simply improve the message a bit and additionally show the workflow file it was detected in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improve existing features good first issue Likely to be an easy fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants