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

Release event not working as expected #3666

Closed
3 tasks done
xoxys opened this issue Apr 30, 2024 · 10 comments
Closed
3 tasks done

Release event not working as expected #3666

xoxys opened this issue Apr 30, 2024 · 10 comments
Labels
bug Something isn't working feedback this needs feedback forge/forgejo forgejo forge related forge/gitea gitea forge related

Comments

@xoxys
Copy link
Member

xoxys commented Apr 30, 2024

Component

server

Describe the bug

release events result in an empty pipeline even if no event filter is set in the workflow:

woodpecker-server-forgejo   | {"level":"debug","pipeline":"demo","time":"2024-04-30T07:39:38Z","caller":"/build/server/pipeline/stepbuilder/stepBuilder.go:156","message":"marked as skipped, does not match metadata"}
woodpecker-server-forgejo   | {"level":"debug","pipeline":"test","time":"2024-04-30T07:39:38Z","caller":"/build/server/pipeline/stepbuilder/stepBuilder.go:156","message":"marked as skipped, does not match metadata"}
woodpecker-server-forgejo   | {"level":"debug","repo":"testorg/woodpecker-test","time":"2024-04-30T07:39:38Z","caller":"/build/server/pipeline/create.go:103","message":"ignoring hook: 'when' filters filtered out all steps"}

image

I've only tested it with gitea/forgejo this might affect other forges as well.

System Info

next-00ccec078c

Additional context

No response

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]
@xoxys xoxys added bug Something isn't working forge/gitea gitea forge related forge/forgejo forgejo forge related labels Apr 30, 2024
@qwerty287
Copy link
Contributor

Which filters (except event) do you have set?

@everflux
Copy link

The webhook that is created by Woodpecker 2.5 does not include the "release" type in gitea. When manually adding this type to the webhook, woodpecker is triggered as expected.
BUT two builds are triggered: one for the tag creation and one for the release creation. This can be handled using appropriate filters, of course.

@anbraten
Copy link
Member

The webhook that is created by Woodpecker 2.5 does not include the "release" type in gitea. When manually adding this type to the webhook, woodpecker is triggered as expected.

Seems to be actually missing: https://github.com/anbraten/woodpecker/blob/62ae7b2e213d861bbc6c61154b266066f1e92f9c/server/forge/gitea/gitea.go#L386

BUT two builds are triggered: one for the tag creation and one for the release creation. This can be handled using appropriate filters, of course.

That's expected as both a different events.

@qwerty287
Copy link
Contributor

Even though this event is missing this seems to be not the problem of the issue. Take a look at the screenshot - the hook is sent from a release event

@everflux
Copy link

I tested the release, worked for me in a pipeline with 2.4.1 and 2.5
From the log output it seems the event was emitted but ignored, hard to diagnose without the actual workflow.

ignoring hook: 'when' filters filtered out all steps

@everflux
Copy link

Tested with gitea 1.21.7 and WP 2.6.0, both freshly installed. Works like a charm.

The latest gitea 1.22 (about two weeks young) mentions as enhancement in the changelog:

Make gitea webhooks openproject compatible (go-gitea/gitea#28435) (go-gitea/gitea#31081)

Maybe this leads to problems. I will try to test it with a fresh setup with gitea 1.22

@qwerty287 qwerty287 added the feedback this needs feedback label Jun 20, 2024
@qwerty287
Copy link
Contributor

@xoxys Do you still have issues with the release event?

@xoxys
Copy link
Member Author

xoxys commented Jun 20, 2024

I can try to reproduce it on the weekend. Im also fine to close this issue for now and only re-open it if Im able to.

@qwerty287
Copy link
Contributor

closing for now

@xoxys
Copy link
Member Author

xoxys commented Jul 15, 2024

Thanks, sorry for not providing feedback till now. Ill reopen it of I find some time to test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feedback this needs feedback forge/forgejo forgejo forge related forge/gitea gitea forge related
Projects
None yet
Development

No branches or pull requests

4 participants