Skip to content

Conversation

belimawr
Copy link
Contributor

@belimawr belimawr commented Oct 2, 2025

Proposed commit message

This commit fixes the flakiness from TestDoubleStarCanBeUsed by
loosening the number of ingested events, now only 11 out of 30 are
required. This is still enough to ensure we're reading from more than
one journal file.

This commit also collects the logs from the journald input in memory
and writes them to a file if the test fails, this file is collected by
BuildKite for further investigation.

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
## Author's Checklist

How to test this PR locally

Run the flaky test a large enough number of times, it should always pass

go test -v -count 1000 -run TestDoubleStarCanBeUsed ./filebeat/input/journald

## Related issues

## Use cases
## Screenshots
## Logs

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 2, 2025
Copy link
Contributor

github-actions bot commented Oct 2, 2025

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Contributor

mergify bot commented Oct 2, 2025

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @belimawr? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@belimawr belimawr added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Oct 3, 2025
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Oct 3, 2025
@belimawr belimawr changed the title [WIP] Better debug journald logs [Filebeat/Journald] Fix flakiness from TestDoubleStarCanBeUsed Oct 3, 2025
@belimawr belimawr marked this pull request as ready for review October 3, 2025 15:59
@belimawr belimawr requested review from a team as code owners October 3, 2025 15:59
@belimawr belimawr requested review from orestisfl and faec October 3, 2025 15:59
@elasticmachine
Copy link
Collaborator

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

@belimawr
Copy link
Contributor Author

belimawr commented Oct 3, 2025

Some tests failed because the 9.3 snapshot artefacts cannot be found yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Flaky test] filebeat/input/journald TestDoubleStarCanBeUsed
2 participants