filebeat: port remaining harvester tests to filestream#49706
Conversation
Port remaining coverage from test_harvester.py into filestream input integration tests and remove the redundant Python test file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TL;DRBuildkite failed in Filebeat: Run check/update because Remediation
Investigation detailsRoot CauseThe failing step is Evidence
Verification
Follow-upIf this reappears after updating, check for non-deterministic generation or formatting in the touched filestream integration test path and pin any tool/version differences used by the update step. Note 🔒 Integrity filtering filtered 1 itemIntegrity filtering activated and filtered the following item during workflow execution.
What is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe pull request migrates filestream harvester system tests from Python to Go. The Python test module 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
As a confirmation, I ran |
|
@Mergifyio backport 8.19 9.2 9.3 |
✅ Backports have been createdDetails
|
* filebeat: port remaining harvester tests to filestream Port remaining coverage from test_harvester.py into filestream input integration tests and remove the redundant Python test file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix linter issues * fix test context * fix issue with logger with no selectors --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com> (cherry picked from commit f558378)
* filebeat: port remaining harvester tests to filestream Port remaining coverage from test_harvester.py into filestream input integration tests and remove the redundant Python test file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix linter issues * fix test context * fix issue with logger with no selectors --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com> (cherry picked from commit f558378)
* filebeat: port remaining harvester tests to filestream Port remaining coverage from test_harvester.py into filestream input integration tests and remove the redundant Python test file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix linter issues * fix test context * fix issue with logger with no selectors --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com> (cherry picked from commit f558378)
* filebeat: port remaining harvester tests to filestream Port remaining coverage from test_harvester.py into filestream input integration tests and remove the redundant Python test file. * fix linter issues * fix test context * fix issue with logger with no selectors --------- (cherry picked from commit f558378) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
* filebeat: port remaining harvester tests to filestream Port remaining coverage from test_harvester.py into filestream input integration tests and remove the redundant Python test file. * fix linter issues * fix test context * fix issue with logger with no selectors --------- (cherry picked from commit f558378) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Summary
Port the remaining test coverage from
filebeat/tests/system/test_harvester.pyintofilebeat/input/filestream/input_integration_test.go, then remove the redundant Python test file.Added Go integration tests
TestFilestreamExceedBuffer(fromtest_exceed_buffer)TestFilestreamIgnoreSymlink(fromtest_ignore_symlink)TestFilestreamSymlinkAndFile(fromtest_symlink_and_file)TestFilestreamDecodeError(fromtest_decode_error)TestFilestreamDebugReader(fromtest_debug_reader)Other changes
filebeat/tests/system/test_harvester.py.TestFilestreamDebugReadervialogp.TestingSetup(logp.WithSelectors("*"))so null-byte debug logging is observable in the integration harness.Validation
I attempted to run the new tests with repeated counts, but this runner consistently OOM-killed compilation of transitive dependencies in
go testbefore executing tests:GOMAXPROCS=1 GOGC=20 GOFLAGS='-p=1 -vet=off' go test -tags=integration ./filebeat/input/filestream -run '^TestFilestreamExceedBuffer$' -count=50GOMAXPROCS=1 GOGC=20 GOFLAGS='-p=1 -vet=off' go test -tags=integration ./filebeat/input/filestream -run '^TestFilestreamIgnoreSymlink$' -count=50Representative failure:
Given the environment memory limits, I could not complete the requested high
-countflake validation here. The code changes are committed and ready for CI validation in a larger runner.Note
🔒 Integrity filtering filtered 1 item
Integrity filtering activated and filtered the following item during workflow execution.
This happens when a tool call accesses a resource that does not meet the required integrity or secrecy level of the workflow.
issue_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)What is this? | From workflow: Mention in Issue
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.