[Fleet] Fix flaky versioned policies tests#251470
Conversation
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. |
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. |
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. |
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. |
| // 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)) { |
There was a problem hiding this comment.
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
|
Pinging @elastic/fleet (Team:Fleet) |
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. |
💚 Build Succeeded
Metrics [docs]
History
|
dmlemeshko
left a comment
There was a problem hiding this comment.
x-pack/platform/test/api_integration/services/fleet_and_agents.ts changes LGTM
Summary
Closes #250457
Closes #250460
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*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.