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

Build history destroyed with `7.0.0` upgrade: builds marked "1 Jan. 1970" and stuck #423

Closed dduportal closed 2 months ago

dduportal commented 3 months ago

Describe the bug

The 2 May 2024, the Jenkins infrastructure team upgraded the plugin datadog from 6.0.3 to 7.0.0 on ci.jenkins.io, the public controller used for the CI of Jenkins plugins.

This plugin upgrade resulted in all build history being partially destroyed: see https://github.com/jenkins-infra/helpdesk/issues/4080

The top-level symptoms are:

Capture d’écran 2024-05-03 à 11 52 26
CannotResolveClassException: org.datadog.jenkins.plugins.datadog.traces.StepDataAction, CannotResolveClassException: org.datadog.jenkins.plugins.datadog.traces.StepTraceDataAction, CannotResolveClassException: org.datadog.jenkins.plugins.datadog.model.StageBreakdownAction, CannotResolveClassException: org.datadog.jenkins.plugins.datadog.model.CIGlobalTagsAction, CannotResolveClassException: org.datadog.jenkins.plugins.datadog.traces.IsPipelineAction

The problem is reported by other users in https://issues.jenkins.io/browse/JENKINS-66328?focusedId=446989&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-446989

To Reproduce

Expected behavior

I would like the datadog plugin to either upgrade without any problem OR to not destroy my entire build history.

Screenshots

Capture d’écran 2024-05-03 à 11 33 48

Environment and Versions (please complete the following information):

A clear and precise description of your setup:

Additional context

Same issue as https://github.com/jenkinsci/datadog-plugin/issues/393.

We are considering to stop using datadog plugin on the official Jenkins infrastructure because our build history is destroyed on almost each plugin upgrade.

The reason is that the build.xml files are modified by the plugin which makes them unparseable if there are any error or if we remove the plugin. There might be reasons to do the implementation that way but it start to really be a problem for administrators.

legoGoat commented 3 months ago

I was literally about to submit a post on this exact issue, too. 🙈

@dduportal Do you know more or less from what the date/time your oldest affected builds are? I'm trying to judge whether it is since a particular timestamp or over a particular period of time since now().

Because, honestly, it clears out the entire execution of the build, all its run data. This is horrible.

Screenshot 2024-05-03 at 11 18 09 Screenshot 2024-05-03 at 11 21 09
nikita-tkachenko-datadog commented 3 months ago

Hi @dduportal, I am very sorry this happened again. We are still looking into the root cause of this. In the meantime, would it be possible for you to provide the logs of your Jenkins' controller node? Thanks!

nikita-tkachenko-datadog commented 3 months ago

The 7.0.0 release of the plugin has been removed from the Update Center

mjuszczak commented 3 months ago

Also experienced this issue when updating Jenkins core + all plugins on Tues Apr 30th.

nikita-tkachenko-datadog commented 3 months ago

The issue has been fixed in https://github.com/jenkinsci/datadog-plugin/pull/425 released in v7.0.1

dduportal commented 3 months ago

Hi @dduportal, I am very sorry this happened again. We are still looking into the root cause of this. In the meantime, would it be possible for you to provide the logs of your Jenkins' controller node? Thanks!

Sorry I missed your comment. We don't have more than 2 days of retention today but I can check the backups if you are still interested (asking given #425).

dduportal commented 3 months ago

The issue has been fixed in #425 released in v7.0.1

Thanks for the fix!

nikita-tkachenko-datadog commented 3 months ago

I can check the backups if you are still interested

Thank you, I've managed to reproduce the issue locally so I don't need the logs anymore

dduportal commented 2 months ago

Closing the issue as fixed by 7.0.1, thanks!