[Filebeat] Fix flaky filestream delete retry integration subtest - #50037
Conversation
Use require.Eventually to wait for the async remove retry counter to reach the expected value before asserting. This removes a race where the assertion can run before the second retry increments the counter. Assisted-By: GPT-5.3-Codex Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
|
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)
📝 WalkthroughWalkthroughThe integration test 🚥 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 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
TL;DR
Remediation
Investigation detailsRoot CauseThe new/updated test file
But the codebase uses v2 everywhere else for this input ( Evidence
Verification
Follow-upIf the test intentionally requires the non-v2 module (unlikely given current package usage), then a deliberate 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. |
|
@Mergifyio backport 8.19 9.3 9.4 |
✅ Backports have been createdDetails
Cherry-pick of d27bf57 has failed: 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
|
) * filebeat: stabilize filestream delete retry test Use require.Eventually to wait for the async remove retry counter to reach the expected value before asserting. This removes a race where the assertion can run before the second retry increments the counter. Assisted-By: GPT-5.3-Codex Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * apply suggestion from code review --------- 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 d27bf57) # Conflicts: # filebeat/input/filestream/input_delete_integration_test.go
) * filebeat: stabilize filestream delete retry test Use require.Eventually to wait for the async remove retry counter to reach the expected value before asserting. This removes a race where the assertion can run before the second retry increments the counter. Assisted-By: GPT-5.3-Codex Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * apply suggestion from code review --------- 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 d27bf57)
) * filebeat: stabilize filestream delete retry test Use require.Eventually to wait for the async remove retry counter to reach the expected value before asserting. This removes a race where the assertion can run before the second retry increments the counter. Assisted-By: GPT-5.3-Codex Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * apply suggestion from code review --------- 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 d27bf57)
) (#50065) * filebeat: stabilize filestream delete retry test Use require.Eventually to wait for the async remove retry counter to reach the expected value before asserting. This removes a race where the assertion can run before the second retry increments the counter. Assisted-By: GPT-5.3-Codex * apply suggestion from code review --------- (cherry picked from commit d27bf57) 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>
) (#50066) * filebeat: stabilize filestream delete retry test Use require.Eventually to wait for the async remove retry counter to reach the expected value before asserting. This removes a race where the assertion can run before the second retry increments the counter. Assisted-By: GPT-5.3-Codex * apply suggestion from code review --------- (cherry picked from commit d27bf57) 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
This updates
TestFilestreamDeleteFileRemoveRetries/file_is_externally_removedto wait for the asynchronous retry counter deterministically.count.Load() != 2assertion withrequire.Eventually(...)1swith1mspollingValidation
./script/stresstest.sh --tags integration ./filebeat/input/filestream '^TestFilestreamDeleteFileRemoveRetries$' -p 1Both commands passed in this environment.
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.