Skip to content

[winlogbeat] Disable Winlogbeat record ID gap detection when using xml_query#50443

Merged
marc-gr merged 2 commits into
elastic:mainfrom
marc-gr:fix/winlogbeat-xml-query-gap-detection
May 1, 2026
Merged

[winlogbeat] Disable Winlogbeat record ID gap detection when using xml_query#50443
marc-gr merged 2 commits into
elastic:mainfrom
marc-gr:fix/winlogbeat-xml-query-gap-detection

Conversation

@marc-gr
Copy link
Copy Markdown
Contributor

@marc-gr marc-gr commented Apr 30, 2026

Proposed commit message

Disable Winlogbeat record ID gap detection when using xml_query so filtered queries do not loop on non-contiguous record IDs.

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. Where relevant, I have used the stresstest.sh script to run them under stress conditions and race detector to verify their stability.
  • I have added an entry in ./changelog/fragments using the changelog tool.

@marc-gr marc-gr requested a review from a team as a code owner April 30, 2026 21:02
@marc-gr marc-gr added Winlogbeat bugfix Team:Security-Windows Platform Windows Platform Team in Security Solution windows backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches labels Apr 30, 2026
@infra-vault-gh-plugin-prod
Copy link
Copy Markdown

Pinging @elastic/sec-windows-platform (Team:Security-Windows Platform)

@botelastic botelastic Bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Apr 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)
  • /test : Run the Buildkite pipeline.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: ee1d734e-9d70-4114-b862-ecf976cdf2e4

📥 Commits

Reviewing files that changed from the base of the PR and between 036ecc9 and 4cf578a.

📒 Files selected for processing (3)
  • changelog/fragments/1777582712-winlogbeat-xml-query-gap-detection.yaml
  • winlogbeat/eventlog/wineventlog.go
  • winlogbeat/eventlog/wineventlog_retry_test.go

📝 Walkthrough

Walkthrough

Record ID gap detection in Winlogbeat has been modified to suppress detection when custom XML queries are configured. The change updates the gap detection logic in the wineventlog processing handler and includes a corresponding unit test to verify the behavior. A changelog fragment documents this bug fix, noting that filtered XML queries can produce non-contiguous record IDs without indicating genuine gaps requiring recovery.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 6/8 reviews remaining, refill in 13 minutes and 7 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@marc-gr marc-gr merged commit e129f5f into elastic:main May 1, 2026
36 of 37 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

@Mergifyio backport 9.3 9.4

@marc-gr marc-gr deleted the fix/winlogbeat-xml-query-gap-detection branch May 1, 2026 17:37
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 1, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches bugfix Team:Security-Windows Platform Windows Platform Team in Security Solution windows Winlogbeat

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants