Skip to content

[Fleet] Fix flaky versioned policies tests#251470

Merged
juliaElastic merged 8 commits intoelastic:mainfrom
juliaElastic:reassign-flaky-test-bugfix
Feb 4, 2026
Merged

[Fleet] Fix flaky versioned policies tests#251470
juliaElastic merged 8 commits intoelastic:mainfrom
juliaElastic:reassign-flaky-test-bugfix

Conversation

@juliaElastic
Copy link
Copy Markdown
Contributor

@juliaElastic juliaElastic commented Feb 3, 2026

Summary

Closes #250457
Closes #250460

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#10648

[❌] x-pack/platform/test/fleet_api_integration/config.agent_policy.ts: 9/25 tests passed.

see run history

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#10649

[❌] x-pack/platform/test/fleet_api_integration/config.agent_policy.ts: 0/25 tests passed.

see run history

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#10650

[❌] x-pack/platform/test/fleet_api_integration/config.agent_policy.ts: 2/25 tests passed.

see run history

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#10652

[✅] x-pack/platform/test/fleet_api_integration/config.agent_policy.ts: 25/25 tests passed.

see run history

// if none of the inputs have package level agent version conditions, it means some inputs have template level conditions, so have to recreate the full agent policy with agent version
if (fullPolicy.inputs.every((input) => !input.meta?.package?.agentVersion)) {
// if some of the inputs have template level conditions, we have to recreate the full agent policy with agent version
if (fullPolicy.inputs.some((input) => !input.meta?.package?.agentVersion)) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

small bugfix unrelated to the flaky tests, we want to recompile inputs if the agent policy has a mix of package policies with package level and input level conditions

@juliaElastic juliaElastic changed the title [Fleet] debug flaky test [Fleet] Fix flaky versioned policies tests Feb 4, 2026
@juliaElastic juliaElastic added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Feb 4, 2026
@juliaElastic juliaElastic marked this pull request as ready for review February 4, 2026 11:45
@juliaElastic juliaElastic requested review from a team as code owners February 4, 2026 11:45
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Feb 4, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Team:Fleet)

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#10655

[✅] x-pack/platform/test/fleet_api_integration/config.agent_policy.ts: 25/25 tests passed.

see run history

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

Copy link
Copy Markdown
Contributor

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

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

x-pack/platform/test/api_integration/services/fleet_and_agents.ts changes LGTM

Copy link
Copy Markdown
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@juliaElastic juliaElastic merged commit aec2909 into elastic:main Feb 4, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment