jenkinsci / datadog-plugin

A Jenkins plugin used to forward metrics, events, and service checks to an account at Datadog, automatically.
https://plugins.jenkins.io/datadog/
MIT License
30 stars 48 forks source link

Missing git client dependency #410

Closed rishiv5 closed 3 months ago

rishiv5 commented 3 months ago

Describe the bug Jenkins startup shows the following error when loading datadog plugin:

WARNING h.ExtensionFinder$GuiceFinder$SezpozModule#configure: Failed to load org.datadog.jenkins.plugins.datadog.listeners.DatadogSCMListener
java.lang.ClassNotFoundException: org.jenkinsci.plugins.gitclient.GitClient
...
Caused: java.lang.NoClassDefFoundError: org/jenkinsci/plugins/gitclient/GitClient

Looking into it further, I noticed that the datadog plugin imports the git-client plugin here but does not explicitly define a dependency in the pom.xml. Digging further into the dependency chain, it seems that the datadog plugin relied on an implicit dependency to git-client plugin through the pipeline-model-definition plugin. However, in their latest update, pipeline-model-definition no longer includes git-client as a dependency.

Proposal: Explicitly add git-client as a dependency of datadog plugin to ensure that git-client is loaded correctly during startup.

severity/normal

To Reproduce Check Jenkins spin up logs or plugin list when installing the latest versions of datadog and pipeline-model-definition.

Expected behavior Jenkins should contain the git-client plugin (via dependency resolution) if datadog plugin is installed.

Screenshots If applicable, add screenshots to help explain your problem.

Environment and Versions (please complete the following information): Jenkins LTS 2.440.x Pipeline: Declarative plugin (pipeline-model-definition) version after merge of https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/706

nikita-tkachenko-datadog commented 3 months ago

The fix has been released in the plugin v6.0.3. Please try updating and let me know if the issue persists. Thank you!

rishiv5 commented 3 months ago

Seems to be resolved!