Skip to content

[Osquery] FF Enabled for Osquery 9.4 rework #262693

Merged
tomsonpl merged 12 commits intoelastic:mainfrom
tomsonpl:osquery-rework-ff-on-main
Apr 13, 2026
Merged

[Osquery] FF Enabled for Osquery 9.4 rework #262693
tomsonpl merged 12 commits intoelastic:mainfrom
tomsonpl:osquery-rework-ff-on-main

Conversation

@tomsonpl
Copy link
Copy Markdown
Contributor

@tomsonpl tomsonpl commented Apr 13, 2026

This PR applies the same changes as #258935 (merged directly to 9.4).

…8935)

Do not merge.
Testing CI and getting ready for GA.

---------

Co-authored-by: Tomasz Ciecierski <tomasz.ciecierski@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@tomsonpl
Copy link
Copy Markdown
Contributor Author

/ci

@tomsonpl tomsonpl added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:Defend Workflows “EDR Workflows” sub-team of Security Solution Osquery labels Apr 13, 2026
@tomsonpl tomsonpl changed the title [DO NOT MERGE][Osquery] FF Enabled for Osquery 9.4 rework (#258935) [Osquery] FF Enabled for Osquery 9.4 rework Apr 13, 2026
};

const casesOsqueryResultRegex = /attached Osquery results[\s]?[\d]+[\s]?second(?:s)? ago/;
export const viewRecentCaseAndCheckResults = () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Low tasks/live_query.ts:169

viewRecentCaseAndCheckResults no longer calls checkResults(), so it asserts the regex pattern exists but does not wait for the results table to populate. This can cause subsequent assertions like cy.contains(liveQueryQuery) to execute before the data is ready, leading to test flakiness.

🤖 Copy this AI Prompt to have your agent fix this:
In file x-pack/platform/plugins/shared/osquery/cypress/tasks/live_query.ts around line 169:

`viewRecentCaseAndCheckResults` no longer calls `checkResults()`, so it asserts the regex pattern exists but does not wait for the results table to populate. This can cause subsequent assertions like `cy.contains(liveQueryQuery)` to execute before the data is ready, leading to test flakiness.

Evidence trail:
- x-pack/platform/plugins/shared/osquery/cypress/tasks/live_query.ts lines 169-172 (REVIEWED_COMMIT): `viewRecentCaseAndCheckResults` function that no longer calls `checkResults()`
- git_diff MERGE_BASE..REVIEWED_COMMIT on live_query.ts: shows `-  checkResults();` was removed from `viewRecentCaseAndCheckResults`
- x-pack/platform/plugins/shared/osquery/cypress/tasks/live_query.ts lines 65-76 (REVIEWED_COMMIT): `checkResults()` function with 240000ms timeout and retry logic for data grid
- x-pack/platform/plugins/shared/osquery/cypress/e2e/all/cases.cy.ts lines 48-50 and 74-76: show `viewRecentCaseAndCheckResults()` followed by `cy.contains(liveQueryQuery)` assertions

@tomsonpl
Copy link
Copy Markdown
Contributor Author

/ci

@tomsonpl
Copy link
Copy Markdown
Contributor Author

/ci

@tomsonpl tomsonpl requested a review from szwarckonrad April 13, 2026 09:46
@tomsonpl
Copy link
Copy Markdown
Contributor Author

/ci

@tomsonpl
Copy link
Copy Markdown
Contributor Author

/ci

@tomsonpl tomsonpl marked this pull request as ready for review April 13, 2026 13:03
@tomsonpl tomsonpl requested a review from a team as a code owner April 13, 2026 13:03
@tomsonpl tomsonpl requested a review from gergoabraham April 13, 2026 13:03
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
osquery 1.3MB 1.3MB +104.0B

History

@tomsonpl tomsonpl removed the request for review from a team April 13, 2026 17:55
@tomsonpl tomsonpl merged commit aa7c45f into elastic:main Apr 13, 2026
13 checks passed
tfcmarques pushed a commit to tfcmarques/kibana that referenced this pull request Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Osquery release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants