Skip to content

Cherry-pick #22685 to 7.x: Properly update offset in case of unparasable line#24885

Merged
ChrsMark merged 2 commits intoelastic:7.xfrom
ChrsMark:backport_22685_7.x
Apr 1, 2021
Merged

Cherry-pick #22685 to 7.x: Properly update offset in case of unparasable line#24885
ChrsMark merged 2 commits intoelastic:7.xfrom
ChrsMark:backport_22685_7.x

Conversation

@ChrsMark
Copy link
Copy Markdown
Member

@ChrsMark ChrsMark commented Apr 1, 2021

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

What does this PR do?

This PR adds a fix for cases of docker reader meets an unparsable line and skips it (introduced at #12268). In such cases we should properly update the offset by adding the skipped bytes so as to point to the right byte.

Why is it important?

Having a wrong offset in the registry will make harvester start from the wrong offset in case of Filebeat's restarts or reopened files which will lead to another ErrLineUnparsable. Offset will never be healed from now on.

Testing notes

  1. make python-env
  2. source ./build/python-env/bin/activate
  3. make filebeat.test
  4. pytest tests/system/test_container.py

@ChrsMark ChrsMark added [zube]: In Review backport Team:Platforms Label for the Integrations - Platforms team labels Apr 1, 2021
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 1, 2021
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/integrations (Team:Platforms)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 1, 2021
@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Apr 1, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #24885 updated

  • Start Time: 2021-04-01T10:29:25.956+0000

  • Duration: 79 min 22 sec

  • Commit: 6cff86d

Test stats 🧪

Test Results
Failed 0
Passed 46406
Skipped 5174
Total 51580

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 46406
Skipped 5174
Total 51580

@ChrsMark ChrsMark merged commit f8d3aeb into elastic:7.x Apr 1, 2021
@zube zube bot removed the [zube]: Done label Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Team:Platforms Label for the Integrations - Platforms team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants