Skip to content

Cherry-pick #18887 to 7.x: Fix gob encoding of system/package struct data#19043

Merged
andrewkroh merged 1 commit intoelastic:7.xfrom
andrewkroh:backport_18887_7.x
Jun 8, 2020
Merged

Cherry-pick #18887 to 7.x: Fix gob encoding of system/package struct data#19043
andrewkroh merged 1 commit intoelastic:7.xfrom
andrewkroh:backport_18887_7.x

Conversation

@andrewkroh
Copy link
Copy Markdown
Member

@andrewkroh andrewkroh commented Jun 8, 2020

Cherry-pick of PR #18887 to 7.x branch. Original message:

What does this PR do?

The system/package dataset uses encoding/gob to encode and decode
the Package struct data that it persists. The struct was updated to contain
an error which is an interface type that's not serializable by default.

I have made the field unexpected so that it is ignored by encoding/gob.

Why is it important?

The Auditbeat system module was emitting errors at runtime.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

The system/package dataset uses encoding/gob to encode and decode
the Package struct data that it persists. The struct was updated to contain
an error which is an interface type that's not serializable by default.

I have made the field unexpected so that it is ignored by encoding/gob.

Fixes elastic#18536

(cherry picked from commit cf7b643)
@andrewkroh andrewkroh requested a review from a team as a code owner June 8, 2020 16:59
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jun 8, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #19043 opened]

  • Start Time: 2020-06-08T16:59:59.368+0000

  • Duration: 38 min 26 sec

Test stats 🧪

Test Results
Failed 0
Passed 207
Skipped 33
Total 240

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jun 8, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/siem (Team:SIEM)

@andrewkroh andrewkroh merged commit af87f89 into elastic:7.x Jun 8, 2020
@andrewkroh andrewkroh deleted the backport_18887_7.x branch January 14, 2022 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants