Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.14](backport #39873) Add Offset to libbeat/reader.Message #39992

Merged
merged 2 commits into from
Jun 22, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jun 21, 2024

Proposed commit message

libbeat: add Offset to libbeat/reader.Message

This commit introduces the Offset property to libbeat/reader.Message, which stores the total number of bytes read and discarded before generating the message. The Offset field allows inputs to accurately determine how much data has been read up to the message, calculated as Message.Bytes + Message.Offset.

With this new Offset field, the filestream input correctly updates its state to account for data read but discarded by the include_message parser.

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.

Disruptive User Impact

None

How to test this PR locally

Follow the instructions on #39653

Related issues


This is an automatic backport of pull request #39873 done by [Mergify](https://mergify.com).

This commit introduces the Offset property to libbeat/reader.Message, which stores the total number of bytes read and discarded before generating the message. The Offset field allows inputs to accurately determine how much data has been read up to the message, calculated as Message.Bytes + Message.Offset.

With this new Offset field, the filestream input correctly updates its state to account for data read but discarded by the include_message parser.

(cherry picked from commit 535a174)

# Conflicts:
#	filebeat/input/filestream/environment_test.go
@mergify mergify bot requested a review from a team as a code owner June 21, 2024 15:39
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Jun 21, 2024
@mergify mergify bot requested review from rdner and faec and removed request for a team June 21, 2024 15:39
Copy link
Contributor Author

mergify bot commented Jun 21, 2024

Cherry-pick of 535a174 has failed:

On branch mergify/bp/8.14/pr-39873
Your branch is up to date with 'origin/8.14'.

You are currently cherry-picking commit 535a17418d.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   CHANGELOG-developer.next.asciidoc
	modified:   CHANGELOG.next.asciidoc
	modified:   filebeat/input/filestream/input.go
	modified:   filebeat/input/filestream/parsers_integration_test.go
	modified:   libbeat/reader/filter/filter.go
	modified:   libbeat/reader/message.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   filebeat/input/filestream/environment_test.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jun 21, 2024
@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Jun 22, 2024
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jun 22, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@pierrehilbert pierrehilbert enabled auto-merge (squash) June 22, 2024 13:56
@pierrehilbert pierrehilbert merged commit d2c4c2d into 8.14 Jun 22, 2024
123 checks passed
@pierrehilbert pierrehilbert deleted the mergify/bp/8.14/pr-39873 branch June 22, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport conflicts There is a conflict in the backported pull request Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants