getsentry / gocd-webhook-notification-plugin

A simple plugin to call a webhook from GoCD
Apache License 2.0
2 stars 2 forks source link

v0.0.9 doesn't seem to call the specified URL #9

Open PieterCK opened 2 months ago

PieterCK commented 2 months ago

Environment

go-server verison: 24.3.0-19261 go-agent version: 24.3.0-19261 WebHook notifier plugin version: v0.0.9 1 agent, on the same machine go-server installed on: Ubuntu only 1 endpoint is specified.

Steps to Reproduce

  1. Install go-server and go-agent in the same machine
  2. Install WebHook notifier v0.0.9 and specify an endpoint
  3. Try to trigger any event and open the go-server's log

There should be no calls made by the server to the endpoint and an error related to the plugin should popup in the go-server's log.

Expected Result

The version v0.0.6 of the plugin seems to be able to send calls to the specified URL, I've tested this and it works as expected.

Actual Result

On the same setup, plugin v0.0.9 seems to fail to call the specified URL as I don't see any calls received from the recipient servers log. I've also noticed this in the gocd server log when I try to trigger an event that would usually shoot out a call to my server using the old plugin:

Caused by: java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "net.getsentry.gocd.webhooknotifier.Request.ordinal()" because the return value of "net.getsentry.gocd.webhooknotifier.Request.fromString(String)" is null
    at net.getsentry.gocd.webhooknotifier.WebhookNotifierPlugin.handle(WebhookNotifierPlugin.java:72)
    at com.thoughtworks.go.plugin.infra.DefaultPluginManager.lambda$submitTo$0(DefaultPluginManager.java:134)
    at com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.executeActionOnTheService(FelixGoPluginOSGiFramework.java:204)

Let me know if there are any other details you'd like to know. Thanks

IanWoodard commented 1 week ago

@PieterCK It is not uncommon for this error to occur on startup, but it shouldn't persist. Are you noticing it error after startup as well?

PieterCK commented 1 week ago

@IanWoodard Ok, I tried setting the endpoint to a server with a public domain, and it works properly. Version v0.0.6 was able to send requests to a local server, but v0.0.9 isn’t, which led me to think there was an issue and to open this thread. Feel free to close this issue. Thanks for your response!

By the way, what’s the status of this repo? I noticed it was marked as archived around last December but got some updates recently. I’m working on this Zulip PR to update Zulip’s GoCD integration to use Sentry’s notification plugin, so it’d be great to know what’s planned for the plugin moving forward.