Skip to content

Make tasklistener decorator serializable#188

Merged
coignetp merged 3 commits into
masterfrom
paul/task-builddata
Mar 17, 2021
Merged

Make tasklistener decorator serializable#188
coignetp merged 3 commits into
masterfrom
paul/task-builddata

Conversation

@coignetp

@coignetp coignetp commented Mar 16, 2021

Copy link
Copy Markdown
Contributor

What does this PR do?

Allow DatadogTaskListenerDecorator to be serializable. It should prevent information loss about the Charset and fix #182

Description of the Change

Jenkins sometimes serializes whole classes to send them to the jenkins agents JVM. During that process the run instance is null-ed (because not serializable and marked as transient). BuildData however is serializable, so we add the charset info to to this class, and use it instead of WorkflowRun.

Possible Drawbacks

Charset is not serializable either, so we store the canonical name in BuildData. However it might not cover all the use cases.
Other plugins like Logstash are also relying on the canonical name only.

Verification Process

Additional Notes

Release Notes

Review checklist (to be filled by reviewers)

  • Feature or bug fix MUST have appropriate tests (unit, integration, etc...)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have one changelog/ label attached. If applicable it should have the backward-incompatible label attached.
  • PR should not have do-not-merge/ label attached.
  • If Applicable, issue must have kind/ and severity/ labels attached at least.

@hithwen

hithwen commented Mar 16, 2021

Copy link
Copy Markdown
Collaborator

Since the class DatadogTaskListenerDecorator was already technically serializable should we add a test to ensure all the attributes we're interested on are serialized correctly?

@FlorianVeaux FlorianVeaux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job 👍

@coignetp
coignetp merged commit f500d2b into master Mar 17, 2021
@coignetp
coignetp deleted the paul/task-builddata branch March 17, 2021 08:45
@coignetp coignetp added the changelog/Fixed Fixed features results into a bug fix version bump label Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/Fixed Fixed features results into a bug fix version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Datadog Log Shipper failing

3 participants